Index: services/ui/surfaces/gpu_compositor_frame_sink.cc |
diff --git a/services/ui/surfaces/gpu_compositor_frame_sink.cc b/services/ui/surfaces/gpu_compositor_frame_sink.cc |
index b2e3a8d7cd3a78df2778116f57b554da1216b0f9..92e2ec05c6b60dc57b6fe2063c6f7f8cab3798a1 100644 |
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc |
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc |
@@ -63,7 +63,7 @@ GpuCompositorFrameSink::~GpuCompositorFrameSink() { |
// SurfaceFactory's destructor will attempt to return resources which will |
// call back into here and access |client_| so we should destroy |
// |surface_factory_|'s resources early on. |
- surface_factory_.DestroyAll(); |
+ surface_factory_.EvictSurface(); |
display_compositor_->manager()->UnregisterSurfaceFactoryClient( |
frame_sink_id_); |
display_compositor_->manager()->InvalidateFrameSinkId(frame_sink_id_); |
@@ -80,10 +80,7 @@ void GpuCompositorFrameSink::SubmitCompositorFrame( |
// If the size of the CompostiorFrame has changed then destroy the existing |
// Surface and create a new one of the appropriate size. |
if (local_frame_id_ != local_frame_id) { |
- if (local_frame_id_.is_valid()) |
- surface_factory_.Destroy(local_frame_id_); |
local_frame_id_ = local_frame_id; |
- surface_factory_.Create(local_frame_id_); |
if (display_ && !frame.render_pass_list.empty()) { |
gfx::Size frame_size = frame.render_pass_list[0]->output_rect.size(); |
display_->Resize(frame_size); |