Purge Skia objects from GL caches as needed.
Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
diff --git a/libs/hwui/GradientCache.h b/libs/hwui/GradientCache.h
index 8795920..51a8c01 100644
--- a/libs/hwui/GradientCache.h
+++ b/libs/hwui/GradientCache.h
@@ -82,6 +82,12 @@
uint32_t mSize;
uint32_t mMaxSize;
+
+ /**
+ * Used to access mCache and mSize. All methods are accessed from a single
+ * thread except for remove().
+ */
+ mutable Mutex mLock;
}; // class GradientCache
}; // namespace uirenderer