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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 1a7fd5c69525200c0c88babe67c35d807d297b02..0319c85f344bb11a795db012ccae5ad7ab35c59b 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1441,20 +1441,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(

Powered by Google App Engine
This is Rietveld 408576698