diff options
author | 2015-02-23 13:07:57 -0800 | |
---|---|---|
committer | 2015-02-23 13:21:53 -0800 | |
commit | 8e93a7c9377b4ae43ecfb408f4906a09f6c83c03 (patch) | |
tree | 8a68ed6f0eca6f0688b9d9f07aa51d097ccc7c9b /libs/hwui/TextureCache.cpp | |
parent | f27133df2d179c99d6bc1ae644af09e9153a0071 (diff) |
Simplify Texture member initialization
Change-Id: Iaaa6dd20e64a0a075d732b101e3c4278cad44047
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r-- | libs/hwui/TextureCache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index f4f8e44e5039..b911a0f3d4c7 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -168,7 +168,7 @@ Texture* TextureCache::getCachedTexture(const SkBitmap* bitmap) { } if (canCache) { - texture = new Texture(); + texture = new Texture(Caches::getInstance()); texture->bitmapSize = size; generateTexture(bitmap, texture, false); @@ -206,7 +206,7 @@ Texture* TextureCache::get(const SkBitmap* bitmap) { } const uint32_t size = bitmap->rowBytes() * bitmap->height(); - texture = new Texture(); + texture = new Texture(Caches::getInstance()); texture->bitmapSize = size; generateTexture(bitmap, texture, false); texture->cleanup = true; @@ -216,7 +216,7 @@ Texture* TextureCache::get(const SkBitmap* bitmap) { } Texture* TextureCache::getTransient(const SkBitmap* bitmap) { - Texture* texture = new Texture(); + Texture* texture = new Texture(Caches::getInstance()); texture->bitmapSize = bitmap->rowBytes() * bitmap->height(); texture->cleanup = true; |