diff options
author | Chris Craik <ccraik@google.com> | 2015-01-05 15:51:13 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-01-05 16:49:13 -0800 |
commit | d41c4d8c732095ae99c955b6b82f7306633004b1 (patch) | |
tree | dbb2e26c6c5a80c7ccf43e5cd5fb1554cc603555 /libs/hwui/TextureCache.cpp | |
parent | 8dfaa4904205772cdceee63ef3989bcdedf1a914 (diff) | |
download | frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.zip frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.gz frameworks_base-d41c4d8c732095ae99c955b6b82f7306633004b1.tar.bz2 |
Add overrides and switch to nullptr keyword for all files
Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.
Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r-- | libs/hwui/TextureCache.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 8109433..7dc2480 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -41,16 +41,16 @@ namespace uirenderer { TextureCache::TextureCache(): mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity), mSize(0), mMaxSize(MB(DEFAULT_TEXTURE_CACHE_SIZE)), - mFlushRate(DEFAULT_TEXTURE_CACHE_FLUSH_RATE), mAssetAtlas(0) { + mFlushRate(DEFAULT_TEXTURE_CACHE_FLUSH_RATE), mAssetAtlas(nullptr) { char property[PROPERTY_VALUE_MAX]; - if (property_get(PROPERTY_TEXTURE_CACHE_SIZE, property, NULL) > 0) { + if (property_get(PROPERTY_TEXTURE_CACHE_SIZE, property, nullptr) > 0) { INIT_LOGD(" Setting texture cache size to %sMB", property); setMaxSize(MB(atof(property))); } else { INIT_LOGD(" Using default texture cache size of %.2fMB", DEFAULT_TEXTURE_CACHE_SIZE); } - if (property_get(PROPERTY_TEXTURE_CACHE_FLUSH_RATE, property, NULL) > 0) { + if (property_get(PROPERTY_TEXTURE_CACHE_FLUSH_RATE, property, nullptr) > 0) { float flushRate = atof(property); INIT_LOGD(" Setting texture cache flush rate to %.2f%%", flushRate * 100.0f); setFlushRate(flushRate); @@ -64,7 +64,7 @@ TextureCache::TextureCache(): TextureCache::TextureCache(uint32_t maxByteSize): mCache(LruCache<uint32_t, Texture*>::kUnlimitedCapacity), - mSize(0), mMaxSize(maxByteSize), mAssetAtlas(0) { + mSize(0), mMaxSize(maxByteSize), mAssetAtlas(nullptr) { init(); } @@ -160,7 +160,7 @@ Texture* TextureCache::getCachedTexture(const SkBitmap* bitmap) { if (!texture) { if (!canMakeTextureFromBitmap(bitmap)) { - return NULL; + return nullptr; } const uint32_t size = bitmap->rowBytes() * bitmap->height(); @@ -210,7 +210,7 @@ Texture* TextureCache::get(const SkBitmap* bitmap) { if (!texture) { if (!canMakeTextureFromBitmap(bitmap)) { - return NULL; + return nullptr; } const uint32_t size = bitmap->rowBytes() * bitmap->height(); @@ -352,7 +352,7 @@ void TextureCache::uploadLoFiTexture(bool resize, const SkBitmap* bitmap, rgbaBitmap.eraseColor(0); SkCanvas canvas(rgbaBitmap); - canvas.drawBitmap(*bitmap, 0.0f, 0.0f, NULL); + canvas.drawBitmap(*bitmap, 0.0f, 0.0f, nullptr); uploadToTexture(resize, GL_RGBA, rgbaBitmap.rowBytesAsPixels(), rgbaBitmap.bytesPerPixel(), width, height, GL_UNSIGNED_BYTE, rgbaBitmap.getPixels()); |