summaryrefslogtreecommitdiffstats
path: root/libs/hwui/ResourceCache.h
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2010-11-11 16:30:16 -0800
committerChet Haase <chet@google.com>2010-11-11 16:44:46 -0800
commite7d2295c06ef9b9df6336cbff23007a13fb3f6e4 (patch)
treec7942510b0b0f24cac8a88af0d40d878242a99b8 /libs/hwui/ResourceCache.h
parent7c5c9e4717741b3c5961dfbda2b90feca137b309 (diff)
downloadframeworks_base-e7d2295c06ef9b9df6336cbff23007a13fb3f6e4.zip
frameworks_base-e7d2295c06ef9b9df6336cbff23007a13fb3f6e4.tar.gz
frameworks_base-e7d2295c06ef9b9df6336cbff23007a13fb3f6e4.tar.bz2
make ResourceCache for display lists thread-safe
Change-Id: I41885b4ae249d7d7c000bab17bf32340ba85ab3a
Diffstat (limited to 'libs/hwui/ResourceCache.h')
-rw-r--r--libs/hwui/ResourceCache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/ResourceCache.h b/libs/hwui/ResourceCache.h
index 2256fd1..b0abe2c 100644
--- a/libs/hwui/ResourceCache.h
+++ b/libs/hwui/ResourceCache.h
@@ -70,6 +70,13 @@ private:
void deleteResourceReference(void* resource, ResourceReference* ref);
void incrementRefcount(void* resource, ResourceType resourceType);
void logCache();
+
+ /**
+ * Used to increment, decrement, and destroy. Incrementing is generally accessed on the UI
+ * thread, but destroying resources may be called from the GC thread, the finalizer thread,
+ * or a reference queue finalization thread.
+ */
+ mutable Mutex mLock;
};
}; // namespace uirenderer