diff options
author | John Reck <jreck@google.com> | 2014-12-11 22:49:52 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-11 22:49:52 +0000 |
commit | b21a7ad02e43900ea5480e796cb1518bd5829e3f (patch) | |
tree | c7da346cb3cb5614080881b2288b46f8ad53807c | |
parent | 00905a984c07ffc9960ce83548631c59aae37ec6 (diff) | |
parent | b9a4d15d0942a55c7dc32a471ee40890986e3fab (diff) | |
download | frameworks_base-b21a7ad02e43900ea5480e796cb1518bd5829e3f.zip frameworks_base-b21a7ad02e43900ea5480e796cb1518bd5829e3f.tar.gz frameworks_base-b21a7ad02e43900ea5480e796cb1518bd5829e3f.tar.bz2 |
am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev
* commit 'b9a4d15d0942a55c7dc32a471ee40890986e3fab':
Force-flush state sync on texid change
-rw-r--r-- | libs/hwui/AssetAtlas.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/AssetAtlas.cpp b/libs/hwui/AssetAtlas.cpp index c6de535..52ca92d 100644 --- a/libs/hwui/AssetAtlas.cpp +++ b/libs/hwui/AssetAtlas.cpp @@ -64,6 +64,12 @@ void AssetAtlas::terminate() { void AssetAtlas::updateTextureId() { mTexture->id = mImage ? mImage->getTexture() : 0; + if (mTexture->id) { + // Texture ID changed, force-set to defaults to sync the wrapper & GL + // state objects + mTexture->setWrap(GL_CLAMP_TO_EDGE, false, true); + mTexture->setFilter(GL_NEAREST, false, true); + } for (size_t i = 0; i < mEntries.size(); i++) { AssetAtlas::Entry* entry = mEntries.valueAt(i); entry->texture->id = mTexture->id; |