Home | History | Annotate | Download | only in hwui

Lines Matching refs:Texture

27 #include "Texture.h"
48 * A simple LRU texture cache. The cache has a maximum size expressed in bytes.
49 * Any texture added to the cache causing the cache to grow beyond the maximum
50 * allowed size will also cause the oldest texture to be kicked out.
52 class TextureCache: public OnEntryRemoved<const SkPixelRef*, Texture*> {
62 void operator()(const SkPixelRef*& pixelRef, Texture*& texture);
70 * Attempts to precache the SkBitmap. Returns true if a Texture was successfully
71 * acquired for the bitmap, false otherwise. If a Texture was acquired it is
77 * Returns the texture associated with the specified bitmap. If the texture
78 * cannot be found in the cache, a new texture is generated.
80 Texture* get(const SkBitmap* bitmap);
82 * Returns the texture associated with the specified bitmap. The generated
83 * texture is not kept in the cache. The caller must destroy the texture.
85 Texture* getTransient(const SkBitmap* bitmap);
87 * Removes the texture associated with the specified bitmap.
88 * Upon remove the texture is freed.
92 * Removes the texture associated with the specified bitmap. This is meant
134 Texture* getCachedTexture(const SkBitmap* bitmap);
137 * Generates the texture from a bitmap into the specified texture structure.
139 * @param regenerate If true, the bitmap data is reuploaded into the texture, but
140 * no new texture is generated.
142 void generateTexture(const SkBitmap* bitmap, Texture* texture, bool regenerate = false);
150 LruCache<const SkPixelRef*, Texture*> mCache;