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

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

Issue 2791043002: Draw recorded content directly into the containing PaintCanvas, when possible. (Closed)
Patch Set: none 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/PaintRecordBuilder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
index c38eb19d187ddd65820a134a21ac2b9bcd9b16d2..4bafdd4157401ffdf52a48970b69a9fa829c4853 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintRecordBuilder.cpp
@@ -58,4 +58,13 @@ sk_sp<PaintRecord> PaintRecordBuilder::endRecording() {
return m_context->endRecording();
}
+void PaintRecordBuilder::endRecording(PaintCanvas& canvas) {
+ if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
+ canvas.drawPicture(endRecording());
+ } else {
+ m_paintController->commitNewDisplayItems();
+ m_paintController->paintArtifact().replay(m_bounds, canvas);
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698