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

Unified Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.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/RecordingImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
index 406f0cb2fb5533b4c7ba2ee522af0427c252457a..c3666f29afcd29d958a2758febfe78996539eefd 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
@@ -87,8 +87,7 @@ void RecordingImageBufferSurface::fallBackToRasterCanvas(FallbackReason reason)
}
if (m_currentFrame) {
- RefPtr<SkPicture> currentPicture = adoptRef(m_currentFrame->endRecording());
- currentPicture->playback(m_fallbackSurface->canvas());
+ m_currentFrame->finishRecordingAsPicture()->playback(m_fallbackSurface->canvas());
m_currentFrame.clear();
}
@@ -229,7 +228,7 @@ void RecordingImageBufferSurface::willOverwriteCanvas()
m_previousFramePixelCount = 0;
if (m_didRecordDrawCommandsInCurrentFrame) {
// Discard previous draw commands
- adoptRef(m_currentFrame->endRecording());
+ m_currentFrame->finishRecordingAsPicture();
initializeCurrentFrame();
}
}
@@ -252,7 +251,7 @@ bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallback
if (!m_imageBuffer->isDirty()) {
if (!m_previousFrame) {
// Create an initial blank frame
- m_previousFrame = adoptRef(m_currentFrame->endRecording());
+ m_previousFrame = fromSkSp(m_currentFrame->finishRecordingAsPicture());
initializeCurrentFrame();
}
return m_currentFrame;
@@ -268,7 +267,7 @@ bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallback
return false;
}
- m_previousFrame = adoptRef(m_currentFrame->endRecording());
+ m_previousFrame = fromSkSp(m_currentFrame->finishRecordingAsPicture());
m_previousFrameHasExpensiveOp = m_currentFrameHasExpensiveOp;
m_previousFramePixelCount = m_currentFramePixelCount;
initializeCurrentFrame();

Powered by Google App Engine
This is Rietveld 408576698