| Index: cc/base/switches.cc
|
| diff --git a/cc/base/switches.cc b/cc/base/switches.cc
|
| index 1fb7ac98e37d6b3b87e1431a530bd25cd16a291e..53086960cd0149dfb468a9e2272ec181ce52eabc 100644
|
| --- a/cc/base/switches.cc
|
| +++ b/cc/base/switches.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "cc/base/switches.h"
|
|
|
| +#include <string>
|
| +
|
| #include "base/command_line.h"
|
|
|
| namespace cc {
|
| @@ -36,14 +38,11 @@ const char kEnableImplSidePainting[] = "enable-impl-side-painting";
|
| const char kEnableTopControlsPositionCalculation[] =
|
| "enable-top-controls-position-calculation";
|
|
|
| -// Allow heuristics to determine when a layer tile should be drawn with
|
| -// the Skia GPU backend. Only valid with GPU accelerated compositing +
|
| -// 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";
|
| +// Select the location used for drawing layer tiles. Allowed values are
|
| +// 'cpu' (rasterize on the CPU only), 'gpu' (always use the Skia GPU backend
|
| +// for rasterization), and 'hybrid' (use hints and heuristics to determine
|
| +// when to rasterize using the Skia GPU backend).
|
| +const char kRasterizationSite[] = "rasterization-site";
|
|
|
| // The height of the movable top controls.
|
| const char kTopControlsHeight[] = "top-controls-height";
|
| @@ -165,15 +164,18 @@ bool IsLCDTextEnabled() {
|
| #endif
|
| }
|
|
|
| -bool IsGpuRasterizationEnabled() {
|
| +bool IsHybridRasterizationEnabled() {
|
| const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| + std::string rasterization_site =
|
| + command_line.GetSwitchValueASCII(switches::kRasterizationSite);
|
| + return rasterization_site == "hybrid";
|
| +}
|
|
|
| - if (command_line.HasSwitch(switches::kDisableGPURasterization))
|
| - return false;
|
| - else if (command_line.HasSwitch(switches::kEnableGPURasterization))
|
| - return true;
|
| -
|
| - return false;
|
| +bool IsGpuRasterizationEnabled() {
|
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
| + std::string rasterization_site =
|
| + command_line.GetSwitchValueASCII(switches::kRasterizationSite);
|
| + return rasterization_site == "gpu";
|
| }
|
|
|
| bool IsImplSidePaintingEnabled() {
|
|
|