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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2342103002: Refactor the way PaintArtifactCompositor is attached and used. (Closed)
Patch Set: none Created 4 years, 3 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/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index f081d46663df622becb2c4881350200450e9306e..ab65d202e26dd8fdf5cffc46089aa1356926221b 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -795,6 +795,7 @@ String ChromeClientImpl::acceptLanguages()
void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFrame* localFrame)
{
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->localRoot();
// This method can be called while the frame is being detached. In that
@@ -804,11 +805,16 @@ void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr
webFrame->frameWidget()->setRootGraphicsLayer(rootLayer);
}
-void ChromeClientImpl::didPaint(const PaintArtifact& paintArtifact)
+void ChromeClientImpl::attachRootLayer(WebLayer* rootLayer, LocalFrame* localFrame)
{
- // TODO(jbroman): This doesn't handle OOPIF correctly. We probably need a
- // branch for WebFrameWidget, like attachRootGraphicsLayer.
- m_webView->getPaintArtifactCompositor().update(paintArtifact);
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->localRoot();
+
+ // This method can be called while the frame is being detached. In that
+ // case, the rootLayer is null, and the widget is already destroyed.
+ DCHECK(webFrame->frameWidget() || !rootLayer);
+ if (webFrame->frameWidget())
+ webFrame->frameWidget()->setRootLayer(rootLayer);
+
pdr. 2016/09/15 20:53:08 Nit: extra space
chrishtr 2016/09/15 21:05:39 Done.
}
void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline* compositorTimeline, LocalFrame* localFrame)

Powered by Google App Engine
This is Rietveld 408576698