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

Unified Diff: bench/nanobench.cpp

Issue 2008333002: add --forceSRGB option to nanobench, to get all src images to be SRGB (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: 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;
}
« 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