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

Unified Diff: bench/ETCBitmapBench.cpp

Issue 1671193002: Make SkPicture/SkImageGenerator default to SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move ImageGenerator impl into ktx code to share with nanobench Created 4 years, 10 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
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/ETCBitmapBench.cpp
diff --git a/bench/ETCBitmapBench.cpp b/bench/ETCBitmapBench.cpp
index 1b06112996269e4cf52b8bffd7e615e8c9a4f026..305f49210850f338880ec859f4aa1ec68eda1204 100644
--- a/bench/ETCBitmapBench.cpp
+++ b/bench/ETCBitmapBench.cpp
@@ -73,6 +73,9 @@ static etc1_byte* create_expanded_etc1_bitmap(const uint8_t* orig, int factor) {
return newData;
}
+// Defined in SkImageDecoder_ktx.cpp
+extern SkImageGenerator* decoder_image_generator(SkData*);
+
// This is the base class for all of the benches in this file. In general
// the ETC1 benches should all be working on the same data. Due to the
// simplicity of the PKM file, that data is the 128x128 mandrill etc1
@@ -151,10 +154,10 @@ protected:
}
if (fDecompress) {
- SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded(fPKMData));
+ SkAutoTDelete<SkImageGenerator> gen(decoder_image_generator(fPKMData));
gen->generateBitmap(&fBitmap);
} else {
- fImage.reset(SkImage::NewFromEncoded(fPKMData));
+ fImage.reset(SkImage::NewFromGenerator(decoder_image_generator(fPKMData)));
}
}
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698