diff options
author | John Reck <jreck@google.com> | 2014-04-11 19:15:05 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-04-14 13:17:25 -0700 |
commit | 860d155f866cc15a725e7ce03763280987f24901 (patch) | |
tree | 1ade6b4f5c2c0910c088469b95255eb66ce0cb53 /libs/hwui/TextureCache.h | |
parent | db8b130a19484cb6018667905e64d42ab793654f (diff) | |
download | frameworks_base-860d155f866cc15a725e7ce03763280987f24901.zip frameworks_base-860d155f866cc15a725e7ce03763280987f24901.tar.gz frameworks_base-860d155f866cc15a725e7ce03763280987f24901.tar.bz2 |
Fix issue with bitmap uploading
Bug: 13912749
Change-Id: Ic23fa1d280118dc93dc2716a4a24cc0bbbdca595
Diffstat (limited to 'libs/hwui/TextureCache.h')
-rw-r--r-- | libs/hwui/TextureCache.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.h b/libs/hwui/TextureCache.h index e33c60d..48a10c2 100644 --- a/libs/hwui/TextureCache.h +++ b/libs/hwui/TextureCache.h @@ -62,6 +62,18 @@ public: void operator()(const SkBitmap*& bitmap, Texture*& texture); /** + * Resets all Textures to not be marked as in use + */ + void resetMarkInUse(); + + /** + * Attempts to precache the SkBitmap. Returns true if a Texture was successfully + * acquired for the bitmap, false otherwise. If a Texture was acquired it is + * marked as in use. + */ + bool prefetchAndMarkInUse(const SkBitmap* bitmap); + + /** * Returns the texture associated with the specified bitmap. If the texture * cannot be found in the cache, a new texture is generated. */ @@ -116,6 +128,11 @@ public: void setFlushRate(float flushRate); private: + + bool canMakeTextureFromBitmap(const SkBitmap* bitmap); + + Texture* getCachedTexture(const SkBitmap* bitmap); + /** * Generates the texture from a bitmap into the specified texture structure. * |