New issue
Advanced search Search tips

Issue 638719 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

LayoutView's GraphicsLayer hierarchy for scrolling controls are wrong when root layer scrolling and slimming paint v2 are enabled

Project Member Reported by szager@chromium.org, Aug 17 2016

Issue description

As exposed in this patch:

https://codereview.chromium.org/2244873002/

Presumably, when spv2 is enabled for reals, CompositedLayerMapping will go away and this will be dead code.
 

Comment 1 by pdr@chromium.org, Aug 17 2016

Labels: -Pri-3 Pri-2
Owner: pdr@chromium.org
Status: Assigned (was: Untriaged)
I think we should actually do this sooner rather than later.

I have a patch that hacks this in:
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -2663,6 +2663,13 @@ void FrameView::synchronizedPaint()
     ASSERT(!view.isNull());
     forAllNonThrottledFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo(DocumentLifecycle::InPaint); });
 
+    PaintLayer* layer = layoutViewItem().layer();
+    if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && layer && layer->hasCompositedLayerMapping()) {
+        if (GraphicsLayer* mainGraphicsLayer = layer->compositedLayerMapping()->mainGraphicsLayer())
+            synchronizedPaintRecursively(mainGraphicsLayer);
+        if (GraphicsLayer* scrollingContentsLayer = layer->compositedLayerMapping()->scrollingContentsLayer())
+            synchronizedPaintRecursively(scrollingContentsLayer);
+    }
     // A null graphics layer can occur for painting of SVG images that are not parented into the main frame tree,
     // or when the FrameView is the main frame view of a page overlay. The page overlay is in the layer tree of
     // the host page and will be painted during synchronized painting of the host page.
@@ -2719,10 +2726,12 @@ void FrameView::pushPaintArtifactToCompositor()
     ASSERT(layer);
     if (!layer->hasCompositedLayerMapping())
         return;
-    GraphicsLayer* rootGraphicsLayer = layer->compositedLayerMapping()->mainGraphicsLayer();
-    if (!rootGraphicsLayer->drawsContent())
+    GraphicsLayer* contentsLayer = layer->compositedLayerMapping()->scrollingContentsLayer();
+    if (!contentsLayer)
+        contentsLayer = layer->compositedLayerMapping()->mainGraphicsLayer();
+    if (!contentsLayer || !contentsLayer->drawsContent())
         return;
-    const PaintArtifact& paintArtifact = rootGraphicsLayer->getPaintController().paintArtifact();
+    const PaintArtifact& paintArtifact = contentsLayer->getPaintController().paintArtifact();
Status: Fixed (was: Assigned)
Presumably this has been fixed.

Sign in to add a comment