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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 1469123005: Always use own PaintController in GraphicsLayer::paint() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
index 9f9497db1ec6dcae528b98a719ce922c7277a547..1333734d22e4e13494a9e72401bed13d5d2812ce 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -326,11 +326,14 @@ void InspectorLayerTreeAgent::makeSnapshot(ErrorString* errorString, const Strin
IntSize size = expandedIntSize(layer->size());
- SkPictureBuilder pictureBuilder(FloatRect(0, 0, size.width(), size.height()));
+ GraphicsContext context(*layer->paintController());
IntRect interestRect(IntPoint(0, 0), size);
- layer->paint(pictureBuilder.context(), &interestRect);
+ layer->paint(context, &interestRect);
+ layer->paintController()->commitNewDisplayItems();
- RefPtr<PictureSnapshot> snapshot = adoptRef(new PictureSnapshot(pictureBuilder.endRecording()));
+ context.beginRecording(interestRect);
+ layer->paintController()->paintArtifact().replay(context);
+ RefPtr<PictureSnapshot> snapshot = adoptRef(new PictureSnapshot(context.endRecording()));
*snapshotId = String::number(++s_lastSnapshotId);
bool newEntry = m_snapshotById.add(*snapshotId, snapshot).isNewEntry;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698