summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-19 17:31:52 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-19 17:31:52 -0400
commit3662f9ee5be3113b57693e1495fd83a2f5c7200c (patch)
tree9e05f76a9beff60e2a4e8c4fa81fb4cb0aef7a2d /opengl
parent639d69fe8799ac2fa0bbf7560229531377ccc0f4 (diff)
parent78811906c3a8a99a155543eda73f51914143277a (diff)
downloadframeworks_base-3662f9ee5be3113b57693e1495fd83a2f5c7200c.zip
frameworks_base-3662f9ee5be3113b57693e1495fd83a2f5c7200c.tar.gz
frameworks_base-3662f9ee5be3113b57693e1495fd83a2f5c7200c.tar.bz2
Merge change Ide4c8cbc into eclair
* changes: fix [2151588] glTexSubImage2D() allows pixel format conversion
Diffstat (limited to 'opengl')
-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);