diff options
| author | 2018-08-29 15:51:15 +0000 | |
|---|---|---|
| committer | 2018-08-29 15:51:15 +0000 | |
| commit | 54b9892f3cc8ed30bfe660ff2957aefeb484b092 (patch) | |
| tree | 0c9374ad222a99e4c7b709230e594be12d57dc24 /libs/hwui/ResourceCache.cpp | |
| parent | c8344a19637ff39f84cbd6acecb952c80f2c4de5 (diff) | |
| parent | c8e22a653297837da9a80b0ba65f6854c8986c96 (diff) | |
Merge "TextureView Vulkan support and optimized OpenGL draw"
Diffstat (limited to 'libs/hwui/ResourceCache.cpp')
| -rw-r--r-- | libs/hwui/ResourceCache.cpp | 23 | 
1 files changed, 7 insertions, 16 deletions
diff --git a/libs/hwui/ResourceCache.cpp b/libs/hwui/ResourceCache.cpp index 464a58d0c0f8..65bee476f14d 100644 --- a/libs/hwui/ResourceCache.cpp +++ b/libs/hwui/ResourceCache.cpp @@ -15,7 +15,6 @@   */  #include "ResourceCache.h" -#include "Caches.h"  namespace android { @@ -112,13 +111,9 @@ void ResourceCache::destructorLocked(Res_png_9patch* resource) {      ResourceReference* ref = index >= 0 ? mCache->valueAt(index) : nullptr;      if (ref == nullptr) {          // If we're not tracking this resource, just delete it -        if (Caches::hasInstance()) { -            // DEAD CODE -        } else { -            // A Res_png_9patch is actually an array of byte that's larger -            // than sizeof(Res_png_9patch). It must be freed as an array. -            delete[](int8_t*) resource; -        } +        // A Res_png_9patch is actually an array of byte that's larger +        // than sizeof(Res_png_9patch). It must be freed as an array. +        delete[](int8_t*) resource;          return;      }      ref->destroyed = true; @@ -135,14 +130,10 @@ void ResourceCache::deleteResourceReferenceLocked(const void* resource, Resource      if (ref->destroyed) {          switch (ref->resourceType) {              case kNinePatch: { -                if (Caches::hasInstance()) { -                    // DEAD CODE -                } else { -                    // A Res_png_9patch is actually an array of byte that's larger -                    // than sizeof(Res_png_9patch). It must be freed as an array. -                    int8_t* patch = (int8_t*)resource; -                    delete[] patch; -                } +                // A Res_png_9patch is actually an array of byte that's larger +                // than sizeof(Res_png_9patch). It must be freed as an array. +                int8_t* patch = (int8_t*)resource; +                delete[] patch;              } break;          }      }  |