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

Unified Diff: src/images/SkImageEncoder.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 | « src/core/SkStream.cpp ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageEncoder.cpp
diff --git a/src/images/SkImageEncoder.cpp b/src/images/SkImageEncoder.cpp
index 22bbc57c2f593a083734311f0c2dadb5f4994947..023885f4591859f82f7ea0e1bbd447b449a7ea64 100644
--- a/src/images/SkImageEncoder.cpp
+++ b/src/images/SkImageEncoder.cpp
@@ -31,7 +31,7 @@ SkData* SkImageEncoder::encodeData(const SkBitmap& bm, int quality) {
SkDynamicMemoryWStream stream;
quality = SkMin32(100, SkMax32(0, quality));
if (this->onEncode(&stream, bm, quality)) {
- return stream.copyToData();
+ return stream.detachAsData().release();
}
return nullptr;
}
« no previous file with comments | « src/core/SkStream.cpp ('k') | src/pathops/SkPathOpsOp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698