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

Unified Diff: gm/etc1bitmap.cpp

Issue 834633006: add ImageGenerator::NewFromData to porting layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper for SkInstallDiscardablePixelRef(SkData*, ...) Created 5 years, 11 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: gm/etc1bitmap.cpp
diff --git a/gm/etc1bitmap.cpp b/gm/etc1bitmap.cpp
index fcf521a1803fec084c3a9ee68eba507bccee2f8b..76593f44414de7c84e9e4edc194dedd6a94423a7 100644
--- a/gm/etc1bitmap.cpp
+++ b/gm/etc1bitmap.cpp
@@ -10,7 +10,7 @@
#include "Resources.h"
#include "SkCanvas.h"
#include "SkData.h"
-#include "SkDecodingImageGenerator.h"
+#include "SkImageGenerator.h"
#include "SkImageDecoder.h"
#include "SkOSFile.h"
@@ -103,9 +103,7 @@ protected:
return;
}
- if (!SkInstallDiscardablePixelRef(
- SkDecodingImageGenerator::Create(
- fileData, SkDecodingImageGenerator::Options()), &bm)) {
+ if (!SkInstallDiscardablePixelRef(fileData, &bm)) {
SkDebugf("Could not install discardable pixel ref.\n");
return;
}
@@ -204,9 +202,7 @@ protected:
size_t dataSz = etc1_get_encoded_data_size(width, height) + ETC_PKM_HEADER_SIZE;
SkAutoDataUnref nonPOTData(SkData::NewWithCopy(am.get(), dataSz));
- if (!SkInstallDiscardablePixelRef(
- SkDecodingImageGenerator::Create(
- nonPOTData, SkDecodingImageGenerator::Options()), &bm)) {
+ if (!SkInstallDiscardablePixelRef(nonPOTData, &bm)) {
SkDebugf("Could not install discardable pixel ref.\n");
return;
}
« no previous file with comments | « gm/colorwheel.cpp ('k') | gm/factory.cpp » ('j') | include/core/SkImageGenerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698