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

Unified Diff: cc/base/switches.cc

Issue 43463003: Remember value of IsImplSidePaintingEnabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Brace style not caught by presubmit Created 7 years, 2 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: cc/base/switches.cc
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 5dbb2960a22b43cd23fba850b6d7d92b453939e6..2eab547846ce55aaf270bcf2128aa36c4d939171 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -162,7 +162,8 @@ bool IsLCDTextEnabled() {
#endif
}
-bool IsImplSidePaintingEnabled() {
+namespace {
+bool CheckImplSidePaintingStatus() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(cc::switches::kDisableImplSidePainting))
@@ -176,6 +177,12 @@ bool IsImplSidePaintingEnabled() {
return false;
#endif
}
+} // namespace
+
+bool IsImplSidePaintingEnabled() {
+ static bool enabled = CheckImplSidePaintingStatus();
+ return enabled;
+}
bool IsMapImageEnabled() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
« 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