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 |