| 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 a003681da3ee3356c7cb7077fa284e2045ac8ebf..a52ced06f4bf74aa35e26669e9f0f9deb85ebb71 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -324,6 +324,10 @@ bool DrawingBuffer::prepareTextureMailboxInternal(
|
| return true;
|
| }
|
|
|
| + if (m_webGLVersion > WebGL1) {
|
| + m_gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
|
| + }
|
| +
|
| // 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 +355,7 @@ bool DrawingBuffer::prepareTextureMailboxInternal(
|
| }
|
|
|
| restoreFramebufferBindings();
|
| + restorePixelUnpackBufferBindings();
|
| m_contentsChanged = false;
|
|
|
| m_gl->ProduceTextureDirectCHROMIUM(mailboxInfo->textureInfo.textureId, mailboxInfo->textureInfo.parameters.target, mailboxInfo->mailbox.name);
|
| @@ -952,6 +957,13 @@ void DrawingBuffer::commit()
|
| m_contentsChangeCommitted = true;
|
| }
|
|
|
| +void DrawingBuffer::restorePixelUnpackBufferBindings()
|
| +{
|
| + if (m_webGLVersion > WebGL1) {
|
| + m_gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, m_pixelUnpackBufferBinding);
|
| + }
|
| +}
|
| +
|
| void DrawingBuffer::restoreFramebufferBindings()
|
| {
|
| if (m_drawFramebufferBinding && m_readFramebufferBinding) {
|
|
|