summaryrefslogtreecommitdiffstats
path: root/webkit/tools
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/tools
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/tools')
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc15
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h4
2 files changed, 19 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 5c4f652..29c7f97 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -65,6 +65,7 @@
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/weburlrequest_extradata_impl.h"
#include "webkit/glue/window_open_disposition.h"
+#include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
#include "webkit/media/webmediaplayer_impl.h"
#include "webkit/plugins/npapi/webplugin_impl.h"
#include "webkit/plugins/npapi/plugin_list.h"
@@ -97,6 +98,7 @@ using WebKit::WebFileSystem;
using WebKit::WebFileSystemCallbacks;
using WebKit::WebFormElement;
using WebKit::WebFrame;
+using WebKit::WebGraphicsContext3D;
using WebKit::WebHistoryItem;
using WebKit::WebImage;
using WebKit::WebMediaPlayer;
@@ -336,6 +338,19 @@ WebStorageNamespace* TestWebViewDelegate::createSessionStorageNamespace(
WebStorageNamespace::m_sessionStorageQuota);
}
+WebGraphicsContext3D* TestWebViewDelegate::createGraphicsContext3D(
+ WebGraphicsContext3D::Attributes attributes,
+ bool direct) {
+ if (!shell_->webView())
+ return NULL;
+ scoped_ptr<WebGraphicsContext3D> context(
+ new webkit::gpu::WebGraphicsContext3DInProcessImpl(
+ gfx::kNullPluginWindow, NULL));
+ if (!context->initialize(attributes, shell_->webView(), direct))
+ return NULL;
+ return context.release();
+}
+
void TestWebViewDelegate::didAddMessageToConsole(
const WebConsoleMessage& message, const WebString& source_name,
unsigned source_line) {
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index ef5bd4e..d168f94 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -25,6 +25,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsContext3D.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
#include "webkit/tools/test_shell/mock_spellcheck.h"
@@ -89,6 +90,9 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
const WebKit::WebPopupMenuInfo& info);
virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(
unsigned quota);
+ virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D(
+ WebKit::WebGraphicsContext3D::Attributes attributes,
+ bool direct);
virtual void didAddMessageToConsole(
const WebKit::WebConsoleMessage& message,
const WebKit::WebString& source_name, unsigned source_line);