Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| index 85bf211dac13f13d800f3143651e04b9fdbcfba6..05d7e994311e92600367645375d818fc8fd9f692 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| @@ -288,6 +288,11 @@ bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExt |
| if (m_discardFramebufferSupported) { |
| // Explicitly discard framebuffer to save GPU memory bandwidth for tile-based GPU arch. |
| const GLenum attachments[3] = { GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT }; |
| + // It appears safe to overwrite the context's framebuffer binding in the Discard case since there will always be a |
|
Zhenyao Mo
2016/07/14 17:27:03
This comment is unnecessary because there is a res
qiankun
2016/07/14 23:40:00
Thanks for reminding. The comments was added previ
|
| + // WebGLRenderingContext::clearIfComposited() call made before the next draw call which restores the framebuffer binding. |
| + // If this stops being true at some point, we should track the current framebuffer binding in the DrawingBuffer and restore |
| + // it after attaching the new back buffer here. |
| + m_gl->BindFramebuffer(GL_FRAMEBUFFER, m_fbo); |
| m_gl->DiscardFramebufferEXT(GL_FRAMEBUFFER, 3, attachments); |
|
qiankun
2016/07/14 12:37:10
This only makes framebuffer undefined to save some
|
| } |
| } else { |