diff options
author | 2016-08-01 14:39:24 -0700 | |
---|---|---|
committer | 2016-08-01 16:36:14 -0700 | |
commit | 4387190d8ec9fe4e953fcfeb093a644b82cf85ed (patch) | |
tree | c717cbed2691386f68b6c97ba09d64ac85137871 /libs/hwui/TextureCache.cpp | |
parent | fbd93027e4f8024642271652e490653a4d0c2b55 (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.cpp | 4 |
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); |