diff options
Diffstat (limited to 'chromium/cc/trees/layer_tree_impl.h')
-rw-r--r-- | chromium/cc/trees/layer_tree_impl.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/chromium/cc/trees/layer_tree_impl.h b/chromium/cc/trees/layer_tree_impl.h index 5efd40a6f8f..666701c4360 100644 --- a/chromium/cc/trees/layer_tree_impl.h +++ b/chromium/cc/trees/layer_tree_impl.h @@ -20,6 +20,7 @@ #include "cc/input/overscroll_behavior.h" #include "cc/layers/layer_impl.h" #include "cc/layers/layer_list_iterator.h" +#include "cc/paint/discardable_image_map.h" #include "cc/resources/ui_resource_client.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_host_impl.h" @@ -357,11 +358,7 @@ class CC_EXPORT LayerTreeImpl { return new_local_surface_id_request_; } - void SetDeviceViewportSize(const gfx::Size& device_viewport_size); - void SetViewportVisibleRect(const gfx::Rect& visible_rect); - const gfx::Rect& viewport_visible_rect() const { - return viewport_visible_rect_; - } + void SetDeviceViewportRect(const gfx::Rect& device_viewport_rect); // TODO(fsamuel): The reason this is not a trivial accessor is because it // may return an external viewport specified in LayerTreeHostImpl. In the @@ -369,6 +366,10 @@ class CC_EXPORT LayerTreeImpl { // trees and we shouldn't need to reach out to LayerTreeHostImpl. gfx::Rect GetDeviceViewport() const; + // This accessor is the same as above, except it only ever returns the + // internal (i.e. not external) device viewport. + gfx::Rect internal_device_viewport() { return device_viewport_rect_; } + void SetRasterColorSpace(int raster_color_space_id, const gfx::ColorSpace& raster_color_space); // OOPIFs need to know the page scale factor used in the main frame, but it @@ -657,6 +658,8 @@ class CC_EXPORT LayerTreeImpl { void InvalidateRegionForImages( const PaintImageIdFlatSet& images_to_invalidate); + void UpdateViewportContainerSizes(); + LayerTreeLifecycle& lifecycle() { return lifecycle_; } std::string LayerListAsJson() const; @@ -664,6 +667,10 @@ class CC_EXPORT LayerTreeImpl { // of layers, only a list. std::string LayerTreeAsJson() const; + AnimatedPaintWorkletTracker& paint_worklet_tracker() { + return host_impl_->paint_worklet_tracker(); + } + protected: float ClampPageScaleFactorToLimits(float page_scale_factor) const; void PushPageScaleFactorAndLimits(const float* page_scale_factor, @@ -715,12 +722,9 @@ class CC_EXPORT LayerTreeImpl { viz::LocalSurfaceIdAllocation local_surface_id_allocation_from_parent_; bool new_local_surface_id_request_ = false; - gfx::Size device_viewport_size_; - - // Viewport clip rect passed in from the main thrad, in physical pixels. - // This is used for out-of-process iframes whose size exceeds the window - // in order to prevent full raster. - gfx::Rect viewport_visible_rect_; + // Contains the physical rect of the device viewport, to be used in + // determining what needs to be drawn. + gfx::Rect device_viewport_rect_; scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |