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

Unified Diff: cc/settings.cc

Issue 11369188: cc: Guard overdraw metrics behind the --trace-overdraw command-line flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renderflags Created 8 years, 1 month 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 | « cc/settings.h ('k') | cc/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/settings.cc
diff --git a/cc/settings.cc b/cc/settings.cc
index 9a33af1c5c5fe58bc0d7a48ff14ffa06f77f3a21..98a877ed253fb103e4370ede31c1949b76753559 100644
--- a/cc/settings.cc
+++ b/cc/settings.cc
@@ -15,6 +15,7 @@ static bool s_acceleratedAnimationEnabled = false;
static bool s_pageScalePinchZoomEnabled = false;
static bool s_jankInsteadOfCheckerboard = false;
static bool s_backgroundColorInsteadOfCheckerboard = false;
+static bool s_traceOverdraw = false;
void reset()
{
@@ -26,6 +27,7 @@ void reset()
s_pageScalePinchZoomEnabled = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnablePinchInCompositor);
s_jankInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kJankInsteadOfCheckerboard);
s_backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard);
+ s_traceOverdraw = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kTraceOverdraw);
}
}
@@ -74,6 +76,13 @@ bool Settings::backgroundColorInsteadOfCheckerboard()
return s_backgroundColorInsteadOfCheckerboard;
}
+bool Settings::traceOverdraw()
+{
+ if (!s_settingsInitialized)
+ reset();
+ return s_traceOverdraw;
+}
+
void Settings::resetForTest()
{
reset();
« no previous file with comments | « cc/settings.h ('k') | cc/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698