| 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 545196c155001cc09555782a97a36dc13c56f5ed..2df2d5606cb8f5619d4082ca527f16c2ed1ee5a6 100644
|
| --- a/content/browser/frame_host/render_widget_host_view_guest.cc
|
| +++ b/content/browser/frame_host/render_widget_host_view_guest.cc
|
| @@ -300,22 +300,10 @@
|
| current_surface_scale_factor_ = scale_factor;
|
| }
|
|
|
| - bool allocated_new_local_frame_id = false;
|
| if (!local_frame_id_.is_valid()) {
|
| local_frame_id_ = id_allocator_->GenerateId();
|
| - allocated_new_local_frame_id = true;
|
| - }
|
| -
|
| - cc::SurfaceFactory::DrawCallback ack_callback = base::Bind(
|
| - &RenderWidgetHostViewChildFrame::SurfaceDrawn,
|
| - RenderWidgetHostViewChildFrame::AsWeakPtr(), compositor_frame_sink_id);
|
| - ack_pending_count_++;
|
| - // If this value grows very large, something is going wrong.
|
| - DCHECK(ack_pending_count_ < 1000);
|
| - surface_factory_->SubmitCompositorFrame(local_frame_id_, std::move(frame),
|
| - ack_callback);
|
| -
|
| - if (allocated_new_local_frame_id) {
|
| + surface_factory_->Create(local_frame_id_);
|
| +
|
| cc::SurfaceSequence sequence =
|
| cc::SurfaceSequence(frame_sink_id_, next_surface_sequence_++);
|
| // The renderer process will satisfy this dependency when it creates a
|
| @@ -332,6 +320,16 @@
|
| sequence);
|
| }
|
| }
|
| +
|
| + cc::SurfaceFactory::DrawCallback ack_callback = base::Bind(
|
| + &RenderWidgetHostViewChildFrame::SurfaceDrawn,
|
| + RenderWidgetHostViewChildFrame::AsWeakPtr(), compositor_frame_sink_id);
|
| + ack_pending_count_++;
|
| + // If this value grows very large, something is going wrong.
|
| + DCHECK(ack_pending_count_ < 1000);
|
| + surface_factory_->SubmitCompositorFrame(local_frame_id_, std::move(frame),
|
| + ack_callback);
|
| +
|
| ProcessFrameSwappedCallbacks();
|
|
|
| // If after detaching we are sent a frame, we should finish processing it, and
|
|
|