summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_view_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r--content/renderer/render_view_impl.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 240d426..767523e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1493,20 +1493,16 @@ WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D(
// The WebGraphicsContext3DInProcessImpl code path is used for
// layout tests (though not through this code) as well as for
// debugging and bringing up new ports.
- scoped_ptr<WebGraphicsContext3D> context;
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) {
- context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl(
- gfx::kNullPluginWindow, NULL));
+ return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
+ attributes, webview(), direct);
} else {
-#if defined(ENABLE_GPU)
- context.reset(new WebGraphicsContext3DCommandBufferImpl());
-#else
- return NULL;
-#endif
+ scoped_ptr<WebGraphicsContext3D> context(
+ new WebGraphicsContext3DCommandBufferImpl());
+ if (!context->initialize(attributes, webview(), direct))
+ return NULL;
+ return context.release();
}
- if (!context->initialize(attributes, webview(), direct))
- return NULL;
- return context.release();
}
void RenderViewImpl::didAddMessageToConsole(