summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authorscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 18:08:24 +0000
committerscheib@chromium.org <scheib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-13 18:08:24 +0000
commit6c4d215ecd29ac00a618fdff5477c0184ccf1b6c (patch)
tree932579689c8df46042dbe4ee97a00a1888e712a2 /webkit/support
parent3194fecde886beeb3b78a7108fb291852389f182 (diff)
downloadchromium_src-6c4d215ecd29ac00a618fdff5477c0184ccf1b6c.zip
chromium_src-6c4d215ecd29ac00a618fdff5477c0184ccf1b6c.tar.gz
chromium_src-6c4d215ecd29ac00a618fdff5477c0184ccf1b6c.tar.bz2
Add support for DumpRenderTree to use the GPU rather than software renderer
BUG=68797 TEST=previous buildbots test old path, new buildbots will test the GPU path Support for webkit side changes: https://bugs.webkit.org/show_bug.cgi?id=52333 Review URL: http://codereview.chromium.org/6258001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/webkit_support.cc14
-rw-r--r--webkit/support/webkit_support.h6
2 files changed, 20 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 52a2a34..8a76c1f 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -4,6 +4,7 @@
#include "webkit/support/webkit_support.h"
+#include "app/gfx/gl/gl_context.h"
#include "app/gfx/gl/gl_implementation.h"
#include "base/at_exit.h"
#include "base/base64.h"
@@ -290,6 +291,19 @@ WebKit::WebString GetWebKitRootDir() {
return WebKit::WebString::fromUTF8(WideToUTF8(path.ToWStringHack()).c_str());
}
+void SetUpGLBindings(GLBindingPreferences bindingPref) {
+ switch(bindingPref) {
+ case GL_BINDING_DEFAULT:
+ gfx::GLContext::InitializeOneOff();
+ break;
+ case GL_BINDING_SOFTWARE_RENDERER:
+ gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
+ break;
+ default:
+ NOTREACHED();
+ }
+}
+
void RegisterMockedURL(const WebKit::WebURL& url,
const WebKit::WebURLResponse& response,
const WebKit::WebString& file_path) {
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h
index 9150e0a..7ee4809 100644
--- a/webkit/support/webkit_support.h
+++ b/webkit/support/webkit_support.h
@@ -75,6 +75,12 @@ WebKit::WebApplicationCacheHost* CreateApplicationCacheHost(
// Returns the root directory of the WebKit code.
WebKit::WebString GetWebKitRootDir();
+enum GLBindingPreferences {
+ GL_BINDING_DEFAULT,
+ GL_BINDING_SOFTWARE_RENDERER
+};
+void SetUpGLBindings(GLBindingPreferences);
+
// ------- URL load mocking.
// Registers the file at |file_path| to be served when |url| is requested.
// |response| is the response provided with the contents.