Index: bench/nanobench.cpp |
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp |
index 4fb1ed223abdb481f2546c0e7e0083ab65747773..6af54d830faf813c864b86d05dee9f86fe340b1f 100644 |
--- a/bench/nanobench.cpp |
+++ b/bench/nanobench.cpp |
@@ -123,6 +123,8 @@ DEFINE_string(sourceType, "", |
DEFINE_string(benchType, "", |
"Apply usual --match rules to bench type: micro, recording, playback, skcodec, etc."); |
+DEFINE_bool(forceSRGB, false, "Force SRGB for imageinfos"); |
+ |
static double now_ms() { return SkTime::GetNSecs() * 1e-6; } |
static SkString humanize(double ms) { |
@@ -1002,6 +1004,8 @@ static void start_keepalive() { |
intentionallyLeaked->start(); |
} |
+extern bool gDefaultProfileIsSRGB; |
+ |
int nanobench_main(); |
int nanobench_main() { |
SetupCrashHandler(); |
@@ -1013,6 +1017,10 @@ int nanobench_main() { |
gGrFactory.reset(new GrContextFactory(grContextOpts)); |
#endif |
+ if (FLAGS_forceSRGB) { |
+ gDefaultProfileIsSRGB = true; |
+ } |
+ |
if (FLAGS_veryVerbose) { |
FLAGS_verbose = true; |
} |