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

Unified Diff: tools/skimage_main.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 | « tests/ImageDecodingTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skimage_main.cpp
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index 7cd15e811e0ded6b566de23563888f5918c915c4..d98a6191c30a3201f689f0f18d9e2dd061ef734d 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -30,6 +30,7 @@ DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from.");
DEFINE_bool(reencode, true, "Reencode the images to test encoding.");
DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images.");
DEFINE_string2(writePath, w, "", "Write rendered images into this directory.");
+DEFINE_bool(skip, false, "Skip writing zeroes.");
struct Format {
SkImageEncoder::Type fType;
@@ -383,6 +384,7 @@ static void decodeFileAndWrite(const char srcPath[], const SkString* writePath)
SkAutoTDelete<SkImageDecoder> ad(codec);
+ codec->setSkipWritingZeroes(FLAGS_skip);
stream.rewind();
// Create a string representing just the filename itself, for use in json expectations.
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698