summaryrefslogtreecommitdiff
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2016-08-01 14:39:24 -0700
committer John Reck <jreck@google.com> 2016-08-01 16:36:14 -0700
commit4387190d8ec9fe4e953fcfeb093a644b82cf85ed (patch)
treec717cbed2691386f68b6c97ba09d64ac85137871 /libs/hwui/TextureCache.cpp
parentfbd93027e4f8024642271652e490653a4d0c2b55 (diff)
Eliminate recents upload jank
Bug: 30342017 Upload recents thumbnails in the dead gaps between frames instead of at the start of a frame. This eliminates jank caused by the large texture upload. Change-Id: I507cd286d199109c7a9a1511d68ba5ab5d28069f
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index ade8600ab78b..523924af5ef1 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -167,6 +167,10 @@ bool TextureCache::prefetchAndMarkInUse(void* ownerToken, const SkBitmap* bitmap
return texture;
}
+bool TextureCache::prefetch(const SkBitmap* bitmap) {
+ return getCachedTexture(bitmap, AtlasUsageType::Use);
+}
+
Texture* TextureCache::get(const SkBitmap* bitmap, AtlasUsageType atlasUsageType) {
Texture* texture = getCachedTexture(bitmap, atlasUsageType);