summaryrefslogtreecommitdiff
path: root/libs/hwui/PatchCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/PatchCache.cpp')
-rw-r--r--libs/hwui/PatchCache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/hwui/PatchCache.cpp b/libs/hwui/PatchCache.cpp
index 4dc1a4dd1e31..eca5e4d201f5 100644
--- a/libs/hwui/PatchCache.cpp
+++ b/libs/hwui/PatchCache.cpp
@@ -73,8 +73,8 @@ Patch* PatchCache::get(const float bitmapWidth, const float bitmapHeight,
pixelWidth, pixelHeight, xDivs, yDivs, width, height);
if (mCache.size() >= mMaxEntries) {
- delete mCache.valueAt(0);
- mCache.removeItemsAt(0, 1);
+ delete mCache.valueAt(mCache.size() - 1);
+ mCache.removeItemsAt(mCache.size() - 1, 1);
}
mCache.add(description, mesh);