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

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

Issue 1823133002: Use sk_sp-based picture recording APIs in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 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/Canvas2DLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index ade818e8529103e067bb98c1640c83c9694bce02..510ea46c573e411230f640ed621baded91547973 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -663,7 +663,7 @@ bool Canvas2DLayerBridge::writePixels(const SkImageInfo& origInfo, const void* p
void Canvas2DLayerBridge::skipQueuedDrawCommands()
{
if (m_haveRecordedDrawCommands) {
- adoptRef(m_recorder->endRecording());
+ m_recorder->finishRecordingAsPicture();
startRecording();
m_haveRecordedDrawCommands = false;
}
@@ -681,8 +681,7 @@ void Canvas2DLayerBridge::flushRecordingOnly()
if (m_haveRecordedDrawCommands && getOrCreateSurface()) {
TRACE_EVENT0("cc", "Canvas2DLayerBridge::flushRecordingOnly");
- RefPtr<SkPicture> picture = adoptRef(m_recorder->endRecording());
- picture->playback(getOrCreateSurface()->getCanvas());
+ m_recorder->finishRecordingAsPicture()->playback(getOrCreateSurface()->getCanvas());
if (m_isDeferralEnabled)
startRecording();
m_haveRecordedDrawCommands = false;

Powered by Google App Engine
This is Rietveld 408576698