Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: webkit/support/webkit_support.cc

Issue 9254035: Implement WebViewClient::createGraphicsContext3D (and support for DRT) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove web_view parameter Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/webkit_support.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/webkit_support.cc
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 1b39cb2218576b9a331c52a690c651c150b29fe2..7fd667835d7b9936a5fd45a0e9a74ac0f4b77e8b 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) {
« no previous file with comments | « webkit/support/webkit_support.h ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698