From 4387190d8ec9fe4e953fcfeb093a644b82cf85ed Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 1 Aug 2016 14:39:24 -0700 Subject: 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 --- libs/hwui/TextureCache.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/hwui/TextureCache.cpp') 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); -- cgit v1.2.3-59-g8ed1b