#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "cc/trees/layer_tree_host_impl.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/containers/adapters.h"
#include "base/containers/contains.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/metrics/histogram.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/ranges/algorithm.h"
#include "base/strings/stringprintf.h"
#include "base/system/sys_info.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "base/trace_event/traced_value.h"
#include "base/trace_event/typed_macros.h"
#include "base/types/optional_ref.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/devtools_instrumentation.h"
#include "cc/base/features.h"
#include "cc/base/histograms.h"
#include "cc/base/math_util.h"
#include "cc/base/switches.h"
#include "cc/benchmarks/benchmark_instrumentation.h"
#include "cc/debug/rendering_stats_instrumentation.h"
#include "cc/input/browser_controls_offset_manager.h"
#include "cc/input/browser_controls_offset_tags_info.h"
#include "cc/input/page_scale_animation.h"
#include "cc/input/scrollbar_animation_controller.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/effect_tree_layer_list_iterator.h"
#include "cc/layers/heads_up_display_layer_impl.h"
#include "cc/layers/layer_impl.h"
#include "cc/layers/render_surface_impl.h"
#include "cc/layers/surface_layer_impl.h"
#include "cc/layers/video_layer_impl.h"
#include "cc/layers/viewport.h"
#include "cc/metrics/compositor_frame_reporting_controller.h"
#include "cc/metrics/custom_metrics_recorder.h"
#include "cc/metrics/frame_sequence_metrics.h"
#include "cc/metrics/lcd_text_metrics_reporter.h"
#include "cc/metrics/ukm_smoothness_data.h"
#include "cc/paint/display_item_list.h"
#include "cc/paint/paint_worklet_job.h"
#include "cc/paint/paint_worklet_layer_painter.h"
#include "cc/raster/bitmap_raster_buffer_provider.h"
#include "cc/raster/gpu_raster_buffer_provider.h"
#include "cc/raster/one_copy_raster_buffer_provider.h"
#include "cc/raster/raster_buffer_provider.h"
#include "cc/raster/synchronous_task_graph_runner.h"
#include "cc/raster/zero_copy_raster_buffer_provider.h"
#include "cc/resources/memory_history.h"
#include "cc/resources/resource_pool.h"
#include "cc/resources/ui_resource_bitmap.h"
#include "cc/tiles/eviction_tile_priority_queue.h"
#include "cc/tiles/frame_viewer_instrumentation.h"
#include "cc/tiles/gpu_image_decode_cache.h"
#include "cc/tiles/picture_layer_tiling.h"
#include "cc/tiles/raster_tile_priority_queue.h"
#include "cc/tiles/software_image_decode_cache.h"
#include "cc/tiles/tiles_with_resource_iterator.h"
#include "cc/trees/compositor_commit_data.h"
#include "cc/trees/damage_tracker.h"
#include "cc/trees/debug_rect_history.h"
#include "cc/trees/effect_node.h"
#include "cc/trees/image_animation_controller.h"
#include "cc/trees/latency_info_swap_promise_monitor.h"
#include "cc/trees/layer_context.h"
#include "cc/trees/layer_tree_frame_sink.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/mobile_optimized_viewport_util.h"
#include "cc/trees/mutator_host.h"
#include "cc/trees/presentation_time_callback_buffer.h"
#include "cc/trees/raster_capabilities.h"
#include "cc/trees/raster_context_provider_wrapper.h"
#include "cc/trees/render_frame_metadata.h"
#include "cc/trees/render_frame_metadata_observer.h"
#include "cc/trees/scroll_node.h"
#include "cc/trees/single_thread_proxy.h"
#include "cc/trees/tree_synchronizer.h"
#include "cc/view_transition/view_transition_request.h"
#include "components/viz/common/features.h"
#include "components/viz/common/frame_timing_details.h"
#include "components/viz/common/hit_test/hit_test_region_list.h"
#include "components/viz/common/quads/compositor_frame.h"
#include "components/viz/common/quads/compositor_frame_metadata.h"
#include "components/viz/common/quads/compositor_render_pass_draw_quad.h"
#include "components/viz/common/quads/frame_deadline.h"
#include "components/viz/common/quads/shared_element_draw_quad.h"
#include "components/viz/common/quads/shared_quad_state.h"
#include "components/viz/common/quads/solid_color_draw_quad.h"
#include "components/viz/common/resources/bitmap_allocation.h"
#include "components/viz/common/resources/platform_color.h"
#include "components/viz/common/resources/shared_image_format.h"
#include "components/viz/common/resources/shared_image_format_utils.h"
#include "components/viz/common/traced_value.h"
#include "components/viz/common/transition_utils.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/client_shared_image.h"
#include "gpu/command_buffer/client/context_support.h"
#include "gpu/command_buffer/client/raster_interface.h"
#include "gpu/command_buffer/client/shared_image_interface.h"
#include "gpu/command_buffer/common/shared_image_capabilities.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/ipc/client/client_shared_image_interface.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_latency_info.pbzero.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrDirectContext.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/display_color_spaces.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/size_conversions.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
#include "ui/gfx/geometry/vector2d_f.h"
namespace cc {
namespace {
const size_t kAssumeOverlapThreshold = …;
constexpr size_t kContainsSrgbCacheSize = …;
static_assert …;
bool IsMobileOptimized(LayerTreeImpl* active_tree) { … }
void DidVisibilityChange(LayerTreeHostImpl* id, bool visible) { … }
void PopulateMetadataContentColorUsage(
const LayerTreeHostImpl::FrameData* frame,
viz::CompositorFrameMetadata* metadata) { … }
bool VerboseLogEnabled() { … }
const char* ClientNameForVerboseLog() { … }
#define VERBOSE_LOG() …
}
class LayerTreeHostImpl::ImageDecodeCacheHolder { … };
void LayerTreeHostImpl::DidUpdateScrollAnimationCurve() { … }
void LayerTreeHostImpl::AccumulateScrollDeltaForTracing(
const gfx::Vector2dF& delta) { … }
void LayerTreeHostImpl::DidStartPinchZoom() { … }
void LayerTreeHostImpl::DidEndPinchZoom() { … }
void LayerTreeHostImpl::DidUpdatePinchZoom() { … }
void LayerTreeHostImpl::DidStartScroll() { … }
void LayerTreeHostImpl::DidEndScroll() { … }
void LayerTreeHostImpl::DidMouseLeave() { … }
void LayerTreeHostImpl::SetNeedsFullViewportRedraw() { … }
void LayerTreeHostImpl::SetDeferBeginMainFrame(
bool defer_begin_main_frame) const { … }
void LayerTreeHostImpl::UpdateBrowserControlsState(
BrowserControlsState constraints,
BrowserControlsState current,
bool animate,
base::optional_ref<const BrowserControlsOffsetTagsInfo> offset_tags_info) { … }
bool LayerTreeHostImpl::HasScrollLinkedAnimation(ElementId for_scroller) const { … }
bool LayerTreeHostImpl::IsInHighLatencyMode() const { … }
const LayerTreeSettings& LayerTreeHostImpl::GetSettings() const { … }
LayerTreeHostImpl& LayerTreeHostImpl::GetImplDeprecated() { … }
const LayerTreeHostImpl& LayerTreeHostImpl::GetImplDeprecated() const { … }
LayerTreeHostImpl::FrameData::FrameData() = default;
LayerTreeHostImpl::FrameData::~FrameData() = default;
LayerTreeHostImpl::UIResourceData::UIResourceData() = default;
LayerTreeHostImpl::UIResourceData::~UIResourceData() = default;
LayerTreeHostImpl::UIResourceData::UIResourceData(UIResourceData&&) noexcept =
default;
LayerTreeHostImpl::UIResourceData& LayerTreeHostImpl::UIResourceData::operator=(
UIResourceData&&) = default;
std::unique_ptr<LayerTreeHostImpl> LayerTreeHostImpl::Create(
const LayerTreeSettings& settings,
LayerTreeHostImplClient* client,
TaskRunnerProvider* task_runner_provider,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
TaskGraphRunner* task_graph_runner,
std::unique_ptr<MutatorHost> mutator_host,
RasterDarkModeFilter* dark_mode_filter,
int id,
scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner,
LayerTreeHostSchedulingClient* scheduling_client) { … }
LayerTreeHostImpl::LayerTreeHostImpl(
const LayerTreeSettings& settings,
LayerTreeHostImplClient* client,
TaskRunnerProvider* task_runner_provider,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
TaskGraphRunner* task_graph_runner,
std::unique_ptr<MutatorHost> mutator_host,
RasterDarkModeFilter* dark_mode_filter,
int id,
scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner,
LayerTreeHostSchedulingClient* scheduling_client)
: … { … }
LayerTreeHostImpl::~LayerTreeHostImpl() { … }
InputHandler& LayerTreeHostImpl::GetInputHandler() { … }
const InputHandler& LayerTreeHostImpl::GetInputHandler() const { … }
void LayerTreeHostImpl::BeginMainFrameAborted(
CommitEarlyOutReason reason,
std::vector<std::unique_ptr<SwapPromise>> swap_promises,
const viz::BeginFrameArgs& args,
bool next_bmf,
bool scroll_and_viewport_changes_synced) { … }
void LayerTreeHostImpl::ReadyToCommit(
const viz::BeginFrameArgs& commit_args,
bool scroll_and_viewport_changes_synced,
const BeginMainFrameMetrics* begin_main_frame_metrics,
bool commit_timeout) { … }
void LayerTreeHostImpl::BeginCommit(int source_frame_number,
uint64_t trace_id) { … }
void LayerTreeHostImpl::FinishCommit(
CommitState& state,
const ThreadUnsafeCommitState& unsafe_state) { … }
void LayerTreeHostImpl::PullLayerTreeHostPropertiesFrom(
const CommitState& commit_state) { … }
void LayerTreeHostImpl::RecordGpuRasterizationHistogram() { … }
void LayerTreeHostImpl::CommitComplete() { … }
void LayerTreeHostImpl::UpdateSyncTreeAfterCommitOrImplSideInvalidation() { … }
PaintWorkletJobMap LayerTreeHostImpl::GatherDirtyPaintWorklets(
PaintImageIdFlatSet* dirty_paint_worklet_ids) const { … }
void LayerTreeHostImpl::OnPaintWorkletResultsReady(PaintWorkletJobMap results) { … }
void LayerTreeHostImpl::NotifyPendingTreeFullyPainted() { … }
bool LayerTreeHostImpl::CanDraw() const { … }
void LayerTreeHostImpl::AnimatePendingTreeAfterCommit() { … }
void LayerTreeHostImpl::Animate() { … }
void LayerTreeHostImpl::AnimateInternal() { … }
bool LayerTreeHostImpl::PrepareTiles() { … }
void LayerTreeHostImpl::StartPageScaleAnimation(const gfx::Point& target_offset,
bool anchor_point,
float page_scale,
base::TimeDelta duration) { … }
void LayerTreeHostImpl::SetNeedsAnimateInput() { … }
std::unique_ptr<LatencyInfoSwapPromiseMonitor>
LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor(
ui::LatencyInfo* latency) { … }
std::unique_ptr<EventsMetricsManager::ScopedMonitor>
LayerTreeHostImpl::GetScopedEventMetricsMonitor(
EventsMetricsManager::ScopedMonitor::DoneCallback done_callback) { … }
void LayerTreeHostImpl::NotifyInputEvent() { … }
void LayerTreeHostImpl::QueueSwapPromiseForMainThreadScrollUpdate(
std::unique_ptr<SwapPromise> swap_promise) { … }
void LayerTreeHostImpl::FrameData::AsValueInto(
base::trace_event::TracedValue* value) const { … }
std::string LayerTreeHostImpl::FrameData::ToString() const { … }
DrawMode LayerTreeHostImpl::GetDrawMode() const { … }
static void AppendQuadsToFillScreen(
viz::CompositorRenderPass* target_render_pass,
const RenderSurfaceImpl* root_render_surface,
SkColor4f screen_background_color,
const Region& fill_region) { … }
static viz::CompositorRenderPass* FindRenderPassById(
const viz::CompositorRenderPassList& list,
viz::CompositorRenderPassId id) { … }
bool LayerTreeHostImpl::HasDamage() const { … }
DrawResult LayerTreeHostImpl::CalculateRenderPasses(FrameData* frame) { … }
void LayerTreeHostImpl::DidAnimateScrollOffset() { … }
void LayerTreeHostImpl::SetViewportDamage(const gfx::Rect& damage_rect) { … }
void LayerTreeHostImpl::InvalidateContentOnImplSide() { … }
void LayerTreeHostImpl::InvalidateLayerTreeFrameSink(bool needs_redraw) { … }
DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) { … }
void LayerTreeHostImpl::RemoveRenderPasses(FrameData* frame) { … }
void LayerTreeHostImpl::EvictTexturesForTesting() { … }
void LayerTreeHostImpl::BlockNotifyReadyToActivateForTesting(
bool block,
bool notify_if_blocked) { … }
void LayerTreeHostImpl::BlockImplSideInvalidationRequestsForTesting(
bool block) { … }
void LayerTreeHostImpl::ResetTreesForTesting() { … }
size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { … }
void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
const ManagedMemoryPolicy& policy) { … }
void LayerTreeHostImpl::DidModifyTilePriorities(bool pending_update_tiles) { … }
void LayerTreeHostImpl::SetTargetLocalSurfaceId(
const viz::LocalSurfaceId& target_local_surface_id) { … }
std::unique_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue(
TreePriority tree_priority,
RasterTilePriorityQueue::Type type) { … }
std::unique_ptr<EvictionTilePriorityQueue>
LayerTreeHostImpl::BuildEvictionQueue(TreePriority tree_priority) { … }
std::unique_ptr<TilesWithResourceIterator>
LayerTreeHostImpl::CreateTilesWithResourceIterator() { … }
gfx::DisplayColorSpaces LayerTreeHostImpl::GetDisplayColorSpaces() const { … }
void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
bool is_likely_to_require_a_draw) { … }
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
gfx::ContentColorUsage content_color_usage) const { … }
bool LayerTreeHostImpl::CheckColorSpaceContainsSrgb(
const gfx::ColorSpace& color_space) const { … }
void LayerTreeHostImpl::RequestImplSideInvalidationForCheckerImagedTiles() { … }
size_t LayerTreeHostImpl::GetFrameIndexForImage(const PaintImage& paint_image,
WhichTree tree) const { … }
int LayerTreeHostImpl::GetMSAASampleCountForRaster(
const DisplayItemList& display_list) const { … }
bool LayerTreeHostImpl::HasPendingTree() { … }
void LayerTreeHostImpl::NotifyReadyToActivate() { … }
void LayerTreeHostImpl::NotifyReadyToDraw() { … }
void LayerTreeHostImpl::NotifyAllTileTasksCompleted() { … }
void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { … }
void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { … }
void LayerTreeHostImpl::SetTreeActivationCallback(
base::RepeatingClosure callback) { … }
void LayerTreeHostImpl::SetMemoryPolicyImpl(const ManagedMemoryPolicy& policy) { … }
void LayerTreeHostImpl::SetExternalTilePriorityConstraints(
const gfx::Rect& viewport_rect,
const gfx::Transform& transform) { … }
void LayerTreeHostImpl::DidReceiveCompositorFrameAck() { … }
void LayerTreeHostImpl::DidPresentCompositorFrame(
uint32_t frame_token,
const viz::FrameTimingDetails& details) { … }
void LayerTreeHostImpl::LogAverageLagEvents(
uint32_t frame_token,
const viz::FrameTimingDetails& details) { … }
void LayerTreeHostImpl::NotifyThroughputTrackerResults(
const CustomTrackerResults& results) { … }
void LayerTreeHostImpl::DidNotNeedBeginFrame() { … }
void LayerTreeHostImpl::ReclaimResources(
std::vector<viz::ReturnedResource> resources) { … }
void LayerTreeHostImpl::MaybeFlushPendingWork() { … }
void LayerTreeHostImpl::OnDraw(const gfx::Transform& transform,
const gfx::Rect& viewport,
bool resourceless_software_draw,
bool skip_draw) { … }
void LayerTreeHostImpl::OnCompositorFrameTransitionDirectiveProcessed(
uint32_t sequence_id) { … }
void LayerTreeHostImpl::OnSurfaceEvicted(
const viz::LocalSurfaceId& local_surface_id) { … }
void LayerTreeHostImpl::ReportEventLatency(
std::vector<EventLatencyTracker::LatencyData> latencies) { … }
void LayerTreeHostImpl::OnCanDrawStateChangedForTree() { … }
viz::RegionCaptureBounds LayerTreeHostImpl::CollectRegionCaptureBounds() { … }
viz::CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() { … }
RenderFrameMetadata LayerTreeHostImpl::MakeRenderFrameMetadata(
FrameData* frame) { … }
std::optional<SubmitInfo> LayerTreeHostImpl::DrawLayers(FrameData* frame) { … }
viz::CompositorFrame LayerTreeHostImpl::GenerateCompositorFrame(
FrameData* frame) { … }
void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { … }
void LayerTreeHostImpl::UpdateDisplayTree(FrameData& frame) { … }
int LayerTreeHostImpl::RequestedMSAASampleCount() const { … }
void LayerTreeHostImpl::UpdateRasterCapabilities() { … }
ImageDecodeCache* LayerTreeHostImpl::GetImageDecodeCache() const { … }
void LayerTreeHostImpl::RegisterMainThreadPresentationTimeCallbackForTesting(
uint32_t frame_token,
PresentationTimeCallbackBuffer::Callback callback) { … }
void LayerTreeHostImpl::
RegisterMainThreadSuccessfulPresentationTimeCallbackForTesting(
uint32_t frame_token,
PresentationTimeCallbackBuffer::SuccessfulCallbackWithDetails
callback) { … }
void LayerTreeHostImpl::
RegisterCompositorThreadSuccessfulPresentationTimeCallbackForTesting(
uint32_t frame_token,
PresentationTimeCallbackBuffer::SuccessfulCallback callback) { … }
bool LayerTreeHostImpl::WillBeginImplFrame(const viz::BeginFrameArgs& args) { … }
void LayerTreeHostImpl::DidFinishImplFrame(const viz::BeginFrameArgs& args) { … }
void LayerTreeHostImpl::DidNotProduceFrame(const viz::BeginFrameAck& ack,
FrameSkippedReason reason) { … }
void LayerTreeHostImpl::OnBeginImplFrameDeadline() { … }
void LayerTreeHostImpl::SynchronouslyInitializeAllTiles() { … }
static uint32_t GetFlagsForSurfaceLayer(const SurfaceLayerImpl* layer) { … }
static void PopulateHitTestRegion(viz::HitTestRegion* hit_test_region,
const LayerImpl* layer,
uint32_t flags,
uint32_t async_hit_test_reasons,
const gfx::Rect& rect,
const viz::SurfaceId& surface_id,
float device_scale_factor) { … }
std::optional<viz::HitTestRegionList> LayerTreeHostImpl::BuildHitTestData() { … }
void LayerTreeHostImpl::DidLoseLayerTreeFrameSink() { … }
bool LayerTreeHostImpl::OnlyExpandTopControlsAtPageTop() const { … }
bool LayerTreeHostImpl::HaveRootScrollNode() const { … }
void LayerTreeHostImpl::SetNeedsCommit() { … }
ScrollNode* LayerTreeHostImpl::InnerViewportScrollNode() const { … }
ScrollNode* LayerTreeHostImpl::OuterViewportScrollNode() const { … }
ScrollNode* LayerTreeHostImpl::CurrentlyScrollingNode() { … }
const ScrollNode* LayerTreeHostImpl::CurrentlyScrollingNode() const { … }
bool LayerTreeHostImpl::IsPinchGestureActive() const { … }
ActivelyScrollingType LayerTreeHostImpl::GetActivelyScrollingType() const { … }
bool LayerTreeHostImpl::IsCurrentScrollMainRepainted() const { … }
bool LayerTreeHostImpl::ScrollAffectsScrollHandler() const { … }
void LayerTreeHostImpl::SetExternalPinchGestureActive(bool active) { … }
void LayerTreeHostImpl::CreatePendingTree() { … }
void LayerTreeHostImpl::PushScrollbarOpacitiesFromActiveToPending() { … }
void LayerTreeHostImpl::ActivateSyncTree() { … }
void LayerTreeHostImpl::ActivateStateForImages() { … }
void LayerTreeHostImpl::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel level) { … }
void LayerTreeHostImpl::SetVisible(bool visible) { … }
void LayerTreeHostImpl::SetNeedsOneBeginImplFrame() { … }
void LayerTreeHostImpl::SetNeedsRedraw() { … }
void LayerTreeHostImpl::SetNeedsUpdateDisplayTree() { … }
ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { … }
void LayerTreeHostImpl::ReleaseTreeResources() { … }
void LayerTreeHostImpl::ReleaseTileResources() { … }
void LayerTreeHostImpl::RecreateTileResources() { … }
void LayerTreeHostImpl::CreateTileManagerResources() { … }
std::unique_ptr<RasterBufferProvider>
LayerTreeHostImpl::CreateRasterBufferProvider() { … }
void LayerTreeHostImpl::SetLayerTreeMutator(
std::unique_ptr<LayerTreeMutator> mutator) { … }
void LayerTreeHostImpl::SetPaintWorkletLayerPainter(
std::unique_ptr<PaintWorkletLayerPainter> painter) { … }
void LayerTreeHostImpl::QueueImageDecode(int request_id,
const PaintImage& image) { … }
void LayerTreeHostImpl::ImageDecodeFinished(int request_id,
bool decode_succeeded) { … }
std::vector<std::pair<int, bool>>
LayerTreeHostImpl::TakeCompletedImageDecodeRequests() { … }
std::unique_ptr<MutatorEvents> LayerTreeHostImpl::TakeMutatorEvents() { … }
void LayerTreeHostImpl::ClearHistory() { … }
size_t LayerTreeHostImpl::CommitDurationSampleCountForTesting() const { … }
void LayerTreeHostImpl::ClearCaches() { … }
void LayerTreeHostImpl::DidChangeScrollbarVisibility() { … }
void LayerTreeHostImpl::CleanUpTileManagerResources() { … }
void LayerTreeHostImpl::ReleaseLayerTreeFrameSink() { … }
bool LayerTreeHostImpl::InitializeFrameSink(
LayerTreeFrameSink* layer_tree_frame_sink) { … }
void LayerTreeHostImpl::SetBeginFrameSource(viz::BeginFrameSource* source) { … }
const gfx::Transform& LayerTreeHostImpl::DrawTransform() const { … }
void LayerTreeHostImpl::DidChangeBrowserControlsPosition() { … }
void LayerTreeHostImpl::DidObserveScrollDelay(
int source_frame_number,
base::TimeDelta scroll_delay,
base::TimeTicks scroll_timestamp) { … }
float LayerTreeHostImpl::TopControlsHeight() const { … }
float LayerTreeHostImpl::TopControlsMinHeight() const { … }
float LayerTreeHostImpl::BottomControlsHeight() const { … }
float LayerTreeHostImpl::BottomControlsMinHeight() const { … }
void LayerTreeHostImpl::SetCurrentBrowserControlsShownRatio(
float top_ratio,
float bottom_ratio) { … }
float LayerTreeHostImpl::CurrentTopControlsShownRatio() const { … }
float LayerTreeHostImpl::CurrentBottomControlsShownRatio() const { … }
gfx::PointF LayerTreeHostImpl::ViewportScrollOffset() const { … }
void LayerTreeHostImpl::AutoScrollAnimationCreate(
const ScrollNode& scroll_node,
const gfx::PointF& target_offset,
float autoscroll_velocity) { … }
bool LayerTreeHostImpl::ScrollAnimationCreate(const ScrollNode& scroll_node,
const gfx::Vector2dF& delta,
base::TimeDelta delayed_by) { … }
void LayerTreeHostImpl::UpdateImageDecodingHints(
base::flat_map<PaintImage::Id, PaintImage::DecodingMode>
decoding_mode_map) { … }
void LayerTreeHostImpl::SetRenderFrameObserver(
std::unique_ptr<RenderFrameMetadataObserver> observer) { … }
void LayerTreeHostImpl::WillScrollContent(ElementId element_id) { … }
void LayerTreeHostImpl::DidScrollContent(ElementId element_id, bool animated) { … }
float LayerTreeHostImpl::DeviceScaleFactor() const { … }
float LayerTreeHostImpl::PageScaleFactor() const { … }
void LayerTreeHostImpl::BindToInputHandler(
std::unique_ptr<InputDelegateForCompositor> delegate) { … }
void LayerTreeHostImpl::DetachInputDelegateAndRenderFrameObserver() { … }
void LayerTreeHostImpl::SetVisualDeviceViewportSize(
const gfx::Size& visual_device_viewport_size) { … }
gfx::Size LayerTreeHostImpl::VisualDeviceViewportSize() const { … }
void LayerTreeHostImpl::SetPrefersReducedMotion(bool prefers_reduced_motion) { … }
void LayerTreeHostImpl::SetMayThrottleIfUndrawnFrames(
bool may_throttle_if_undrawn_frames) { … }
ScrollTree& LayerTreeHostImpl::GetScrollTree() const { … }
bool LayerTreeHostImpl::HasAnimatedScrollbars() const { … }
void LayerTreeHostImpl::UpdateChildLocalSurfaceId() { … }
void LayerTreeHostImpl::CollectScrollbarUpdatesForCommit(
CompositorCommitData* commit_data) const { … }
std::unique_ptr<CompositorCommitData>
LayerTreeHostImpl::ProcessCompositorDeltas(
const MutatorHost* main_thread_mutator_host) { … }
void LayerTreeHostImpl::SetFullViewportDamage() { … }
bool LayerTreeHostImpl::AnimatePageScale(base::TimeTicks monotonic_time) { … }
bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) { … }
bool LayerTreeHostImpl::AnimateScrollbars(base::TimeTicks monotonic_time) { … }
bool LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time,
bool is_active_tree) { … }
void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) { … }
void LayerTreeHostImpl::ActivateAnimations() { … }
void LayerTreeHostImpl::RegisterScrollbarAnimationController(
ElementId scroll_element_id,
float scrollbar_opacity) { … }
void LayerTreeHostImpl::DidRegisterScrollbarLayer(
ElementId scroll_element_id,
ScrollbarOrientation orientation) { … }
void LayerTreeHostImpl::DidUnregisterScrollbarLayer(
ElementId scroll_element_id,
ScrollbarOrientation orientation) { … }
ScrollbarAnimationController*
LayerTreeHostImpl::ScrollbarAnimationControllerForElementId(
ElementId scroll_element_id) const { … }
void LayerTreeHostImpl::FlashAllScrollbars(bool did_scroll) { … }
void LayerTreeHostImpl::PostDelayedScrollbarAnimationTask(
base::OnceClosure task,
base::TimeDelta delay) { … }
void LayerTreeHostImpl::SetNeedsAnimateForScrollbarAnimation() { … }
void LayerTreeHostImpl::SetNeedsRedrawForScrollbarAnimation() { … }
ScrollbarSet LayerTreeHostImpl::ScrollbarsFor(ElementId id) const { … }
bool LayerTreeHostImpl::IsFluentOverlayScrollbar() const { … }
void LayerTreeHostImpl::AddVideoFrameController(
VideoFrameController* controller) { … }
void LayerTreeHostImpl::RemoveVideoFrameController(
VideoFrameController* controller) { … }
void LayerTreeHostImpl::SetTreePriority(TreePriority priority) { … }
TreePriority LayerTreeHostImpl::GetTreePriority() const { … }
const viz::BeginFrameArgs& LayerTreeHostImpl::CurrentBeginFrameArgs() const { … }
base::TimeDelta LayerTreeHostImpl::CurrentBeginFrameInterval() const { … }
std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
LayerTreeHostImpl::AsValueWithFrame(FrameData* frame) const { … }
void LayerTreeHostImpl::AsValueWithFrameInto(
FrameData* frame,
base::trace_event::TracedValue* state) const { … }
void LayerTreeHostImpl::ActivationStateAsValueInto(
base::trace_event::TracedValue* state) const { … }
void LayerTreeHostImpl::SetDebugState(
const LayerTreeDebugState& new_debug_state) { … }
void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
const UIResourceBitmap& bitmap) { … }
void LayerTreeHostImpl::DeleteUIResource(UIResourceId uid) { … }
void LayerTreeHostImpl::DeleteUIResourceBacking(
UIResourceData data,
const gpu::SyncToken& sync_token) { … }
void LayerTreeHostImpl::OnUIResourceReleased(UIResourceId uid,
const gpu::SyncToken& sync_token,
bool lost) { … }
void LayerTreeHostImpl::ClearUIResources() { … }
void LayerTreeHostImpl::EvictAllUIResources() { … }
viz::ResourceId LayerTreeHostImpl::ResourceIdForUIResource(
UIResourceId uid) const { … }
bool LayerTreeHostImpl::IsUIResourceOpaque(UIResourceId uid) const { … }
bool LayerTreeHostImpl::EvictedUIResourcesExist() const { … }
void LayerTreeHostImpl::MarkUIResourceNotEvicted(UIResourceId uid) { … }
void LayerTreeHostImpl::ScheduleMicroBenchmark(
std::unique_ptr<MicroBenchmarkImpl> benchmark) { … }
void LayerTreeHostImpl::InsertLatencyInfoSwapPromiseMonitor(
LatencyInfoSwapPromiseMonitor* monitor) { … }
void LayerTreeHostImpl::RemoveLatencyInfoSwapPromiseMonitor(
LatencyInfoSwapPromiseMonitor* monitor) { … }
void LayerTreeHostImpl::NotifyLatencyInfoSwapPromiseMonitors() { … }
bool LayerTreeHostImpl::IsOwnerThread() const { … }
bool LayerTreeHostImpl::InProtectedSequence() const { … }
void LayerTreeHostImpl::WaitForProtectedSequenceCompletion() const { … }
bool LayerTreeHostImpl::IsElementInPropertyTrees(
ElementId element_id,
ElementListType list_type) const { … }
void LayerTreeHostImpl::SetMutatorsNeedCommit() { … }
void LayerTreeHostImpl::SetMutatorsNeedRebuildPropertyTrees() { … }
void LayerTreeHostImpl::SetTreeLayerScrollOffsetMutated(
ElementId element_id,
LayerTreeImpl* tree,
const gfx::PointF& scroll_offset) { … }
void LayerTreeHostImpl::SetElementFilterMutated(
ElementId element_id,
ElementListType list_type,
const FilterOperations& filters) { … }
void LayerTreeHostImpl::OnCustomPropertyMutated(
PaintWorkletInput::PropertyKey property_key,
PaintWorkletInput::PropertyValue property_value) { … }
bool LayerTreeHostImpl::RunsOnCurrentThread() const { … }
void LayerTreeHostImpl::SetElementBackdropFilterMutated(
ElementId element_id,
ElementListType list_type,
const FilterOperations& backdrop_filters) { … }
void LayerTreeHostImpl::SetElementOpacityMutated(ElementId element_id,
ElementListType list_type,
float opacity) { … }
void LayerTreeHostImpl::SetElementTransformMutated(
ElementId element_id,
ElementListType list_type,
const gfx::Transform& transform) { … }
void LayerTreeHostImpl::SetElementScrollOffsetMutated(
ElementId element_id,
ElementListType list_type,
const gfx::PointF& scroll_offset) { … }
void LayerTreeHostImpl::ElementIsAnimatingChanged(
const PropertyToElementIdMap& element_id_map,
ElementListType list_type,
const PropertyAnimationState& mask,
const PropertyAnimationState& state) { … }
void LayerTreeHostImpl::MaximumScaleChanged(ElementId element_id,
ElementListType list_type,
float maximum_scale) { … }
void LayerTreeHostImpl::ScrollOffsetAnimationFinished() { … }
void LayerTreeHostImpl::NotifyAnimationWorkletStateChange(
AnimationWorkletMutationState state,
ElementListType tree_type) { … }
bool LayerTreeHostImpl::CommitsToActiveTree() const { … }
void LayerTreeHostImpl::SetContextVisibility(bool is_visible) { … }
void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { … }
void LayerTreeHostImpl::InitializeUkm(
std::unique_ptr<ukm::UkmRecorder> recorder) { … }
void LayerTreeHostImpl::SetActiveURL(const GURL& url, ukm::SourceId source_id) { … }
void LayerTreeHostImpl::SetUkmSmoothnessDestination(
base::WritableSharedMemoryMapping ukm_smoothness_data) { … }
void LayerTreeHostImpl::NotifyDidPresentCompositorFrameOnImplThread(
uint32_t frame_token,
std::vector<PresentationTimeCallbackBuffer::SuccessfulCallback> callbacks,
const viz::FrameTimingDetails& details) { … }
void LayerTreeHostImpl::AllocateLocalSurfaceId() { … }
void LayerTreeHostImpl::RequestBeginFrameForAnimatedImages() { … }
void LayerTreeHostImpl::RequestInvalidationForAnimatedImages() { … }
bool LayerTreeHostImpl::IsReadyToActivate() const { … }
void LayerTreeHostImpl::RequestImplSideInvalidationForRerasterTiling() { … }
void LayerTreeHostImpl::RequestImplSideInvalidationForRasterInducingScroll(
ElementId scroll_element_id) { … }
base::WeakPtr<LayerTreeHostImpl> LayerTreeHostImpl::AsWeakPtr() { … }
void LayerTreeHostImpl::ApplyFirstScrollTracking(const ui::LatencyInfo& latency,
uint32_t frame_token) { … }
bool LayerTreeHostImpl::RunningOnRendererProcess() const { … }
void LayerTreeHostImpl::SetNeedsRedrawOrUpdateDisplayTree() { … }
}