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

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

Issue 2656893003: Let DelegateFrameHost in Mac and Android use correct FrameSinkId during creation (Closed)
Patch Set: more comments Created 3 years, 11 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_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 2ee46f4f425a642b7e6f5a7263b594481261f35d..fa25f5f6ac39d77250fb8cd7a12420a04d494f48 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -449,8 +449,15 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
// layer is managed by the DelegatedFrameHost.
view_.SetLayer(cc::Layer::Create());
if (using_browser_compositor_) {
+ // This FrameSinkId must be unique with ContextProviderFactory's FrameSinkId
+ // allocation.
+ // TODO(crbug.com/685777): Centralize allocation in one place for easier
+ // maintenance.
+ cc::FrameSinkId frame_sink_id = cc::FrameSinkId(
+ base::checked_cast<uint32_t>(host_->GetProcess()->GetID()),
+ base::checked_cast<uint32_t>(host_->GetRoutingID()));
delegated_frame_host_.reset(new ui::DelegatedFrameHostAndroid(
- &view_, cached_background_color_, this));
+ &view_, cached_background_color_, this, frame_sink_id));
}
host_->SetView(this);

Powered by Google App Engine
This is Rietveld 408576698