| Index: cc/base/switches.cc
|
| diff --git a/cc/base/switches.cc b/cc/base/switches.cc
|
| index 1fb7ac98e37d6b3b87e1431a530bd25cd16a291e..f425d7be2b05fc3b39508443a5e91cea0d04899b 100644
|
| --- a/cc/base/switches.cc
|
| +++ b/cc/base/switches.cc
|
| @@ -41,8 +41,15 @@ const char kEnableTopControlsPositionCalculation[] =
|
| // impl-side painting.
|
| const char kEnableGPURasterization[] = "enable-gpu-rasterization";
|
|
|
| +// Always use the Skia GPU backend for drawing layer tiles. Only valid with
|
| +// GPU accelerated compositing + impl-side painting. Overrides the
|
| +// kEnableGPURasterization flag.
|
| +const char kEnableUniversalGPURasterization[] =
|
| + "enable-universal-gpu-rasterization";
|
| +
|
| // Disable GPU rasterization, i.e. rasterize on the CPU only.
|
| -// Overrides the kEnableGPURasterization flag.
|
| +// Overrides the kEnableGPURasterization and kEnableUniversalGPURasterization
|
| +// flags.
|
| const char kDisableGPURasterization[] = "disable-gpu-rasterization";
|
|
|
| // The height of the movable top controls.
|
| @@ -165,12 +172,28 @@ bool IsLCDTextEnabled() {
|
| #endif
|
| }
|
|
|
| -bool IsGpuRasterizationEnabled() {
|
| +bool IsHybridGpuRasterizationEnabled() {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| +
|
| + if (command_line.HasSwitch(switches::kDisableGPURasterization))
|
| + return false;
|
| +
|
| + if (command_line.HasSwitch(switches::kEnableUniversalGPURasterization))
|
| + return false;
|
| +
|
| + if (command_line.HasSwitch(switches::kEnableGPURasterization))
|
| + return true;
|
| +
|
| + return false;
|
| +}
|
| +
|
| +bool IsUniversalGpuRasterizationEnabled() {
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
|
|
| if (command_line.HasSwitch(switches::kDisableGPURasterization))
|
| return false;
|
| - else if (command_line.HasSwitch(switches::kEnableGPURasterization))
|
| +
|
| + if (command_line.HasSwitch(switches::kEnableUniversalGPURasterization))
|
| return true;
|
|
|
| return false;
|
|
|