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

Unified Diff: webkit/support/test_webkit_platform_support.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows build 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/test_webkit_platform_support.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/test_webkit_platform_support.cc
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index 7b99f166115d423a770132f9b0067990016b78ff..f811083e20bd8fb36365da73293f5d8ab702184c 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -374,36 +374,22 @@ TestWebKitPlatformSupport::sharedWorkerRepository() {
}
WebKit::WebGraphicsContext3D*
-TestWebKitPlatformSupport::createGraphicsContext3D() {
- switch (webkit_support::GetGraphicsContext3DImplementation()) {
- case webkit_support::IN_PROCESS:
- return new webkit::gpu::WebGraphicsContext3DInProcessImpl(
- gfx::kNullPluginWindow, NULL);
- case webkit_support::IN_PROCESS_COMMAND_BUFFER:
- return new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl();
- default:
- CHECK(false) << "Unknown GraphicsContext3D Implementation";
- return NULL;
- }
-}
-
-WebKit::WebGraphicsContext3D*
TestWebKitPlatformSupport::createOffscreenGraphicsContext3D(
const WebKit::WebGraphicsContext3D::Attributes& attributes) {
- 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(
+ return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
+ attributes, NULL, false);
+ case webkit_support::IN_PROCESS_COMMAND_BUFFER: {
+ scoped_ptr<WebKit::WebGraphicsContext3D> context(
new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl());
- break;
+ if (!context->initialize(attributes, NULL, false))
+ return NULL;
+ return context.release();
+ }
}
- if (!context->initialize(attributes, NULL, false))
- return NULL;
- return context.release();
+ NOTREACHED();
+ return NULL;
}
double TestWebKitPlatformSupport::audioHardwareSampleRate() {
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698