Lines Matching full:texture
26 #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<SkBitmap*, Texture*> {
62 void operator()(SkBitmap*& bitmap, Texture*& texture);
65 * Returns the texture associated with the specified bitmap. If the texture
66 * cannot be found in the cache, a new texture is generated.
68 Texture* get(SkBitmap* bitmap);
70 * Returns the texture associated with the specified bitmap. The generated
71 * texture is not kept in the cache. The caller must destroy the texture.
73 Texture* getTransient(SkBitmap* bitmap);
75 * Removes the texture associated with the specified bitmap.
76 * Upon remove the texture is freed.
80 * Removes the texture associated with the specified bitmap. This is meant
120 * Generates the texture from a bitmap into the specified texture structure.
122 * @param regenerate If true, the bitmap data is reuploaded into the texture, but
123 * no new texture is generated.
125 void generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate = false);
133 GenerationCache<SkBitmap*, Texture*> mCache;