am b4093c12: hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D - DO NOT MERGE

* commit 'b4093c12f8a8cf73f869419904c60e953f5725ee':
  hwui: Caches: use mBoundTextures only for GL_TEXTURE_2D - DO NOT MERGE
This commit is contained in:
Fred Fettinger
2014-10-09 01:00:47 +00:00
committed by Android Git Automerger
2 changed files with 7 additions and 2 deletions

View File

@@ -534,9 +534,13 @@ void Caches::bindTexture(GLuint texture) {
}
void Caches::bindTexture(GLenum target, GLuint texture) {
if (mBoundTextures[mTextureUnit] != texture) {
if (target == GL_TEXTURE_2D) {
bindTexture(texture);
} else {
// GLConsumer directly calls glBindTexture() with
// target=GL_TEXTURE_EXTERNAL_OES, don't cache this target
// since the cached state could be stale
glBindTexture(target, texture);
mBoundTextures[mTextureUnit] = texture;
}
}

View File

@@ -415,6 +415,7 @@ private:
uint32_t mFunctorsCount;
// Caches texture bindings for the GL_TEXTURE_2D target
GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT];
OverdrawColorSet mOverdrawDebugColorSet;