| Index: cc/surfaces/direct_compositor_frame_sink.cc
|
| diff --git a/cc/surfaces/direct_compositor_frame_sink.cc b/cc/surfaces/direct_compositor_frame_sink.cc
|
| index 8d568cd11c78befedd8532f9ad709b7c0d967ae0..aed324d5f0b2788d84dbf6b2bb8d57838a80b9a7 100644
|
| --- a/cc/surfaces/direct_compositor_frame_sink.cc
|
| +++ b/cc/surfaces/direct_compositor_frame_sink.cc
|
| @@ -82,7 +82,8 @@
|
| // Unregister the SurfaceFactoryClient here instead of the dtor so that only
|
| // one client is alive for this namespace at any given time.
|
| surface_manager_->UnregisterSurfaceFactoryClient(frame_sink_id_);
|
| - factory_.EvictSurface();
|
| + if (delegated_local_frame_id_.is_valid())
|
| + factory_.Destroy(delegated_local_frame_id_);
|
|
|
| CompositorFrameSink::DetachFromClient();
|
| }
|
| @@ -90,7 +91,11 @@
|
| void DirectCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
|
| gfx::Size frame_size = frame.render_pass_list.back()->output_rect.size();
|
| if (frame_size.IsEmpty() || frame_size != last_swap_frame_size_) {
|
| + if (delegated_local_frame_id_.is_valid()) {
|
| + factory_.Destroy(delegated_local_frame_id_);
|
| + }
|
| delegated_local_frame_id_ = surface_id_allocator_.GenerateId();
|
| + factory_.Create(delegated_local_frame_id_);
|
| last_swap_frame_size_ = frame_size;
|
| }
|
| display_->SetLocalFrameId(delegated_local_frame_id_,
|
|
|