Index: cc/base/switches.cc |
diff --git a/cc/base/switches.cc b/cc/base/switches.cc |
index dd0fa524dc0f3403c9997d15fe94dd8d139a6821..5f405ea082e334350f478c042d2b920c447000f9 100644 |
--- a/cc/base/switches.cc |
+++ b/cc/base/switches.cc |
@@ -41,6 +41,10 @@ const char kEnableTopControlsPositionCalculation[] = |
// impl-side painting. |
const char kEnableGPURasterization[] = "enable-gpu-rasterization"; |
+// Disable GPU rasterization, i.e. rasterize on the CPU only. |
+// Overrides the kEnableGPURasterization flag. |
+const char kDisableGPURasterization[] = "disable-gpu-rasterization"; |
+ |
// The height of the movable top controls. |
const char kTopControlsHeight[] = "top-controls-height"; |
@@ -165,6 +169,17 @@ bool IsLCDTextEnabled() { |
#endif |
} |
+bool IsGpuRasterizationEnabled() { |
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
+ |
+ if (command_line.HasSwitch(switches::kDisableGPURasterization)) |
+ return false; |
+ else if (command_line.HasSwitch(switches::kEnableGPURasterization)) |
+ return true; |
+ |
+ return false; |
+} |
+ |
bool IsImplSidePaintingEnabled() { |
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |