Index: src/images/SkKTXImageEncoder.cpp |
diff --git a/src/images/SkKTXImageEncoder.cpp b/src/images/SkKTXImageEncoder.cpp |
index 4b318a240c4ce6a764670d5736dfcdd7a631b35a..078cec6b4d3fec0b5583a4928a395e68ec9c66da 100644 |
--- a/src/images/SkKTXImageEncoder.cpp |
+++ b/src/images/SkKTXImageEncoder.cpp |
@@ -46,13 +46,13 @@ bool SkKTXImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int) |
if (!bitmap.pixelRef()) { |
return false; |
} |
- SkAutoDataUnref data(bitmap.pixelRef()->refEncodedData()); |
+ sk_sp<SkData> data(bitmap.pixelRef()->refEncodedData()); |
// Is this even encoded data? |
if (data) { |
const uint8_t *bytes = data->bytes(); |
if (etc1_pkm_is_valid(bytes)) { |
- return this->encodePKM(stream, data); |
+ return this->encodePKM(stream, data.get()); |
} |
// Is it a KTX file?? |