summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 06:34:32 +0000
committerernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 06:34:32 +0000
commit547d5010e60072a1e052fcf8e81caeeb5faf8b29 (patch)
treefc89122ad8e925453d9554d75fec54aa604162c7
parent5339e0ebae0489419102165ba380b72f91ffde1a (diff)
downloadchromium_src-547d5010e60072a1e052fcf8e81caeeb5faf8b29.zip
chromium_src-547d5010e60072a1e052fcf8e81caeeb5faf8b29.tar.gz
chromium_src-547d5010e60072a1e052fcf8e81caeeb5faf8b29.tar.bz2
telemetry: add smoothness.*.key_silk_cases benchmarks
Add two benchmark variants of smoothness with key_silk_cases. smoothness.disable_gpu_rasterization.key_silk_cases: run with GPU rasterization explicitly diabled (but use impl-side painting) smoothness.enable_gpu_rasterization.key_silk_cases: run with GPU rasterization enabled (implies impl-side painting). R=nduca@chromium.org BUG= Review URL: https://codereview.chromium.org/135223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245440 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/base/switches.cc15
-rw-r--r--cc/base/switches.h2
-rw-r--r--chrome/browser/chromeos/login/chrome_restart_request.cc1
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc3
-rw-r--r--tools/perf/benchmarks/smoothness.py27
6 files changed, 47 insertions, 2 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();
diff --git a/cc/base/switches.h b/cc/base/switches.h
index 476457f..a8c061d 100644
--- a/cc/base/switches.h
+++ b/cc/base/switches.h
@@ -18,6 +18,7 @@ namespace switches {
// Switches for the renderer compositor only.
CC_EXPORT extern const char kBackgroundColorInsteadOfCheckerboard[];
CC_EXPORT extern const char kDisableLCDText[];
+CC_EXPORT extern const char kDisableGPURasterization[];
CC_EXPORT extern const char kDisableImplSidePainting[];
CC_EXPORT extern const char kDisableThreadedAnimation[];
CC_EXPORT extern const char kDisableCompositedAntialiasing[];
@@ -73,6 +74,7 @@ CC_EXPORT extern const char kCCLayerTreeTestNoTimeout[];
CC_EXPORT extern const char kCCRebaselinePixeltests[];
CC_EXPORT bool IsLCDTextEnabled();
+CC_EXPORT bool IsGpuRasterizationEnabled();
CC_EXPORT bool IsImplSidePaintingEnabled();
CC_EXPORT bool IsMapImageEnabled();
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index 6799168..cac98ce 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -168,6 +168,7 @@ std::string DeriveCommandLine(const GURL& start_url,
cc::switches::kCompositeToMailbox,
cc::switches::kDisableCompositedAntialiasing,
cc::switches::kDisableCompositorTouchHitTesting,
+ cc::switches::kDisableGPURasterization,
cc::switches::kDisableImplSidePainting,
cc::switches::kDisableMapImage,
cc::switches::kDisableThreadedAnimation,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 317f979b..cf63b96 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1094,6 +1094,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
cc::switches::kCompositeToMailbox,
cc::switches::kDisableCompositedAntialiasing,
cc::switches::kDisableCompositorTouchHitTesting,
+ cc::switches::kDisableGPURasterization,
cc::switches::kDisableImplSidePainting,
cc::switches::kDisableLCDText,
cc::switches::kDisableMapImage,
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 5038674..80f2fc1 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -131,8 +131,7 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
max_untiled_layer_height);
settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled();
- settings.gpu_rasterization =
- cmd->HasSwitch(cc::switches::kEnableGPURasterization);
+ settings.gpu_rasterization = cc::switches::IsGpuRasterizationEnabled();
settings.calculate_top_controls_position =
cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
diff --git a/tools/perf/benchmarks/smoothness.py b/tools/perf/benchmarks/smoothness.py
index c665737..352ac3e 100644
--- a/tools/perf/benchmarks/smoothness.py
+++ b/tools/perf/benchmarks/smoothness.py
@@ -34,3 +34,30 @@ class SmoothnessKeyMobileSites(test.Test):
class SmoothnessToughAnimationCases(test.Test):
test = smoothness.Smoothness
page_set = 'page_sets/tough_animation_cases.json'
+
+
+class SmoothnessThreadedRasterizationKeySilkCases(test.Test):
+ """Measures rendering statistics for the key silk cases without GPU
+ rasterization
+ """
+ tag = 'disable_gpu_rasterization'
+ test = smoothness.Smoothness
+ page_set = 'page_sets/key_silk_cases.json'
+ def CustomizeBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs('--enable-threaded-compositing')
+ options.AppendExtraBrowserArgs('--force-compositing-mode')
+ options.AppendExtraBrowserArgs('--enable-impl-side-painting')
+ options.AppendExtraBrowserArgs('--disable-gpu-rasterization')
+
+
+class SmoothnessGpuRasterizationKeySilkCases(test.Test):
+ """Measures rendering statistics for the key silk cases with GPU rasterization
+ """
+ tag = 'enable_gpu_rasterization'
+ test = smoothness.Smoothness
+ page_set = 'page_sets/key_silk_cases.json'
+ def CustomizeBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs('--enable-threaded-compositing')
+ options.AppendExtraBrowserArgs('--force-compositing-mode')
+ options.AppendExtraBrowserArgs('--enable-impl-side-painting')
+ options.AppendExtraBrowserArgs('--enable-gpu-rasterization')