summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-10-16 18:34:31 -0700
committerMathias Agopian <mathias@google.com>2009-10-19 14:23:02 -0700
commitd13e46158afd6ff23178f015285535e5bf00dd2c (patch)
tree50d4744156610078e47139d0490e5197aa1073ec /opengl/libagl
parent031a1dc6d8dd4ed150d4887405cc4100b4106116 (diff)
downloadframeworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.zip
frameworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.tar.gz
frameworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.tar.bz2
fix [2151588] glTexSubImage2D() allows pixel format conversion
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/texture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 90e6d29..13d078e 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1252,6 +1252,11 @@ void glTexSubImage2D(
ogles_error(c, GL_INVALID_OPERATION);
return;
}
+
+ if (format != tex->internalformat) {
+ ogles_error(c, GL_INVALID_OPERATION);
+ return;
+ }
if ((xoffset + width > GLsizei(surface.width)) ||
(yoffset + height > GLsizei(surface.height))) {
ogles_error(c, GL_INVALID_VALUE);