diff options
Diffstat (limited to 'content')
21 files changed, 22 insertions, 81 deletions
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc index 5fa10ad..9902a96 100644 --- a/content/browser/renderer_host/gpu_message_filter.cc +++ b/content/browser/renderer_host/gpu_message_filter.cc @@ -205,7 +205,6 @@ void GpuMessageFilter::OnSynchronizeGpu(IPC::Message* reply) { } void GpuMessageFilter::OnCreateViewCommandBuffer( - gfx::PluginWindowHandle compositing_surface, int32 render_view_id, const GPUCreateCommandBufferConfig& init_params, IPC::Message* reply) { @@ -220,7 +219,6 @@ void GpuMessageFilter::OnCreateViewCommandBuffer( } ui_shim->CreateViewCommandBuffer( - compositing_surface, render_view_id, render_process_id_, init_params, diff --git a/content/browser/renderer_host/gpu_message_filter.h b/content/browser/renderer_host/gpu_message_filter.h index c8e8ada..34e75f1 100644 --- a/content/browser/renderer_host/gpu_message_filter.h +++ b/content/browser/renderer_host/gpu_message_filter.h @@ -8,7 +8,6 @@ #include "content/browser/browser_message_filter.h" #include "content/common/gpu_process_launch_causes.h" -#include "ui/gfx/native_widget_types.h" class GpuProcessHost; class GpuProcessHostUIShim; @@ -43,7 +42,6 @@ class GpuMessageFilter : public BrowserMessageFilter, void OnEstablishGpuChannel(content::CauseForGpuLaunch); void OnSynchronizeGpu(IPC::Message* reply); void OnCreateViewCommandBuffer( - gfx::PluginWindowHandle compositing_surface, int32 render_view_id, const GPUCreateCommandBufferConfig& init_params, IPC::Message* reply); diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index f0c1824..920d462 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -167,7 +167,6 @@ bool RenderViewHost::CreateRenderView(const string16& frame_name) { ViewMsg_New_Params params; params.parent_window = GetNativeViewId(); - params.compositing_surface = GetCompositingSurface(); params.renderer_preferences = delegate_->GetRendererPrefs(process()->profile()); params.web_preferences = delegate_->GetWebkitPrefs(); diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc index d7ad0b5..57004c9 100644 --- a/content/browser/renderer_host/render_widget_host.cc +++ b/content/browser/renderer_host/render_widget_host.cc @@ -122,12 +122,6 @@ gfx::NativeViewId RenderWidgetHost::GetNativeViewId() { return 0; } -gfx::PluginWindowHandle RenderWidgetHost::GetCompositingSurface() { - if (view_) - return view_->GetCompositingSurface(); - return gfx::kNullPluginWindow; -} - bool RenderWidgetHost::PreHandleKeyboardEvent( const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { @@ -140,8 +134,7 @@ void RenderWidgetHost::Init() { renderer_initialized_ = true; // Send the ack along with the information on placement. - Send(new ViewMsg_CreatingNew_ACK( - routing_id_, GetNativeViewId(), GetCompositingSurface())); + Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId())); WasResized(); } diff --git a/content/browser/renderer_host/render_widget_host.h b/content/browser/renderer_host/render_widget_host.h index ab5aa91..9ed7ccd 100644 --- a/content/browser/renderer_host/render_widget_host.h +++ b/content/browser/renderer_host/render_widget_host.h @@ -413,10 +413,6 @@ class RenderWidgetHost : public IPC::Channel::Listener, // This is used for various IPC messages, including plugins. gfx::NativeViewId GetNativeViewId(); - // Retrieves an id for the surface that the renderer can draw to - // when accelerated compositing is enabled. - gfx::PluginWindowHandle GetCompositingSurface(); - // Called to handled a keyboard event before sending it to the renderer. // This is overridden by RenderView to send upwards to its delegate. // Returns true if the event was handled, and then the keyboard event will diff --git a/content/browser/renderer_host/render_widget_host_view.h b/content/browser/renderer_host/render_widget_host_view.h index 76c1db4..5d4cf69 100644 --- a/content/browser/renderer_host/render_widget_host_view.h +++ b/content/browser/renderer_host/render_widget_host_view.h @@ -270,7 +270,8 @@ class RenderWidgetHostView { virtual void ShowCompositorHostWindow(bool show) = 0; #endif - virtual gfx::PluginWindowHandle GetCompositingSurface() = 0; + virtual gfx::PluginWindowHandle AcquireCompositingSurface() = 0; + virtual void ReleaseCompositingSurface(gfx::PluginWindowHandle surface) = 0; // Toggles visual muting of the render view area. This is on when a // constrained window is showing, for example. |color| is the shade of diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index 394d447..6eba441 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -242,7 +242,7 @@ void TestRenderWidgetHostView::ShowCompositorHostWindow(bool show) { } #endif -gfx::PluginWindowHandle TestRenderWidgetHostView::GetCompositingSurface() { +gfx::PluginWindowHandle TestRenderWidgetHostView::AcquireCompositingSurface() { return gfx::kNullPluginWindow; } diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index a860806..4326529 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -141,7 +141,8 @@ class TestRenderWidgetHostView : public RenderWidgetHostView { virtual void AcceleratedCompositingActivated(bool activated) { } #endif - virtual gfx::PluginWindowHandle GetCompositingSurface(); + virtual gfx::PluginWindowHandle AcquireCompositingSurface(); + virtual void ReleaseCompositingSurface(gfx::PluginWindowHandle surface) { } virtual bool ContainsNativeView(gfx::NativeView native_view) const; diff --git a/content/common/gpu_messages.h b/content/common/gpu_messages.h index 73fad10..88fab8a 100644 --- a/content/common/gpu_messages.h +++ b/content/common/gpu_messages.h @@ -152,7 +152,7 @@ IPC_MESSAGE_CONTROL3(GpuMsg_VisibilityChanged, // Tells the GPU process to create a new command buffer that renders directly // to a native view. A corresponding GpuCommandBufferStub is created. IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, - gfx::PluginWindowHandle, /* compositing_surface */ + gfx::PluginWindowHandle, /* view */ int32, /* render_view_id */ int32, /* renderer_id */ GPUCreateCommandBufferConfig /* init_params */) @@ -210,8 +210,7 @@ IPC_SYNC_MESSAGE_CONTROL0_0(GpuHostMsg_SynchronizeGpu) // A renderer sends this to the browser process when it wants to // create a GL context associated with the given view_id. -IPC_SYNC_MESSAGE_CONTROL3_1(GpuHostMsg_CreateViewCommandBuffer, - gfx::PluginWindowHandle, /* view */ +IPC_SYNC_MESSAGE_CONTROL2_1(GpuHostMsg_CreateViewCommandBuffer, int32, /* render_view_id */ GPUCreateCommandBufferConfig, /* init_params */ int32 /* route_id */) diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 140267e..86e2328 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -710,9 +710,6 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params) // The parent window's id. IPC_STRUCT_MEMBER(gfx::NativeViewId, parent_window) - // Surface for accelerated rendering. - IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, compositing_surface) - // Renderer-wide preferences. IPC_STRUCT_MEMBER(RendererPreferences, renderer_preferences) @@ -760,9 +757,8 @@ IPC_MESSAGE_CONTROL1(ViewMsg_New, // Reply in response to ViewHostMsg_ShowView or ViewHostMsg_ShowWidget. // similar to the new command, but used when the renderer created a view // first, and we need to update it. -IPC_MESSAGE_ROUTED2(ViewMsg_CreatingNew_ACK, - gfx::NativeViewId /* parent_hwnd */, - gfx::PluginWindowHandle /* compositing_surface */) +IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, + gfx::NativeViewId /* parent_hwnd */) // Sends updated preferences to the renderer. IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, diff --git a/content/renderer/gpu_channel_host.cc b/content/renderer/gpu_channel_host.cc index 97fd549..7630462 100644 --- a/content/renderer/gpu_channel_host.cc +++ b/content/renderer/gpu_channel_host.cc @@ -101,7 +101,6 @@ bool GpuChannelHost::Send(IPC::Message* message) { } CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( - gfx::PluginWindowHandle compositing_surface, int render_view_id, const std::string& allowed_extensions, const std::vector<int32>& attribs, @@ -118,7 +117,7 @@ CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( int32 route_id; if (!RenderThread::current()->Send( new GpuHostMsg_CreateViewCommandBuffer( - compositing_surface, render_view_id, init_params, &route_id))) { + render_view_id, init_params, &route_id))) { return NULL; } diff --git a/content/renderer/gpu_channel_host.h b/content/renderer/gpu_channel_host.h index 4e50881..fa1d60d 100644 --- a/content/renderer/gpu_channel_host.h +++ b/content/renderer/gpu_channel_host.h @@ -67,7 +67,6 @@ class GpuChannelHost : public IPC::Channel::Listener, // Create and connect to a command buffer in the GPU process. CommandBufferProxy* CreateViewCommandBuffer( - gfx::PluginWindowHandle compositing_surface, int render_view_id, const std::string& allowed_extensions, const std::vector<int32>& attribs, diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc index 1a77c3f..625ebbc 100644 --- a/content/renderer/render_thread.cc +++ b/content/renderer/render_thread.cc @@ -428,7 +428,6 @@ void RenderThread::OnCreateNewView(const ViewMsg_New_Params& params) { RenderView::Create( this, params.parent_window, - params.compositing_surface, MSG_ROUTING_NONE, params.renderer_preferences, params.web_preferences, diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc index 8065f5a..ec7bb75 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view.cc @@ -345,7 +345,6 @@ struct RenderView::PendingFileChooser { RenderView::RenderView(RenderThreadBase* render_thread, gfx::NativeViewId parent_hwnd, - gfx::PluginWindowHandle compositing_surface, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, @@ -415,7 +414,7 @@ RenderView::RenderView(RenderThreadBase* render_thread, // completing initialization. Otherwise, we can finish it now. if (opener_id == MSG_ROUTING_NONE) { did_show_ = true; - CompleteInit(parent_hwnd, compositing_surface); + CompleteInit(parent_hwnd); } host_window_ = parent_hwnd; @@ -489,7 +488,6 @@ RenderView* RenderView::FromWebView(WebView* webview) { RenderView* RenderView::Create( RenderThreadBase* render_thread, gfx::NativeViewId parent_hwnd, - gfx::PluginWindowHandle compositing_surface, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, @@ -501,7 +499,6 @@ RenderView* RenderView::Create( return new RenderView( render_thread, parent_hwnd, - compositing_surface, opener_id, renderer_prefs, webkit_prefs, @@ -1271,7 +1268,6 @@ WebView* RenderView::createView( RenderView* view = RenderView::Create(render_thread_, 0, - gfx::kNullPluginWindow, routing_id_, renderer_preferences_, webkit_preferences_, diff --git a/content/renderer/render_view.h b/content/renderer/render_view.h index 3363cac..3292a37 100644 --- a/content/renderer/render_view.h +++ b/content/renderer/render_view.h @@ -176,7 +176,6 @@ class RenderView : public RenderWidget, static RenderView* Create( RenderThreadBase* render_thread, gfx::NativeViewId parent_hwnd, - gfx::PluginWindowHandle compositing_surface, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, @@ -662,7 +661,6 @@ class RenderView : public RenderWidget, RenderView(RenderThreadBase* render_thread, gfx::NativeViewId parent_hwnd, - gfx::PluginWindowHandle compositing_surface, int32 opener_id, const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 26f3f99..8cd6f35 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -148,12 +148,10 @@ void RenderWidget::DoInit(int32 opener_id, // This is used to complete pending inits and non-pending inits. For non- // pending cases, the parent will be the same as the current parent. This // indicates we do not need to reparent or anything. -void RenderWidget::CompleteInit(gfx::NativeViewId parent_hwnd, - gfx::PluginWindowHandle compositing_surface) { +void RenderWidget::CompleteInit(gfx::NativeViewId parent_hwnd) { DCHECK(routing_id_ != MSG_ROUTING_NONE); host_window_ = parent_hwnd; - compositing_surface_ = compositing_surface; Send(new ViewHostMsg_RenderViewReady(routing_id_)); } @@ -198,12 +196,10 @@ bool RenderWidget::Send(IPC::Message* message) { // Got a response from the browser after the renderer decided to create a new // view. -void RenderWidget::OnCreatingNewAck( - gfx::NativeViewId parent, - gfx::PluginWindowHandle compositing_surface) { +void RenderWidget::OnCreatingNewAck(gfx::NativeViewId parent) { DCHECK(routing_id_ != MSG_ROUTING_NONE); - CompleteInit(parent, compositing_surface); + CompleteInit(parent); } void RenderWidget::OnClose() { diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 63580c7..b6cf16e 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -74,13 +74,6 @@ class RenderWidget : public IPC::Channel::Listener, // Creates a WebWidget based on the popup type. static WebKit::WebWidget* CreateWebWidget(RenderWidget* render_widget); - // The compositing surface assigned by the RenderWidgetHost - // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet, - // in which case we should not create any GPU command buffers with it. - gfx::PluginWindowHandle compositing_surface() const { - return compositing_surface_; - } - // The routing ID assigned by the RenderProcess. Will be MSG_ROUTING_NONE if // not yet assigned a view ID, in which case, the process MUST NOT send // messages with this ID to the parent. @@ -151,8 +144,7 @@ class RenderWidget : public IPC::Channel::Listener, IPC::SyncMessage* create_widget_message); // Finishes creation of a pending view started with Init. - void CompleteInit(gfx::NativeViewId parent, - gfx::PluginWindowHandle compositing_surface); + void CompleteInit(gfx::NativeViewId parent); // Paints the given rectangular region of the WebWidget into canvas (a // shared memory segment returned by AllocPaintBuf on Windows). The caller @@ -177,8 +169,7 @@ class RenderWidget : public IPC::Channel::Listener, // RenderWidget IPC message handlers void OnClose(); - void OnCreatingNewAck(gfx::NativeViewId parent, - gfx::PluginWindowHandle compositing_surface); + void OnCreatingNewAck(gfx::NativeViewId parent); virtual void OnResize(const gfx::Size& new_size, const gfx::Rect& resizer_rect); virtual void OnWasHidden(); @@ -376,10 +367,6 @@ class RenderWidget : public IPC::Channel::Listener, // compositor. bool is_accelerated_compositing_active_; - // Handle to a surface that is drawn to when accelerated compositing is - // active. - gfx::PluginWindowHandle compositing_surface_; - base::Time animation_floor_time_; bool animation_update_pending_; bool animation_task_posted_; diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index bbe80bc..d3e2e20 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc @@ -318,7 +318,6 @@ void RenderWidgetFullscreenPepper::CreateContext() { }; context_ = RendererGLContext::CreateViewContext( host, - compositing_surface(), routing_id(), "GL_OES_packed_depth_stencil GL_OES_depth24", attribs, diff --git a/content/renderer/renderer_gl_context.cc b/content/renderer/renderer_gl_context.cc index 3e8612d..f913a3b 100644 --- a/content/renderer/renderer_gl_context.cc +++ b/content/renderer/renderer_gl_context.cc @@ -156,7 +156,6 @@ RendererGLContext::~RendererGLContext() { RendererGLContext* RendererGLContext::CreateViewContext( GpuChannelHost* channel, - gfx::PluginWindowHandle render_surface, int render_view_id, const char* allowed_extensions, const int32* attrib_list, @@ -165,7 +164,6 @@ RendererGLContext* RendererGLContext::CreateViewContext( scoped_ptr<RendererGLContext> context(new RendererGLContext(channel, NULL)); if (!context->Initialize( true, - render_surface, render_view_id, gfx::Size(), allowed_extensions, @@ -198,7 +196,6 @@ RendererGLContext* RendererGLContext::CreateOffscreenContext( scoped_ptr<RendererGLContext> context(new RendererGLContext(channel, parent)); if (!context->Initialize( false, - gfx::kNullPluginWindow, 0, size, allowed_extensions, @@ -369,7 +366,6 @@ RendererGLContext::RendererGLContext(GpuChannelHost* channel, } bool RendererGLContext::Initialize(bool onscreen, - gfx::PluginWindowHandle render_surface, int render_view_id, const gfx::Size& size, const char* allowed_extensions, @@ -422,17 +418,11 @@ bool RendererGLContext::Initialize(bool onscreen, // Create a proxy to a command buffer in the GPU process. if (onscreen) { - if (render_surface == gfx::kNullPluginWindow) { - LOG(ERROR) << "Invalid surface handle for onscreen context."; - command_buffer_ = NULL; - } else { - command_buffer_ = channel_->CreateViewCommandBuffer( - render_surface, - render_view_id, - allowed_extensions, - attribs, - active_url); - } + command_buffer_ = channel_->CreateViewCommandBuffer( + render_view_id, + allowed_extensions, + attribs, + active_url); } else { CommandBufferProxy* parent_command_buffer = parent_.get() ? parent_->command_buffer_ : NULL; diff --git a/content/renderer/renderer_gl_context.h b/content/renderer/renderer_gl_context.h index 26a6d00..a40f5e1 100644 --- a/content/renderer/renderer_gl_context.h +++ b/content/renderer/renderer_gl_context.h @@ -91,7 +91,6 @@ class RendererGLContext : public base::SupportsWeakPtr<RendererGLContext> { // more cross-platform. static RendererGLContext* CreateViewContext( GpuChannelHost* channel, - gfx::PluginWindowHandle render_surface, int render_view_id, const char* allowed_extensions, const int32* attrib_list, @@ -206,7 +205,6 @@ class RendererGLContext : public base::SupportsWeakPtr<RendererGLContext> { RendererGLContext* parent); bool Initialize(bool onscreen, - gfx::PluginWindowHandle render_surface, int render_view_id, const gfx::Size& size, const char* allowed_extensions, diff --git a/content/renderer/webgraphicscontext3d_command_buffer_impl.cc b/content/renderer/webgraphicscontext3d_command_buffer_impl.cc index 2ff2b98..57a66fa 100644 --- a/content/renderer/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/renderer/webgraphicscontext3d_command_buffer_impl.cc @@ -100,7 +100,6 @@ bool WebGraphicsContext3DCommandBufferImpl::initialize( web_view_ = web_view; context_ = RendererGLContext::CreateViewContext( host, - renderview->compositing_surface(), renderview->routing_id(), kWebGraphicsContext3DPerferredGLExtensions, attribs, |