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

Unified Diff: tests/PictureTest.cpp

Issue 2333713002: change SkStreams to work with sk_sp<SkData> instead of SkData* (Closed)
Patch Set: 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
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 7b187b44099820d82529ff2be5d64d6c3a13811d..c8855092e439baebc869fca5191cfda9b399b67b 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -632,7 +632,7 @@ static sk_sp<SkData> serialized_picture_from_bitmap(const SkBitmap& bitmap) {
SkAutoTUnref<SkPixelSerializer> serializer(
SkImageEncoder::CreatePixelSerializer());
picture->serialize(&wStream, serializer);
- return sk_sp<SkData>(wStream.copyToData());
+ return wStream.makeCopy();
}
struct ErrorContext {
@@ -670,7 +670,7 @@ DEF_TEST(Picture_EncodedData, reporter) {
if (!SkImageEncoder::EncodeStream(&wStream, original, SkImageEncoder::kPNG_Type, 100)) {
return;
}
- sk_sp<SkData> data(wStream.copyToData());
+ sk_sp<SkData> data = wStream.makeCopy();
SkBitmap bm;
bool installSuccess = SkDEPRECATED_InstallDiscardablePixelRef(data.get(), &bm);
« include/core/SkStream.h ('K') | « tests/PathTest.cpp ('k') | tests/StreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698