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 296bf56de55d410e15cdfd99629e34b80dfe989d..5f426cdec5f923af769aab0a685990b823e31a9f 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp |
| @@ -324,6 +324,8 @@ bool DrawingBuffer::prepareTextureMailboxInternal( |
| return true; |
| } |
| + m_gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); |
|
Ken Russell (switch to Gerrit)
2016/09/09 20:10:33
Here also, this needs to only be executed if the c
Kai Ninomiya
2016/09/09 20:30:44
Done.
|
| + |
| // We must restore the texture binding since creating new textures, |
| // consuming and producing mailboxes changes it. |
| ScopedTextureUnit0BindingRestorer restorer(m_gl, m_activeTextureUnit, m_texture2DBinding); |
| @@ -351,6 +353,7 @@ bool DrawingBuffer::prepareTextureMailboxInternal( |
| } |
| restoreFramebufferBindings(); |
| + restorePixelUnpackBufferBindings(); |
| m_contentsChanged = false; |
| m_gl->ProduceTextureDirectCHROMIUM(mailboxInfo->textureInfo.textureId, mailboxInfo->textureInfo.parameters.target, mailboxInfo->mailbox.name); |
| @@ -954,6 +957,11 @@ void DrawingBuffer::commit() |
| m_contentsChangeCommitted = true; |
| } |
| +void DrawingBuffer::restorePixelUnpackBufferBindings() |
| +{ |
| + m_gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pixelUnpackBufferBinding); |
|
Ken Russell (switch to Gerrit)
2016/09/09 20:10:33
This must only be done for WebGL 2.0 / ES 3.0 cont
|
| +} |
| + |
| void DrawingBuffer::restoreFramebufferBindings() |
| { |
| if (m_drawFramebufferBinding && m_readFramebufferBinding) { |