diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 19:21:55 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 19:21:55 +0000 |
commit | 2d7c85529b0210e148d70eb3d0edf485d6521708 (patch) | |
tree | 59152cec5d13a4f91b88ffa8610ca9a82f4fdcce /content/renderer/render_widget.cc | |
parent | be16cf2bcf61a6ac255c347a6ba8c65d213a5a11 (diff) | |
download | chromium_src-2d7c85529b0210e148d70eb3d0edf485d6521708.zip chromium_src-2d7c85529b0210e148d70eb3d0edf485d6521708.tar.gz chromium_src-2d7c85529b0210e148d70eb3d0edf485d6521708.tar.bz2 |
GPU compositing surface handle is no longer sent to renderer process.
Instead it is stored in a map in RenderWidgetHelper indexed by RenderWidgetHost route ID. This allows the UI thread to maintain the mapping as windows are created and destroyed and the IO thread to lookup the mapping in order to create GL contexts that render to the windows.
This avoids a race where JavaScript would open a popup window and immediately try to use an accelerated canvas to render to it (2D canvas or WebGL canvas). <-- This is no longer true of this patch. There was a potential deadlock.
WebGL canvas used to work in this case only because it would fall back to using ReadPixels.
This goes some way to fixing the bug referenced below but does not fix it completely.BUG=80703
Review URL: http://codereview.chromium.org/7136001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90617 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget.cc')
-rw-r--r-- | content/renderer/render_widget.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index ab3443b..5cc8d73 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -88,7 +88,6 @@ RenderWidget::RenderWidget(RenderThreadBase* render_thread, pending_window_rect_count_(0), suppress_next_char_events_(false), is_accelerated_compositing_active_(false), - compositing_surface_(gfx::kNullPluginWindow), animation_update_pending_(false), animation_task_posted_(false), invalidation_task_posted_(false) { @@ -164,12 +163,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_)); } @@ -234,11 +231,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) { + gfx::NativeViewId parent) { DCHECK(routing_id_ != MSG_ROUTING_NONE); - CompleteInit(parent, compositing_surface); + CompleteInit(parent); } void RenderWidget::OnClose() { |