Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1795)

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h

Issue 2728273002: [RLS] Don't create PaintLayerCompositor layers. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
index 6a281590ea4db3941333c6969560b9f05b2ae1dd..86ba57de48c1910c4efd738ba6c59fe2e9771426 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
@@ -123,11 +123,27 @@ class CORE_EXPORT PaintLayerCompositor final : public GraphicsLayerClient {
void fullyInvalidatePaint();
PaintLayer* rootLayer() const;
+
+ GraphicsLayer* containerLayer() const { return m_containerLayer.get(); }
+ GraphicsLayer* frameScrollLayer() const { return m_scrollLayer.get(); }
+ GraphicsLayer* rootContentLayer() const { return m_rootContentLayer.get(); }
+ GraphicsLayer* layerForHorizontalScrollbar() const {
+ return m_layerForHorizontalScrollbar.get();
+ }
+ GraphicsLayer* layerForVerticalScrollbar() const {
+ return m_layerForVerticalScrollbar.get();
+ }
+ GraphicsLayer* layerForScrollCorner() const {
+ return m_layerForScrollCorner.get();
+ }
+
+ // In root layer scrolling mode, returns the LayoutView's main GraphicsLayer.
+ // In non-RLS mode, returns the outermost PaintLayerCompositor layer.
GraphicsLayer* rootGraphicsLayer() const;
- GraphicsLayer* frameScrollLayer() const;
+
+ // In root layer scrolling mode, this is the LayoutView's scroll layer.
+ // In non-RLS mode, this is the same as frameScrollLayer().
GraphicsLayer* scrollLayer() const;
- GraphicsLayer* containerLayer() const;
- GraphicsLayer* rootContentLayer() const;
void updateRootLayerPosition();
@@ -155,16 +171,6 @@ class CORE_EXPORT PaintLayerCompositor final : public GraphicsLayerClient {
std::unique_ptr<JSONObject> layerTreeAsJSON(LayerTreeFlags) const;
- GraphicsLayer* layerForHorizontalScrollbar() const {
- return m_layerForHorizontalScrollbar.get();
- }
- GraphicsLayer* layerForVerticalScrollbar() const {
- return m_layerForVerticalScrollbar.get();
- }
- GraphicsLayer* layerForScrollCorner() const {
- return m_layerForScrollCorner.get();
- }
-
void setTracksRasterInvalidations(bool);
String debugName(const GraphicsLayer*) const override;
@@ -237,9 +243,9 @@ class CORE_EXPORT PaintLayerCompositor final : public GraphicsLayerClient {
bool isMainFrame() const;
VisualViewport& visualViewport() const;
+ GraphicsLayer* parentForContentLayers() const;
LayoutView& m_layoutView;
- std::unique_ptr<GraphicsLayer> m_rootContentLayer;
CompositingReasonFinder m_compositingReasonFinder;
@@ -268,12 +274,17 @@ class CORE_EXPORT PaintLayerCompositor final : public GraphicsLayerClient {
};
RootLayerAttachment m_rootLayerAttachment;
- // Enclosing container layer, which clips for iframe content
+ // Outermost layer, holds overflow controls and the container layer
+ std::unique_ptr<GraphicsLayer> m_overflowControlsHostLayer;
+
+ // Clips for iframe content
std::unique_ptr<GraphicsLayer> m_containerLayer;
+
+ // Scrolls with the FrameView
std::unique_ptr<GraphicsLayer> m_scrollLayer;
- // Enclosing layer for overflow controls and the clipping layer
- std::unique_ptr<GraphicsLayer> m_overflowControlsHostLayer;
+ // Innermost layer, parent of LayoutView main GraphicsLayer
+ std::unique_ptr<GraphicsLayer> m_rootContentLayer;
// Layers for overflow controls
std::unique_ptr<GraphicsLayer> m_layerForHorizontalScrollbar;

Powered by Google App Engine
This is Rietveld 408576698