summaryrefslogtreecommitdiff
path: root/libs/hwui/ShapeCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/ShapeCache.cpp')
-rw-r--r--libs/hwui/ShapeCache.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/libs/hwui/ShapeCache.cpp b/libs/hwui/ShapeCache.cpp
index ffa18e37a0a9..b78eecba5215 100644
--- a/libs/hwui/ShapeCache.cpp
+++ b/libs/hwui/ShapeCache.cpp
@@ -21,7 +21,12 @@
namespace android {
namespace uirenderer {
-RoundRectShapeCache::RoundRectShapeCache(): ShapeCache<RoundRectShapeCacheEntry>() {
+///////////////////////////////////////////////////////////////////////////////
+// Rounded rects
+///////////////////////////////////////////////////////////////////////////////
+
+RoundRectShapeCache::RoundRectShapeCache(): ShapeCache<RoundRectShapeCacheEntry>(
+ "round rect", PROPERTY_SHAPE_CACHE_SIZE, DEFAULT_SHAPE_CACHE_SIZE) {
}
PathTexture* RoundRectShapeCache::getRoundRect(float width, float height,
@@ -41,7 +46,12 @@ PathTexture* RoundRectShapeCache::getRoundRect(float width, float height,
return texture;
}
-CircleShapeCache::CircleShapeCache(): ShapeCache<CircleShapeCacheEntry>() {
+///////////////////////////////////////////////////////////////////////////////
+// Circles
+///////////////////////////////////////////////////////////////////////////////
+
+CircleShapeCache::CircleShapeCache(): ShapeCache<CircleShapeCacheEntry>(
+ "circle", PROPERTY_SHAPE_CACHE_SIZE, DEFAULT_SHAPE_CACHE_SIZE) {
}
PathTexture* CircleShapeCache::getCircle(float radius, SkPaint* paint) {