From 21b028a44f3e0bd9b0f0432b8b92c45f661d22a4 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Fri, 8 Oct 2010 18:43:58 -0700 Subject: Move GenerationCache to the utils directory. Change-Id: I210ffa8f1d76a102bb7d971c649c20a74d03fbe6 --- libs/hwui/PatchCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/PatchCache.cpp') 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); -- cgit v1.2.3-59-g8ed1b