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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2166423002: ui::ContextFactory should not create SurfaceIdAllocators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nit Created 4 years, 5 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 09f1353e453a7a173507f4aff28078083853de7d..eb7041d2f0b6b1c8cc30e654a60a74dc0a9e3a04 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -50,7 +50,8 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
observing_begin_frame_source_(false),
parent_surface_client_id_(0),
weak_factory_(this) {
- id_allocator_ = CreateSurfaceIdAllocator();
+ id_allocator_.reset(new cc::SurfaceIdAllocator(AllocateSurfaceClientId()));
+ GetSurfaceManager()->RegisterSurfaceClientId(id_allocator_->client_id());
RegisterSurfaceNamespaceId();
host_->SetView(this);
@@ -59,6 +60,9 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() {
if (!surface_id_.is_null())
surface_factory_->Destroy(surface_id_);
+
+ if (GetSurfaceManager())
+ GetSurfaceManager()->InvalidateSurfaceClientId(id_allocator_->client_id());
}
void RenderWidgetHostViewChildFrame::SetCrossProcessFrameConnector(
« no previous file with comments | « content/browser/compositor/surface_utils.cc ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698