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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: fix xpsdevice Created 4 years, 3 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/TypefaceTest.cpp ('k') | tools/fiddle/fiddle_main.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 d77a554fa403d4a188e9b0cf9ebd19d19988d483..6ca3fe074e580a9d84102d0a2f775123393ac590 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -707,11 +707,10 @@ bool SkDrawCommand::flatten(const SkImage& image, Json::Value* target,
SkDynamicMemoryWStream out;
SkDrawCommand::WritePNG((const png_bytep) encodedBitmap->bytes(), image.width(), image.height(),
out, false);
- SkData* encoded = out.copyToData();
+ sk_sp<SkData> encoded = out.detachAsData();
Json::Value jsonData;
encode_data(encoded->data(), encoded->size(), "image/png", urlDataManager, &jsonData);
(*target)[SKDEBUGCANVAS_ATTRIBUTE_DATA] = jsonData;
- encoded->unref();
return true;
}
« no previous file with comments | « tests/TypefaceTest.cpp ('k') | tools/fiddle/fiddle_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698