summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-12-11 22:44:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-11 22:44:19 +0000
commitb9a4d15d0942a55c7dc32a471ee40890986e3fab (patch)
treeb1a7f92b399c09f02a37b9a45d073f4ab89ba9e7 /libs/hwui
parent63c7b24645d94c92dc6dc32d57c23b5167950c8b (diff)
parent9a7fe1a034bf0a9dea7c0676211bb780d3ab30be (diff)
downloadframeworks_base-b9a4d15d0942a55c7dc32a471ee40890986e3fab.zip
frameworks_base-b9a4d15d0942a55c7dc32a471ee40890986e3fab.tar.gz
frameworks_base-b9a4d15d0942a55c7dc32a471ee40890986e3fab.tar.bz2
Merge "Force-flush state sync on texid change" into lmp-mr1-dev
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/AssetAtlas.cpp6
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;