diff options
| author | 2013-03-26 17:29:51 -0700 | |
|---|---|---|
| committer | 2013-03-26 17:29:51 -0700 | |
| commit | 4500a8d5d7fbec9dba5e693212da160849e401ff (patch) | |
| tree | 1022f0099762a9ef2058da7240a2809659527846 /libs/hwui/PathCache.h | |
| parent | 96885eb480c5e0526fe2f77d30f6e551f3f3ceab (diff) | |
Path precaching creates duplicate cache entries
Bug #8478275
Change-Id: Ib541ea051e42e01cc0d277790e9c09de38ef72ee
Diffstat (limited to 'libs/hwui/PathCache.h')
| -rw-r--r-- | libs/hwui/PathCache.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/hwui/PathCache.h b/libs/hwui/PathCache.h index 146723162fa5..dd1f9967ca43 100644 --- a/libs/hwui/PathCache.h +++ b/libs/hwui/PathCache.h @@ -253,7 +253,13 @@ private: PathTexture* addTexture(const PathDescription& entry, const SkPath *path, const SkPaint* paint); PathTexture* addTexture(const PathDescription& entry, SkBitmap* bitmap); - void addTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture); + + /** + * Generates the texture from a bitmap into the specified texture structure. + */ + void generateTexture(SkBitmap& bitmap, Texture* texture); + void generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, + bool addToCache = true); PathTexture* get(const PathDescription& entry) { return mCache.get(entry); @@ -282,11 +288,6 @@ private: return true; } - /** - * Generates the texture from a bitmap into the specified texture structure. - */ - void generateTexture(SkBitmap& bitmap, Texture* texture); - void init(); class PathTask: public Task<SkBitmap*> { |