Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2329523002: Save/restore PBO bindings in DrawingBuffer (Closed)
Patch Set: oops Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698