Chromium Code Reviews| Index: cc/output/gl_renderer.cc |
| diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
| index a80feac4ecc9f97f3fd5e731d99a43cc7ea98a99..e046af4d2dc4d4d731c2e5390827fc224e38d29b 100644 |
| --- a/cc/output/gl_renderer.cc |
| +++ b/cc/output/gl_renderer.cc |
| @@ -204,6 +204,9 @@ bool GLRenderer::Initialize() { |
| capabilities_.using_map_image = |
| Settings().use_map_image && context_caps.map_image; |
| + capabilities_.using_discard_framebuffer = |
| + context_caps.discard_framebuffer; |
| + |
| is_using_bind_uniform_ = context_caps.bind_uniform_location; |
| if (!InitializeSharedObjects()) |
| @@ -293,6 +296,15 @@ void GLRenderer::ClearFramebuffer(DrawingFrame* frame) { |
| return; |
| } |
| + if (capabilities_.using_discard_framebuffer) { |
| + const int kNumAttachments = 1; |
| + GLenum attachments[kNumAttachments] = { |
|
piman
2013/09/04 19:23:01
nit: [] and use arraysize
|
| + GL_COLOR_EXT |
| + }; |
| + context_->discardFramebufferEXT( |
| + GL_FRAMEBUFFER, kNumAttachments, attachments); |
| + } |
| + |
| // On DEBUG builds, opaque render passes are cleared to blue to easily see |
| // regions that were not drawn on the screen. |
| if (frame->current_render_pass->has_transparent_background) |