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

Unified Diff: content/renderer/render_view_impl.cc

Issue 9270025: Remove renderer dependencies from the GPU client classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add overrides Created 8 years, 10 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 | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index a23022d868b4d50e97c987b672a53812c5d68694..2489449b08749d39e58df27f96b14f0b0f2b8441 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1502,9 +1502,21 @@ WebGraphicsContext3D* RenderViewImpl::createGraphicsContext3D(
return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
attributes, webview(), direct);
} else {
- scoped_ptr<WebGraphicsContext3D> context(
- new WebGraphicsContext3DCommandBufferImpl());
- if (!context->initialize(attributes, webview(), direct))
+ int surface = direct ? surface_id() : 0;
+
+ GURL url;
+ if (webview()->mainFrame())
+ url = GURL(webview()->mainFrame()->document().url());
+
+ base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client;
+ if (direct)
+ swap_client = AsWeakPtr();
+
+ scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
+ new WebGraphicsContext3DCommandBufferImpl(
+ surface, url, swap_client));
+
+ if (!context->Initialize(attributes))
return NULL;
return context.release();
}
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698