diff options
author | kenrb <kenrb@chromium.org> | 2015-05-14 08:05:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-14 15:06:17 +0000 |
commit | b4e2a3bbaabf98abf089396e7ce375b58fa8dfcd (patch) | |
tree | be62ebc4e771d4554735527d36b914dc84d38e08 /content/browser/renderer_host/render_widget_host_impl.cc | |
parent | 14defc6866693aa3dfceed796cd94d788e9f3122 (diff) | |
download | chromium_src-b4e2a3bbaabf98abf089396e7ce375b58fa8dfcd.zip chromium_src-b4e2a3bbaabf98abf089396e7ce375b58fa8dfcd.tar.gz chromium_src-b4e2a3bbaabf98abf089396e7ce375b58fa8dfcd.tar.bz2 |
Pass Surface ID namespace to renderer compositors.
In order to enable renderer processes to create SurfaceSequences, they
have to receive Surface ID namespaces from the browser process so that
they can avoid collisions.
BUG=478802
Committed: https://crrev.com/c7a5afd66499fc8442e1b3146f55b227638934d8
Cr-Commit-Position: refs/heads/master@{#329708}
Review URL: https://codereview.chromium.org/1129883003
Cr-Commit-Position: refs/heads/master@{#329852}
Diffstat (limited to 'content/browser/renderer_host/render_widget_host_impl.cc')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_impl.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 812a1d7..41245f2 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -321,6 +321,13 @@ void RenderWidgetHostImpl::SetView(RenderWidgetHostViewBase* view) { view_weak_.reset(); view_ = view; + // If the renderer has not yet been initialized, then the surface ID + // namespace will be sent during initialization. + if (view_ && renderer_initialized_) { + Send(new ViewMsg_SetSurfaceIdNamespace(routing_id_, + view_->GetSurfaceIdNamespace())); + } + GpuSurfaceTracker::Get()->SetSurfaceHandle( surface_id_, GetCompositingSurface()); @@ -415,6 +422,13 @@ void RenderWidgetHostImpl::Init() { Send(new ViewMsg_CreatingNew_ACK(routing_id_)); GetProcess()->ResumeRequestsForView(routing_id_); + // If the RWHV has not yet been set, the surface ID namespace will get + // passed down by the call to SetView(). + if (view_) { + Send(new ViewMsg_SetSurfaceIdNamespace(routing_id_, + view_->GetSurfaceIdNamespace())); + } + WasResized(); } |