Chromium Code Reviews| 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 c55d9e387b11b81eb2f4448a4670fde2cade8a66..8c38e8a0765ac275a321b29005c2d7dffa5583e4 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
| @@ -9369,6 +9369,14 @@ void GLES2DecoderImpl::DoSwapBuffers() { |
| offscreen_saved_color_texture_.swap(offscreen_target_color_texture_); |
| offscreen_target_frame_buffer_->AttachRenderTexture( |
| offscreen_target_color_texture_.get()); |
| + |
| + // Explicitly discard framebuffer to save GPU memory bandwidth for |
| + // tile-based GPU arch. |
| + if (feature_info_->feature_flags().ext_discard_framebuffer) { |
|
Hongbo Min
2014/10/14 02:27:48
According to my previous work, an attempt to clear
dshwang
2014/10/14 12:09:30
As far as I understand, your CL didn't affect whet
|
| + const GLenum attachments[3] = { |
| + GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT}; |
| + glDiscardFramebufferEXT(GL_FRAMEBUFFER, 3, attachments); |
| + } |
| } |
| // Ensure the side effects of the copy are visible to the parent |