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

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

Issue 2329523002: Save/restore PBO bindings in DrawingBuffer (Closed)
Patch Set: 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
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) {

Powered by Google App Engine
This is Rietveld 408576698