diff options
author | reed <reed@google.com> | 2016-03-18 07:25:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 07:25:55 -0700 |
commit | ca2622ba051829fed5f30facd74c5b41cd4b931c (patch) | |
tree | 3d8248b7764e500f857b3d6cfb6866e72b632199 /debugger/QT | |
parent | eb75c7db3a7372de68347d0df8d58acebc33a9ad (diff) |
return pictures as sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811703002
Review URL: https://codereview.chromium.org/1811703002
Diffstat (limited to 'debugger/QT')
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 6 |
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. |