diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 22:21:43 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-08 22:21:43 +0000 |
commit | d85ef76db127b1f1dfb1cac438aa1df69a24687d (patch) | |
tree | 7dd2ae1cc87729932dfc1aa8fcd0c567accd91d8 | |
parent | 37c722b0c9806f0bb87e063c43132e1847260576 (diff) | |
download | chromium_src-d85ef76db127b1f1dfb1cac438aa1df69a24687d.zip chromium_src-d85ef76db127b1f1dfb1cac438aa1df69a24687d.tar.gz chromium_src-d85ef76db127b1f1dfb1cac438aa1df69a24687d.tar.bz2 |
Destroy resolved framebuffers on resize, not swap.
This fixes a regression introduced by http://codereview.chromium.org/7795015
BUG=95611
TEST=viewport-unchanged-upon-resize.html, read-pixels-test.html
Review URL: http://codereview.chromium.org/7841047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100277 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index d6e8cfd..a92cb6e 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? { |