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

Unified Diff: bench/SkipZeroesBench.cpp

Issue 24269006: Add an option on SkImageDecoder to skip writing 0s. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebase, plus update the benchmark Created 7 years, 3 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 | include/core/SkImageDecoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/SkipZeroesBench.cpp
diff --git a/bench/SkipZeroesBench.cpp b/bench/SkipZeroesBench.cpp
index b56838c200b503ad23b432993510f1177c0fd4c9..fc2f060a353b10347aaf427e7da7a330f4345e47 100644
--- a/bench/SkipZeroesBench.cpp
+++ b/bench/SkipZeroesBench.cpp
@@ -61,15 +61,7 @@ protected:
fStream.setData(skdata.get());
fDecoder.reset(SkImageDecoder::Factory(&fStream));
if (fDecoder.get()) {
- // Disabling until the feature is checked in.
- // See https://codereview.chromium.org/24269006/
- //fDecoder->setSkipWritingZeroes(fSkipZeroes);
- if (fSkipZeroes) {
- // This printf will never happen since this bench is
- // only currently created with false. Remove once
- // the above code is uncommented.
- SkDebugf("Should be skipping zeroes...\n");
- }
+ fDecoder->setSkipWritingZeroes(fSkipZeroes);
} else {
fValid = false;
}
@@ -117,5 +109,5 @@ private:
};
// Enable the true version once the feature is checked in.
-//DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", true)));
+DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", true)));
DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", false)));
« no previous file with comments | « no previous file | include/core/SkImageDecoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698