diff options
Diffstat (limited to 'cc/base/switches.cc')
-rw-r--r-- | cc/base/switches.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/base/switches.cc b/cc/base/switches.cc index dd0fa52..5f405ea 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(); |