Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index 048e7d1c315d85fd90c25e562ffe98c1cde3a5ad..8ed7a77c54df04256c3861f4568d6422eb237eee 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -106,6 +106,7 @@ |
| #include "platform/graphics/GraphicsContext.h" |
| #include "platform/graphics/GraphicsLayer.h" |
| #include "platform/graphics/GraphicsLayerDebugInfo.h" |
| +#include "platform/graphics/compositing/PaintArtifactCompositor.h" |
| #include "platform/graphics/paint/CullRect.h" |
| #include "platform/graphics/paint/PaintController.h" |
| #include "platform/graphics/paint/ScopedPaintChunkProperties.h" |
| @@ -2762,12 +2763,15 @@ void FrameView::pushPaintArtifactToCompositor() |
| ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| - const PaintArtifact& paintArtifact = m_paintController->paintArtifact(); |
| + if (!m_paintArtifactCompositor) { |
| + m_paintArtifactCompositor = PaintArtifactCompositor::create(); |
| + Page* page = frame().page(); |
| + if (!page) |
|
pdr.
2016/09/15 20:53:07
Can this ever happen? If it does, wouldn't we forg
chrishtr
2016/09/15 21:05:39
I don't know if it can happen. What I can say is t
pdr.
2016/09/15 21:08:17
Why don't we just bail then, instead of creating a
chrishtr
2016/09/15 21:11:04
Done.
|
| + return; |
| - Page* page = frame().page(); |
| - if (!page) |
| - return; |
| - page->chromeClient().didPaint(paintArtifact); |
| + page->chromeClient().attachRootLayer(m_paintArtifactCompositor->getWebLayer(), &frame()); |
| + } |
| + m_paintArtifactCompositor->update(m_paintController->paintArtifact()); |
| } |
| void FrameView::updateStyleAndLayoutIfNeededRecursive() |