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

Unified Diff: debugger/QT/SkDebuggerGUI.cpp

Issue 1811703002: return pictures as sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rely on RVO in picturerecorder 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
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/QT/SkDebuggerGUI.cpp
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index afb5c6dc5fdec72b56f3f52c8698506022185501..1999e6e632550da32769a3e29d4008a2b5e5f5e4 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -674,7 +674,7 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
fLoading = true;
SkAutoTDelete<SkStream> stream(new SkFILEStream(fileName.c_str()));
- SkPicture* picture = SkPicture::CreateFromStream(stream);
+ auto picture = SkPicture::MakeFromStream(stream);
if (nullptr == picture) {
QMessageBox::critical(this, "Error loading file", "Couldn't read file, sorry.");
@@ -682,14 +682,14 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
}
fCanvasWidget.resetWidgetTransform();
- fDebugger.loadPicture(picture);
+ fDebugger.loadPicture(picture.get());
fSkipCommands.setCount(fDebugger.getSize());
for (int i = 0; i < fSkipCommands.count(); ++i) {
fSkipCommands[i] = false;
}
- SkSafeUnref(picture);
+ picture.reset();
/* fDebugCanvas is reinitialized every load picture. Need it to retain value
* of the visibility filter.
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698