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(); |