| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| index 737fad85b105be200e68026ac5d0a39a8cd20f5e..3fc461050db472486a51ffd4b757adf7300533a1 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| @@ -136,6 +136,19 @@ public:
|
| // The bound texture is tracked to avoid costly queries during rendering.
|
| void setTexture2DBinding(GLuint texture) { m_texture2DBinding = texture; }
|
|
|
| + void setPixelUnpackBufferBinding(GLuint buffer)
|
| + {
|
| + DCHECK(m_webGLVersion > WebGL1);
|
| + m_pixelUnpackBufferBinding = buffer;
|
| + }
|
| +
|
| + void notifyBufferDeleted(GLuint buffer)
|
| + {
|
| + if (m_webGLVersion > WebGL1 && buffer == m_pixelUnpackBufferBinding) {
|
| + setPixelUnpackBufferBinding(0);
|
| + }
|
| + }
|
| +
|
| // The DrawingBuffer needs to track the currently bound framebuffer so it
|
| // restore the binding when needed.
|
| void setFramebufferBinding(GLenum target, GLuint fbo)
|
| @@ -227,6 +240,8 @@ public:
|
| int sampleCount() const { return m_sampleCount; }
|
| bool explicitResolveOfMultisampleData() const { return m_antiAliasingMode == MSAAExplicitResolve; }
|
|
|
| + void restorePixelUnpackBufferBindings();
|
| +
|
| // Bind to m_drawFramebufferBinding or m_readFramebufferBinding if it's not 0.
|
| // Otherwise, bind to the default FBO.
|
| void restoreFramebufferBindings();
|
| @@ -377,6 +392,7 @@ private:
|
| const WebGLVersion m_webGLVersion;
|
| bool m_scissorEnabled = false;
|
| GLuint m_texture2DBinding = 0;
|
| + GLuint m_pixelUnpackBufferBinding = 0;
|
| GLuint m_drawFramebufferBinding = 0;
|
| GLuint m_readFramebufferBinding = 0;
|
| GLuint m_renderbufferBinding = 0;
|
|
|