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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1129883003: Pass Surface ID namespace to renderer compositors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved the way the surface id is passed to renderer Created 5 years, 7 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 0923657632c9eabcf91d2ec323cdbfeb7373cac5..db3079e2e314febb4fdac00a7858aa20a58205aa 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -322,6 +322,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());
@@ -416,6 +423,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();
}

Powered by Google App Engine
This is Rietveld 408576698