diff options
Diffstat (limited to 'webkit/support/webkit_support.cc')
-rw-r--r-- | webkit/support/webkit_support.cc | 14 |
1 files changed, 14 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) { |