From b8486f5092ec3c0760a08ff1ecf76ad601b8609d Mon Sep 17 00:00:00 2001 From: reed Date: Thu, 26 May 2016 14:06:43 -0700 Subject: [PATCH] add --forceSRGB option to nanobench, to get all src images to be SRGB BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2008333002 Review-Url: https://codereview.chromium.org/2008333002 --- bench/nanobench.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 4fb1ed223a..6af54d830f 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; } -- 2.34.1