summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index cc09aae..9fb61e4 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -160,6 +160,16 @@ Texture* TextureCache::get(SkBitmap* bitmap) {
return texture;
}
+Texture* TextureCache::getTransient(SkBitmap* bitmap) {
+ Texture* texture = new Texture;
+ texture->bitmapSize = bitmap->rowBytes() * bitmap->height();
+ texture->cleanup = true;
+
+ generateTexture(bitmap, texture, false);
+
+ return texture;
+}
+
void TextureCache::remove(SkBitmap* bitmap) {
mCache.remove(bitmap);
}