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

Unified Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

Issue 17835002: Fix the crash issue for debug version when restoring texture binding at Unit 0 in DrawingBuffer::pr… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContext.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
index 6fc446f5926b724cdaf02b10ba907b997a95b2bf..1faa49d6fe059b38d7383a1e86631ee593da0d0d 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -1660,8 +1660,11 @@ void WebGLRenderingContext::deleteTexture(WebGLTexture* texture)
if (!deleteObject(texture))
return;
for (size_t i = 0; i < m_textureUnits.size(); ++i) {
- if (texture == m_textureUnits[i].m_texture2DBinding)
+ if (texture == m_textureUnits[i].m_texture2DBinding) {
m_textureUnits[i].m_texture2DBinding = 0;
+ if (!i)
+ m_drawingBuffer->setTexture2DBinding(0);
+ }
if (texture == m_textureUnits[i].m_textureCubeMapBinding)
m_textureUnits[i].m_textureCubeMapBinding = 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698