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); |