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

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

Issue 363613005: Fix setting texture unit in handleTextureCompleteness (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index b587a6899c117832faf05361f90db179aa6722d4..7518a66b35efc1a2a75af276dc725892a4a50e78 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -4416,10 +4416,10 @@ void WebGLRenderingContextBase::handleTextureCompleteness(const char* functionNa
if ((m_textureUnits[ii].m_texture2DBinding.get() && m_textureUnits[ii].m_texture2DBinding->needToUseBlackTexture(flag))
|| (m_textureUnits[ii].m_textureCubeMapBinding.get() && m_textureUnits[ii].m_textureCubeMapBinding->needToUseBlackTexture(flag))) {
if (ii != m_activeTextureUnit) {
- webContext()->activeTexture(ii);
+ webContext()->activeTexture(GL_TEXTURE0 + ii);
resetActiveUnit = true;
} else if (resetActiveUnit) {
- webContext()->activeTexture(ii);
+ webContext()->activeTexture(GL_TEXTURE0 + ii);
resetActiveUnit = false;
}
WebGLTexture* tex2D;
@@ -4442,7 +4442,7 @@ void WebGLRenderingContextBase::handleTextureCompleteness(const char* functionNa
}
}
if (resetActiveUnit)
- webContext()->activeTexture(m_activeTextureUnit);
+ webContext()->activeTexture(GL_TEXTURE0 + m_activeTextureUnit);
}
void WebGLRenderingContextBase::createFallbackBlackTextures1x1()
« 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