Automatically cleanup textures that don't fit in the cache.

Change-Id: I4f29ed96ea11118b391fb957e1e4d1b8fcef1537
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 67a5f92..fa6ea25 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -88,7 +88,6 @@
         texture = addTexture(entry, path, paint);
     }
 
-    // TODO: Do something to destroy the texture object if it's too big for the cache
     return texture;
 }
 
@@ -129,6 +128,8 @@
     if (size < mMaxSize) {
         mSize += size;
         mCache.put(entry, texture);
+    } else {
+        texture->cleanup = true;
     }
 
     return texture;