From ceb5362e6702443f62a301bbc4ca1593b8fd9859 Mon Sep 17 00:00:00 2001 From: "wjmaclean@chromium.org" Date: Tue, 22 Feb 2011 21:38:12 +0000 Subject: This patch adds the necessary plumbing to Chromium to support a command-line flag for turning on composite-to-texture behaviour. This will facilitate running GPU tests against both composite-to-display and composite-to-texture. BUG=none TEST=none Review URL: http://codereview.chromium.org/6134012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75640 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webpreferences.cc | 4 ++++ webkit/glue/webpreferences.h | 1 + 2 files changed, 5 insertions(+) (limited to 'webkit') diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 25fa0bf..497efd7 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -67,6 +67,7 @@ WebPreferences::WebPreferences() show_composited_layer_borders(false), asynchronous_spell_checking_enabled(true), accelerated_compositing_enabled(false), + composite_to_texture_enabled(false), accelerated_layers_enabled(false), accelerated_video_enabled(false), accelerated_2d_canvas_enabled(false), @@ -165,6 +166,9 @@ void WebPreferences::Apply(WebView* web_view) const { // Enable gpu-accelerated compositing if requested on the command line. settings->setAcceleratedCompositingEnabled(accelerated_compositing_enabled); + // Enable composite to offscreen texture if requested on the command line. + settings->setCompositeToTextureEnabled(composite_to_texture_enabled); + // Enable gpu-accelerated 2d canvas if requested on the command line. settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index c163dc9..1b07b76 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -72,6 +72,7 @@ struct WebPreferences { bool show_composited_layer_borders; bool asynchronous_spell_checking_enabled; bool accelerated_compositing_enabled; + bool composite_to_texture_enabled; bool accelerated_layers_enabled; bool accelerated_video_enabled; bool accelerated_2d_canvas_enabled; -- cgit v1.1