summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/base/switches.cc3
-rw-r--r--cc/base/switches.h1
-rw-r--r--chrome/browser/chromeos/login/chrome_restart_request.cc1
-rw-r--r--content/browser/browser_url_handler_impl.cc4
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc2
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc3
-rw-r--r--content/public/common/content_switches.cc3
-rw-r--r--content/public/common/content_switches.h1
-rw-r--r--content/renderer/gpu/render_widget_compositor.cc2
-rw-r--r--content/renderer/render_thread_impl.cc2
-rw-r--r--content/renderer/render_widget.cc2
-rw-r--r--ui/compositor/compositor.cc3
12 files changed, 16 insertions, 11 deletions
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 487c5ec..7e45074 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -89,6 +89,9 @@ const char kUIDisablePartialSwap[] = "ui-disable-partial-swap";
const char kEnablePerTilePainting[] = "enable-per-tile-painting";
const char kUIEnablePerTilePainting[] = "ui-enable-per-tile-painting";
+// Enables the GPU benchmarking extension
+const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking";
+
// Renders a border around compositor layers to help debug and study
// layer compositing.
const char kShowCompositedLayerBorders[] = "show-composited-layer-borders";
diff --git a/cc/base/switches.h b/cc/base/switches.h
index 500df71..5821d18 100644
--- a/cc/base/switches.h
+++ b/cc/base/switches.h
@@ -47,6 +47,7 @@ CC_EXPORT extern const char kDisableCompositorTouchHitTesting[];
CC_EXPORT extern const char kUIDisablePartialSwap[];
CC_EXPORT extern const char kEnablePerTilePainting[];
CC_EXPORT extern const char kUIEnablePerTilePainting[];
+CC_EXPORT extern const char kEnableGpuBenchmarking[];
// Debug visualizations.
CC_EXPORT extern const char kShowCompositedLayerBorders[];
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index c19abe6..486125e 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -175,6 +175,7 @@ std::string DeriveCommandLine(const GURL& start_url,
cc::switches::kDisableImplSidePainting,
cc::switches::kDisableMapImage,
cc::switches::kDisableThreadedAnimation,
+ cc::switches::kEnableGpuBenchmarking,
cc::switches::kEnableGPURasterization,
cc::switches::kEnableImplSidePainting,
cc::switches::kEnableMapImage,
diff --git a/content/browser/browser_url_handler_impl.cc b/content/browser/browser_url_handler_impl.cc
index 7c212dc..10a5c88 100644
--- a/content/browser/browser_url_handler_impl.cc
+++ b/content/browser/browser_url_handler_impl.cc
@@ -6,10 +6,10 @@
#include "base/command_line.h"
#include "base/strings/string_util.h"
+#include "cc/base/switches.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/browser/webui/web_ui_impl.h"
#include "content/public/browser/content_browser_client.h"
-#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "url/gurl.h"
@@ -76,7 +76,7 @@ static bool DebugURLHandler(GURL* url, BrowserContext* browser_context) {
// chrome:// scheme, since the about: scheme won't be rewritten in
// this code path.
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGpuBenchmarking)) {
+ cc::switches::kEnableGpuBenchmarking)) {
if (HandleDebugURL(*url, PAGE_TRANSITION_FROM_ADDRESS_BAR)) {
return true;
}
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 6636068..336a702 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1027,7 +1027,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableExperimentalWebPlatformFeatures,
switches::kEnableExperimentalWebSocket,
switches::kEnableFastTextAutosizing,
- switches::kEnableGpuBenchmarking,
switches::kEnableGPUClientLogging,
switches::kEnableGpuClientTracing,
switches::kEnableGPUServiceLogging,
@@ -1108,6 +1107,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
cc::switches::kDisableLCDText,
cc::switches::kDisableMapImage,
cc::switches::kDisableThreadedAnimation,
+ cc::switches::kEnableGpuBenchmarking,
cc::switches::kEnableGPURasterization,
cc::switches::kEnableImplSidePainting,
cc::switches::kEnableLCDText,
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 38ea485..c672afc 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -21,6 +21,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/thread_task_runner_handle.h"
+#include "cc/base/switches.h"
#include "cc/output/compositor_frame.h"
#include "cc/output/compositor_frame_ack.h"
#include "content/browser/accessibility/browser_accessibility_state_impl.h"
@@ -2470,7 +2471,7 @@ void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) {
// This feature is behind the kEnableGpuBenchmarking command line switch
// because it poses security concerns and should only be used for testing.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (!command_line.HasSwitch(switches::kEnableGpuBenchmarking)) {
+ if (!command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking)) {
Send(new ViewMsg_WindowSnapshotCompleted(
GetRoutingID(), snapshot_id, gfx::Size(), png));
return;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 7527d9b..ef179c8 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -465,9 +465,6 @@ const char kEnableFixedPositionCreatesStackingContext[]
// Enable Gesture Tap Highlight
const char kEnableGestureTapHighlight[] = "enable-gesture-tap-highlight";
-// Enables the GPU benchmarking extension
-const char kEnableGpuBenchmarking[] = "enable-gpu-benchmarking";
-
// Enables TRACE for GL calls in the renderer.
const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index fd30ee2..d1ef80f 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -139,7 +139,6 @@ extern const char kEnableFastTextAutosizing[];
CONTENT_EXPORT extern const char kEnableFileCookies[];
CONTENT_EXPORT extern const char kEnableFixedPositionCreatesStackingContext[];
CONTENT_EXPORT extern const char kEnableGestureTapHighlight[];
-extern const char kEnableGpuBenchmarking[];
extern const char kEnableGpuClientTracing[];
CONTENT_EXPORT extern const char kEnableHighDpiCompositingForFixedPosition[];
#if defined(OS_WIN)
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index 54a2d02..1ad2ab1 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -205,7 +205,7 @@ scoped_ptr<RenderWidgetCompositor> RenderWidgetCompositor::Create(
cmd->HasSwitch(cc::switches::kShowNonOccludingRects);
settings.initial_debug_state.SetRecordRenderingStats(
- cmd->HasSwitch(switches::kEnableGpuBenchmarking));
+ cmd->HasSwitch(cc::switches::kEnableGpuBenchmarking));
if (cmd->HasSwitch(cc::switches::kSlowDownRasterScaleFactor)) {
const int kMinSlowDownScaleFactor = 0;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 417edc0..7a8d51d 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -384,7 +384,7 @@ void RenderThreadImpl::Init() {
InitSkiaEventTracer();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kEnableGpuBenchmarking))
+ if (command_line.HasSwitch(cc::switches::kEnableGpuBenchmarking))
RegisterExtension(GpuBenchmarkingExtension::Get());
// Note that under Linux, the media library will normally already have
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index ffcbabe..664d879 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -393,7 +393,7 @@ RenderWidget::RenderWidget(blink::WebPopupType popup_type,
legacy_software_mode_stats_ = cc::RenderingStatsInstrumentation::Create();
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGpuBenchmarking))
+ cc::switches::kEnableGpuBenchmarking))
legacy_software_mode_stats_->set_record_rendering_stats(true);
}
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 46050fe..e662533 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -236,6 +236,9 @@ Compositor::Compositor(gfx::AcceleratedWidget widget)
settings.initial_debug_state.show_non_occluding_rects =
command_line->HasSwitch(cc::switches::kUIShowNonOccludingRects);
+ settings.initial_debug_state.SetRecordRenderingStats(
+ command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
+
base::TimeTicks before_create = base::TimeTicks::Now();
if (!!g_compositor_thread) {
host_ = cc::LayerTreeHost::CreateThreaded(