summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h')
-rw-r--r--chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h41
1 files changed, 8 insertions, 33 deletions
diff --git a/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h b/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h
index e747e628c87..e41c6fe752f 100644
--- a/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h
+++ b/chromium/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h
@@ -38,6 +38,7 @@ namespace blink {
class PaintLayer;
class GraphicsLayer;
class LayoutEmbeddedContent;
+class LayoutView;
class Page;
class Scrollbar;
class ScrollingCoordinator;
@@ -80,10 +81,6 @@ class CORE_EXPORT PaintLayerCompositor {
// pointers out of this object become invalid.
void CleanUp();
- // Called after layout is performed on the LocalFrame holding the LayoutView,
- // during the document lifecycle update.
- void DidLayout();
-
void UpdateIfNeededRecursive(DocumentLifecycle::LifecycleState target_state);
// Return true if this LayoutView is in "compositing mode" (i.e. has one or
@@ -95,8 +92,6 @@ class CORE_EXPORT PaintLayerCompositor {
// to the native view/window system.
void SetCompositingModeEnabled(bool);
- bool RootShouldAlwaysComposite() const;
-
// Notifies about changes to PreferCompositingToLCDText or
// AcceleratedCompositing.
void UpdateAcceleratedCompositingSettings();
@@ -124,9 +119,8 @@ class CORE_EXPORT PaintLayerCompositor {
// swapped out for an overlay video or immersive-ar DOM overlay layer.
GraphicsLayer* PaintRootGraphicsLayer() const;
- static PaintLayerCompositor* FrameContentsCompositor(LayoutEmbeddedContent&);
- // Return true if the layers changed.
- static bool AttachFrameContentLayersToIframeLayer(LayoutEmbeddedContent&);
+ static PaintLayerCompositor* FrameContentsCompositor(
+ const LayoutEmbeddedContent&);
void UpdateTrackingRasterInvalidations();
@@ -137,6 +131,9 @@ class CORE_EXPORT PaintLayerCompositor {
// Whether the layer could ever be composited.
bool CanBeComposited(const PaintLayer*) const;
+ bool RootLayerAttachmentDirty() const { return root_layer_attachment_dirty_; }
+ void ClearRootLayerAttachmentDirty() { root_layer_attachment_dirty_ = false; }
+
// FIXME: Move allocateOrClearCompositedLayerMapping to
// CompositingLayerAssigner once we've fixed the compositing chicken/egg
// issues.
@@ -170,17 +167,12 @@ class CORE_EXPORT PaintLayerCompositor {
void UpdateIfNeeded(DocumentLifecycle::LifecycleState target_state,
CompositingReasonsStats&);
- void AttachRootLayer();
- void DetachRootLayer();
+ void SetOwnerNeedsCompositingUpdate();
Page* GetPage() const;
ScrollingCoordinator* GetScrollingCoordinator() const;
- void EnableCompositingModeIfNeeded();
-
- GraphicsLayer* OverlayFullscreenVideoGraphicsLayer() const;
-
// Checks the given graphics layer against the compositor's horizontal and
// vertical scrollbar graphics layers, returning the associated Scrollbar
// instance if any, else nullptr.
@@ -188,32 +180,15 @@ class CORE_EXPORT PaintLayerCompositor {
bool IsMainFrame() const;
- GraphicsLayer* GetXrOverlayLayer() const;
-
LayoutView& layout_view_;
bool compositing_ = false;
-
- // The root layer doesn't composite if it's a non-scrollable frame.
- // So, after a layout we set this dirty bit to know that we need
- // to recompute whether the root layer should composite even if
- // none of its descendants composite.
- // FIXME: Get rid of all the callers of SetCompositingModeEnabled()
- // except the one in UpdateIfNeeded(), then rename this to
- // compositing_dirty_.
- bool root_should_always_composite_dirty_ = true;
+ bool root_layer_attachment_dirty_ = false;
// After initialization, compositing updates must be done, so start dirty.
CompositingUpdateType pending_update_type_ =
kCompositingUpdateAfterCompositingInputChange;
- enum RootLayerAttachment {
- kRootLayerUnattached,
- kRootLayerAttachedViaEnclosingFrame,
- kRootLayerOfLocalFrameRoot // which doesn't need to attach to anything.
- };
- RootLayerAttachment root_layer_attachment_ = kRootLayerUnattached;
-
CompositingInputsRoot compositing_inputs_root_;
FRIEND_TEST_ALL_PREFIXES(FrameThrottlingTest,