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

Unified Diff: src/codec/SkIcoCodec.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 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: src/codec/SkIcoCodec.cpp
diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp
index 0e81b72407218778b9d469e72b95941149b83309..45000b636fe4b04700633cbb0cb947de61607d3b 100644
--- a/src/codec/SkIcoCodec.cpp
+++ b/src/codec/SkIcoCodec.cpp
@@ -128,13 +128,12 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
bytesRead = offset;
// Create a new stream for the embedded codec
- SkAutoTUnref<SkData> data(
- SkData::NewFromStream(inputStream.get(), size));
+ sk_sp<SkData> data(SkData::MakeFromStream(inputStream.get(), size));
if (nullptr == data.get()) {
SkCodecPrintf("Warning: could not create embedded stream.\n");
break;
}
- SkAutoTDelete<SkMemoryStream> embeddedStream(new SkMemoryStream(data.get()));
+ SkAutoTDelete<SkMemoryStream> embeddedStream(new SkMemoryStream(data));
bytesRead += size;
// Check if the embedded codec is bmp or png and create the codec
« include/core/SkData.h ('K') | « samplecode/SampleLua.cpp ('k') | src/codec/SkRawCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698