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

Unified Diff: dm/DM.cpp

Issue 2011333002: Add forceSRGB flag to dm. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index f29726e04c7f8db93b89079cedf81ea1e7f321a3..2ac2f20a71b35060c5fb87b4d12e27ffd7b8cb1f 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -71,6 +71,7 @@ DEFINE_string(uninterestingHashesFile, "",
DEFINE_int32(shards, 1, "We're splitting source data into this many shards.");
DEFINE_int32(shard, 0, "Which shard do I run?");
DEFINE_bool(simpleCodec, false, "Only decode images to native scale");
+DEFINE_bool(forceSRGB, false, "Force SRGB for imageinfos");
using namespace DM;
using sk_gpu_test::GrContextFactory;
@@ -1231,6 +1232,8 @@ static sk_sp<SkTypeface> create_from_name(const char familyName[], SkTypeface::S
extern sk_sp<SkTypeface> (*gCreateTypefaceDelegate)(const char [], SkTypeface::Style );
+extern bool gDefaultProfileIsSRGB;
+
int dm_main();
int dm_main() {
setbuf(stdout, nullptr);
@@ -1243,6 +1246,10 @@ int dm_main() {
gVLog = freopen(SkOSPath::Join(FLAGS_writePath[0], "verbose.log").c_str(), "w", stderr);
}
+ if (FLAGS_forceSRGB) {
+ gDefaultProfileIsSRGB = true;
+ }
+
JsonWriter::DumpJson(); // It's handy for the bots to assume this is ~never missing.
SkAutoGraphics ag;
SkTaskGroup::Enabler enabled(FLAGS_threads);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698