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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 9 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/platform/graphics/paint/DrawingRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
index f45e81a75d3db9b52e6e1cce916dd7b10779d53a..fb1cdb20e36464354ea69bd436b89fe047878ecb 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -88,6 +88,13 @@ DrawingRecorder::~DrawingRecorder() {
}
#endif
+ if (m_context.printing()) {
+ sk_sp<SkDrawable> drawable = m_context.endRecordingAsDrawable();
+ m_context.getPaintController().createAndAppend<DrawingDisplayItem>(
+ m_displayItemClient, m_displayItemType, drawable, m_knownToBeOpaque);
+ return;
+ }
+
sk_sp<const SkPicture> picture = m_context.endRecording();
#if DCHECK_IS_ON()

Powered by Google App Engine
This is Rietveld 408576698