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

Unified Diff: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 9 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 | « chrome/renderer/webgraphicscontext3d_command_buffer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
index 1d8e5d673a3538f7b715ada192cc027251a7dada..0e97b943599b68dc58bb13ca99092e6d04bd2d24 100644
--- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
+++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc
@@ -27,9 +27,6 @@
WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl()
: context_(NULL),
web_view_(NULL),
-#if defined(OS_MACOSX)
- plugin_handle_(NULL),
-#endif // defined(OS_MACOSX)
cached_width_(0),
cached_height_(0),
bound_fbo_(0) {
@@ -37,19 +34,6 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl()
WebGraphicsContext3DCommandBufferImpl::
~WebGraphicsContext3DCommandBufferImpl() {
-#if defined(OS_MACOSX)
- if (web_view_) {
- DCHECK(plugin_handle_ != gfx::kNullPluginWindow);
- RenderView* renderview = RenderView::FromWebView(web_view_);
- // The RenderView might already have been freed, but in its
- // destructor it destroys all fake plugin window handles it
- // allocated.
- if (renderview) {
- renderview->DestroyFakePluginWindowHandle(plugin_handle_);
- }
- plugin_handle_ = gfx::kNullPluginWindow;
- }
-#endif
if (context_) {
ggl::DestroyContext(context_);
}
@@ -101,18 +85,10 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize(
RenderView* renderview = RenderView::FromWebView(web_view);
if (!renderview)
return false;
- gfx::NativeViewId view_id;
-#if !defined(OS_MACOSX)
- view_id = renderview->host_window();
-#else
- plugin_handle_ = renderview->AllocateFakePluginWindowHandle(
- /*opaque=*/true, /*root=*/true);
- view_id = static_cast<gfx::NativeViewId>(plugin_handle_);
-#endif
+
web_view_ = web_view;
context_ = ggl::CreateViewContext(
host,
- view_id,
renderview->routing_id(),
kWebGraphicsContext3DPerferredGLExtensions,
attribs);
« no previous file with comments | « chrome/renderer/webgraphicscontext3d_command_buffer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698