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

Unified Diff: src/images/SkKTXImageEncoder.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/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??
« include/core/SkData.h ('K') | « src/image/SkImage_Raster.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698