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

Unified Diff: third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp

Issue 1690763003: Never call GraphicsLayer::paint when fetching painted output from cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « cc/layers/content_layer_client.h ('k') | third_party/WebKit/public/platform/WebContentLayerClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
index 2481727fe647d2ffd5bc104164df3f649abfceae..b5864e3e57b2841ad1c46deb3b0b26cb1dddf4bb 100644
--- a/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ContentLayerDelegate.cpp
@@ -93,8 +93,14 @@ void ContentLayerDelegate::paintContents(
|| paintingControl == WebContentLayerClient::DisplayListConstructionDisabled)
disabledMode = GraphicsContext::FullyDisabled;
- m_graphicsLayer->paint(nullptr, disabledMode);
+ // Anything other than PaintDefaultBehavior is for testing. In non-testing scenarios,
+ // it is an error to call GraphicsLayer::paint. Actual painting occurs in FrameView::synchronizedPaint;
+ // this method merely copies the painted output to the WebDisplayItemList.
+ if (paintingControl != PaintDefaultBehavior)
+ m_graphicsLayer->paint(nullptr, disabledMode);
+
paintArtifactToWebDisplayItemList(webDisplayItemList, m_graphicsLayer, paintController.paintArtifact(), paintableRegion());
+
paintController.setDisplayItemConstructionIsDisabled(false);
paintController.setSubsequenceCachingIsDisabled(false);
}
« no previous file with comments | « cc/layers/content_layer_client.h ('k') | third_party/WebKit/public/platform/WebContentLayerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698