summaryrefslogtreecommitdiffstats
path: root/webkit/support/webkit_support.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 23:39:51 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-20 23:39:51 +0000
commit7e8b4d1d6608a5cbf4ab3c4ac129c85c888f11d8 (patch)
tree8cc75ce7621bfb7785c1dd817c2b911cf363ed4a /webkit/support/webkit_support.cc
parentb17aae95e9bcf2378b6c29f8bb0c6f39fdd15bcd (diff)
downloadchromium_src-7e8b4d1d6608a5cbf4ab3c4ac129c85c888f11d8.zip
chromium_src-7e8b4d1d6608a5cbf4ab3c4ac129c85c888f11d8.tar.gz
chromium_src-7e8b4d1d6608a5cbf4ab3c4ac129c85c888f11d8.tar.bz2
Implement WebViewClient::createGraphicsContext3D (and support for DRT)
This is chrome side of https://bugs.webkit.org/show_bug.cgi?id=76593 This also reverts r118249 BUG=99516 TEST=manually ran Chrome w/accelerated content, DRT, test_shell_tests. Review URL: http://codereview.chromium.org/9254035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118543 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support.cc')
-rw-r--r--webkit/support/webkit_support.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 1b39cb2..7fd6678 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -50,6 +50,8 @@
#include "webkit/glue/webkit_constants.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitplatformsupport_impl.h"
+#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
+#include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
#include "webkit/media/webmediaplayer_impl.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_impl.h"
@@ -366,6 +368,26 @@ GraphicsContext3DImplementation GetGraphicsContext3DImplementation() {
return g_graphics_context_3d_implementation;
}
+WebKit::WebGraphicsContext3D* CreateGraphicsContext3D(
+ WebKit::WebGraphicsContext3D::Attributes attributes,
+ WebKit::WebView* web_view,
+ bool direct) {
+ scoped_ptr<WebKit::WebGraphicsContext3D> context;
+ switch (webkit_support::GetGraphicsContext3DImplementation()) {
+ case webkit_support::IN_PROCESS:
+ context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl(
+ gfx::kNullPluginWindow, NULL));
+ break;
+ case webkit_support::IN_PROCESS_COMMAND_BUFFER:
+ context.reset(
+ new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl());
+ break;
+ }
+ if (!context->initialize(attributes, web_view, direct))
+ return NULL;
+ return context.release();
+}
+
void RegisterMockedURL(const WebKit::WebURL& url,
const WebKit::WebURLResponse& response,
const WebKit::WebString& file_path) {