summaryrefslogtreecommitdiff
path: root/libs/hwui/AssetAtlas.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-06-27 15:27:09 -0700
committer Romain Guy <romainguy@google.com> 2013-06-27 15:40:46 -0700
commit55b6f95ee4ace96c97508bcd14483fb4e9dbeaa0 (patch)
treef66490c89db4ac96004144731a89d1956108f1a0 /libs/hwui/AssetAtlas.cpp
parent9feab843ac8139f4e971d93fd767470d0d727e41 (diff)
Track the atlas' generation ID
Bug #9589379 If the atlas is terminated/reinitialized and a view does not invalidate in between it might end up using a stale AssetAtlas::Entry. This change is similar to how 9patch meshes are cached in DrawPatchOp: we simply track the generation ID of the cache to make sure we always use the latest data. Change-Id: Ib5abb3769d2ce0eabe9adc04e320ca27c422019e
Diffstat (limited to 'libs/hwui/AssetAtlas.cpp')
-rw-r--r--libs/hwui/AssetAtlas.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/AssetAtlas.cpp b/libs/hwui/AssetAtlas.cpp
index 782c052c193d..d98a538fe40d 100644
--- a/libs/hwui/AssetAtlas.cpp
+++ b/libs/hwui/AssetAtlas.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "OpenGLRenderer"
+
#include "AssetAtlas.h"
#include "Caches.h"
@@ -49,6 +51,8 @@ void AssetAtlas::init(sp<GraphicBuffer> buffer, int* map, int count) {
mImage = NULL;
mTexture = NULL;
}
+
+ mGenerationId++;
}
void AssetAtlas::terminate() {