LayoutView's GraphicsLayer hierarchy for scrolling controls are wrong when root layer scrolling and slimming paint v2 are enabled |
||
Issue descriptionAs 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.
,
Aug 14
Presumably this has been fixed. |
||
►
Sign in to add a comment |
||
Comment 1 by pdr@chromium.org
, Aug 17 2016Owner: 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();