diff options
Diffstat (limited to 'chrome/renderer')
| -rw-r--r-- | chrome/renderer/ggl/ggl.cc | 12 | ||||
| -rw-r--r-- | chrome/renderer/ggl/ggl.h | 1 | ||||
| -rw-r--r-- | chrome/renderer/gpu_channel_host.cc | 9 | ||||
| -rw-r--r-- | chrome/renderer/gpu_channel_host.h | 1 | ||||
| -rw-r--r-- | chrome/renderer/render_widget_fullscreen_pepper.cc | 21 | ||||
| -rw-r--r-- | chrome/renderer/render_widget_fullscreen_pepper.h | 3 | ||||
| -rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc | 26 | ||||
| -rw-r--r-- | chrome/renderer/webgraphicscontext3d_command_buffer_impl.h | 4 |
8 files changed, 10 insertions, 67 deletions
diff --git a/chrome/renderer/ggl/ggl.cc b/chrome/renderer/ggl/ggl.cc index 8dea509..43b6f67 100644 --- a/chrome/renderer/ggl/ggl.cc +++ b/chrome/renderer/ggl/ggl.cc @@ -62,7 +62,7 @@ class Context : public base::SupportsWeakPtr<Context> { // Initialize a GGL context that can be used in association with a a GPU // channel acquired from a RenderWidget or RenderView. - bool Initialize(gfx::NativeViewId view, + bool Initialize(bool onscreen, int render_view_id, const gfx::Size& size, const char* allowed_extensions, @@ -156,7 +156,7 @@ Context::~Context() { Destroy(); } -bool Context::Initialize(gfx::NativeViewId view, +bool Context::Initialize(bool onscreen, int render_view_id, const gfx::Size& size, const char* allowed_extensions, @@ -207,9 +207,8 @@ bool Context::Initialize(gfx::NativeViewId view, } // Create a proxy to a command buffer in the GPU process. - if (view) { + if (onscreen) { command_buffer_ = channel_->CreateViewCommandBuffer( - view, render_view_id, allowed_extensions, attribs); @@ -434,14 +433,13 @@ void Context::OnSwapBuffers() { #endif // ENABLE_GPU Context* CreateViewContext(GpuChannelHost* channel, - gfx::NativeViewId view, int render_view_id, const char* allowed_extensions, const int32* attrib_list) { #if defined(ENABLE_GPU) scoped_ptr<Context> context(new Context(channel, NULL)); if (!context->Initialize( - view, render_view_id, gfx::Size(), allowed_extensions, attrib_list)) + true, render_view_id, gfx::Size(), allowed_extensions, attrib_list)) return NULL; return context.release(); @@ -465,7 +463,7 @@ Context* CreateOffscreenContext(GpuChannelHost* channel, const int32* attrib_list) { #if defined(ENABLE_GPU) scoped_ptr<Context> context(new Context(channel, parent)); - if (!context->Initialize(0, 0, size, allowed_extensions, attrib_list)) + if (!context->Initialize(false, 0, size, allowed_extensions, attrib_list)) return NULL; return context.release(); diff --git a/chrome/renderer/ggl/ggl.h b/chrome/renderer/ggl/ggl.h index dcedcc0..c7402a0 100644 --- a/chrome/renderer/ggl/ggl.h +++ b/chrome/renderer/ggl/ggl.h @@ -80,7 +80,6 @@ bool Terminate(); // TODO(kbr): clean up the arguments to this function and make them // more cross-platform. Context* CreateViewContext(GpuChannelHost* channel, - gfx::NativeViewId view, int render_view_id, const char* allowed_extensions, const int32* attrib_list); diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc index 719e8bf..10b52ed 100644 --- a/chrome/renderer/gpu_channel_host.cc +++ b/chrome/renderer/gpu_channel_host.cc @@ -7,8 +7,10 @@ #include "chrome/common/child_process.h" #include "chrome/common/gpu_create_command_buffer_config.h" #include "chrome/common/gpu_messages.h" +#include "chrome/common/render_messages.h" #include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/gpu_video_service_host.h" +#include "chrome/renderer/render_thread.h" GpuChannelHost::GpuChannelHost() : state_(kUnconnected) { } @@ -90,7 +92,6 @@ bool GpuChannelHost::Send(IPC::Message* message) { } CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( - gfx::NativeViewId view, int render_view_id, const std::string& allowed_extensions, const std::vector<int32>& attribs) { @@ -101,10 +102,8 @@ CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( GPUCreateCommandBufferConfig init_params(allowed_extensions, attribs); int32 route_id; - if (!Send(new GpuChannelMsg_CreateViewCommandBuffer(view, - render_view_id, - init_params, - &route_id))) { + if (!RenderThread::current()->Send(new ViewHostMsg_CreateViewCommandBuffer( + render_view_id, init_params, &route_id))) { return NULL; } diff --git a/chrome/renderer/gpu_channel_host.h b/chrome/renderer/gpu_channel_host.h index 8f14841..e7763f1 100644 --- a/chrome/renderer/gpu_channel_host.h +++ b/chrome/renderer/gpu_channel_host.h @@ -65,7 +65,6 @@ class GpuChannelHost : public IPC::Channel::Listener, // Create and connect to a command buffer in the GPU process. CommandBufferProxy* CreateViewCommandBuffer( - gfx::NativeViewId view, int render_view_id, const std::string& allowed_extensions, const std::vector<int32>& attribs); diff --git a/chrome/renderer/render_widget_fullscreen_pepper.cc b/chrome/renderer/render_widget_fullscreen_pepper.cc index c4b2d50..091a190 100644 --- a/chrome/renderer/render_widget_fullscreen_pepper.cc +++ b/chrome/renderer/render_widget_fullscreen_pepper.cc @@ -162,9 +162,6 @@ RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( webkit::ppapi::PluginInstance* plugin) : RenderWidgetFullscreen(render_thread, WebKit::WebPopupTypeSelect), plugin_(plugin), -#if defined(OS_MACOSX) - plugin_handle_(NULL), -#endif context_(NULL), buffer_(0), program_(0) { @@ -267,16 +264,6 @@ void RenderWidgetFullscreenPepper::CreateContext() { GpuChannelHost* host = render_thread->EstablishGpuChannelSync(); if (!host) return; - gfx::NativeViewId view_id; -#if !defined(OS_MACOSX) - view_id = host_window(); -#else - Send(new ViewHostMsg_AllocateFakePluginWindowHandle( - routing_id(), true, true, &plugin_handle_)); - if (!plugin_handle_) - return; - view_id = static_cast<gfx::NativeViewId>(plugin_handle_); -#endif const int32 attribs[] = { ggl::GGL_ALPHA_SIZE, 8, ggl::GGL_DEPTH_SIZE, 0, @@ -287,7 +274,6 @@ void RenderWidgetFullscreenPepper::CreateContext() { }; context_ = ggl::CreateViewContext( host, - view_id, routing_id(), "GL_OES_packed_depth_stencil GL_OES_depth24", attribs); @@ -314,13 +300,6 @@ void RenderWidgetFullscreenPepper::DestroyContext() { ggl::DestroyContext(context_); context_ = NULL; } -#if defined(OS_MACOSX) - if (plugin_handle_) { - Send(new ViewHostMsg_DestroyFakePluginWindowHandle(routing_id(), - plugin_handle_)); - plugin_handle_ = NULL; - } -#endif } namespace { diff --git a/chrome/renderer/render_widget_fullscreen_pepper.h b/chrome/renderer/render_widget_fullscreen_pepper.h index af3c506..9e201da 100644 --- a/chrome/renderer/render_widget_fullscreen_pepper.h +++ b/chrome/renderer/render_widget_fullscreen_pepper.h @@ -78,9 +78,6 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, // The plugin instance this widget wraps. webkit::ppapi::PluginInstance* plugin_; -#if defined(OS_MACOSX) - gfx::PluginWindowHandle plugin_handle_; -#endif // GL context for compositing. ggl::Context* context_; unsigned int buffer_; diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc index 1d8e5d6..0e97b94 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); diff --git a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.h b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.h index 4d92240..c70c80f 100644 --- a/chrome/renderer/webgraphicscontext3d_command_buffer_impl.h +++ b/chrome/renderer/webgraphicscontext3d_command_buffer_impl.h @@ -387,10 +387,6 @@ class WebGraphicsContext3DCommandBufferImpl ggl::Context* context_; // If rendering directly to WebView, weak pointer to it. WebKit::WebView* web_view_; -#if defined(OS_MACOSX) - // "Fake" plugin window handle in browser process for the compositor's output. - gfx::PluginWindowHandle plugin_handle_; -#endif WebKit::WebGraphicsContext3D::Attributes attributes_; int cached_width_, cached_height_; |
