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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 1855733002: change flattenable factory to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « tests/QuickRejectTest.cpp ('k') | tools/debugger/SkOverdrawMode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index a32e0b6211218551d67ff7594b313e87240ae1bd..d868418d54ba8b4506fbaa05bb38a2f88f6979ec 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -726,12 +726,12 @@ static SkFlattenable* load_flattenable(Json::Value jsonFlattenable,
const void* data;
int size = decode_data(jsonFlattenable[SKDEBUGCANVAS_ATTRIBUTE_DATA], urlDataManager, &data);
SkValidatingReadBuffer buffer(data, size);
- SkFlattenable* result = factory(buffer);
+ sk_sp<SkFlattenable> result = factory(buffer);
if (!buffer.isValid()) {
SkDebugf("invalid buffer loading flattenable\n");
return nullptr;
}
- return result;
+ return result.release();
}
static SkColorType colortype_from_name(const char* name) {
« no previous file with comments | « tests/QuickRejectTest.cpp ('k') | tools/debugger/SkOverdrawMode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698