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.h b/libs/hwui/TextureCache.h
index a4317ce..0a61b6b 100644
--- a/libs/hwui/TextureCache.h
+++ b/libs/hwui/TextureCache.h
@@ -78,6 +78,13 @@
bool prefetchAndMarkInUse(void* ownerToken, const SkBitmap* bitmap);
/**
+ * Attempts to precache the SkBitmap. Returns true if a Texture was successfully
+ * acquired for the bitmap, false otherwise. Does not mark the Texture
+ * as in use and won't update currently in-use Textures.
+ */
+ bool prefetch(const SkBitmap* bitmap);
+
+ /**
* Returns the texture associated with the specified bitmap from either within the cache, or
* the AssetAtlas. If the texture cannot be found in the cache, a new texture is generated.
*/