summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2014-12-12 04:27:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2014-12-12 04:27:14 +0000
commitec9b598c7be65abb5ceb9d82e752c50f7e93deab (patch)
tree94a557067d2c17e1d44b51e82545d0d364f79276 /libs/hwui
parent3f454e7d1cf7103e312f67f745f01f00fa49df13 (diff)
parentb21a7ad02e43900ea5480e796cb1518bd5829e3f (diff)
downloadframeworks_base-ec9b598c7be65abb5ceb9d82e752c50f7e93deab.zip
frameworks_base-ec9b598c7be65abb5ceb9d82e752c50f7e93deab.tar.gz
frameworks_base-ec9b598c7be65abb5ceb9d82e752c50f7e93deab.tar.bz2
am b9a4d15d: Merge "Force-flush state sync on texid change" into lmp-mr1-dev
automerge: b21a7ad * commit 'b21a7ad02e43900ea5480e796cb1518bd5829e3f': Force-flush state sync on texid change
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;