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

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

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index d3ecd7d2d6fce6a48cbc7035457ad24487865edd..0c5f97b52cc41a56b2d0937512eb303bcb043275 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -113,8 +113,8 @@ void RenderWidgetHostViewGuest::Show() {
// set (e.g. showing an interstitial), so we resend our current surface to
// the renderer.
if (!surface_id_.is_null()) {
- cc::SurfaceSequence sequence = cc::SurfaceSequence(
- id_allocator_->frame_sink_id(), next_surface_sequence_++);
+ cc::SurfaceSequence sequence =
+ cc::SurfaceSequence(frame_sink_id_, next_surface_sequence_++);
GetSurfaceManager()
->GetSurfaceForId(surface_id_)
->AddDestructionDependency(sequence);
@@ -293,15 +293,16 @@ void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
if (!surface_factory_) {
cc::SurfaceManager* manager = GetSurfaceManager();
- surface_factory_ = base::MakeUnique<cc::SurfaceFactory>(manager, this);
+ surface_factory_ =
+ base::MakeUnique<cc::SurfaceFactory>(frame_sink_id_, manager, this);
}
if (surface_id_.is_null()) {
surface_id_ = id_allocator_->GenerateId();
surface_factory_->Create(surface_id_);
- cc::SurfaceSequence sequence = cc::SurfaceSequence(
- id_allocator_->frame_sink_id(), next_surface_sequence_++);
+ cc::SurfaceSequence sequence =
+ cc::SurfaceSequence(frame_sink_id_, next_surface_sequence_++);
// The renderer process will satisfy this dependency when it creates a
// SurfaceLayer.
cc::SurfaceManager* manager = GetSurfaceManager();

Powered by Google App Engine
This is Rietveld 408576698