Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index d6e8cfd99205dfebc204c025c24b9674b91c3935..a92cb6ebf5c12ff4051faba67effbba2a8c46098 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -2525,6 +2525,15 @@ bool GLES2DecoderImpl::ResizeOffscreenFrameBuffer(const gfx::Size& size) { |
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); |
RestoreClearState(); |
} |
+ |
+ // Destroy the offscreen resolved framebuffers. |
+ if (offscreen_resolved_frame_buffer_.get()) |
+ offscreen_resolved_frame_buffer_->Destroy(); |
+ if (offscreen_resolved_color_texture_.get()) |
+ offscreen_resolved_color_texture_->Destroy(); |
+ offscreen_resolved_color_texture_.reset(); |
+ offscreen_resolved_frame_buffer_.reset(); |
+ |
return true; |
} |
@@ -6545,14 +6554,6 @@ error::Error GLES2DecoderImpl::HandleSwapBuffers( |
return error::kLostContext; |
} |
- // Destroy the offscreen resolved framebuffers. |
- if (offscreen_resolved_frame_buffer_.get()) |
- offscreen_resolved_frame_buffer_->Destroy(); |
- if (offscreen_resolved_color_texture_.get()) |
- offscreen_resolved_color_texture_->Destroy(); |
- offscreen_resolved_color_texture_.reset(); |
- offscreen_resolved_frame_buffer_.reset(); |
- |
// Clear the offscreen color texture. |
// TODO(piman): Is this still necessary? |
{ |