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
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index ade8600a..523924a 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -167,6 +167,10 @@
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);