aboutsummaryrefslogtreecommitdiffhomepage
path: root/debugger/QT
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-03-18 07:25:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 07:25:55 -0700
commitca2622ba051829fed5f30facd74c5b41cd4b931c (patch)
tree3d8248b7764e500f857b3d6cfb6866e72b632199 /debugger/QT
parenteb75c7db3a7372de68347d0df8d58acebc33a9ad (diff)
return pictures as sk_sp
Diffstat (limited to 'debugger/QT')
-rw-r--r--debugger/QT/SkDebuggerGUI.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index afb5c6dc5f..1999e6e632 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.