summaryrefslogtreecommitdiff
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@android.com> 2010-07-02 11:22:20 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-07-02 11:22:20 -0700
commit216108c492fef05261c70f1018d94cef0c3b23fd (patch)
treec5d58d38330c01f875858f6fd0433fa0f2ed85d0 /libs/hwui/TextureCache.cpp
parent45d7927dbcab48c7e76b6dd33a4ce67ba1be7da0 (diff)
parent7d139ba2c331f11e9b485753cc727a0ff202f2a4 (diff)
Merge "Remove extra leftover logs and use uint32_t instead of unsigned int."
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 10e4f9e5df53..93ee138a373c 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -27,7 +27,7 @@ namespace uirenderer {
// Constructors/destructor
///////////////////////////////////////////////////////////////////////////////
-TextureCache::TextureCache(unsigned int maxByteSize):
+TextureCache::TextureCache(uint32_t maxByteSize):
mCache(GenerationCache<SkBitmap, Texture>::kUnlimitedCapacity),
mSize(0), mMaxSize(maxByteSize) {
mCache.setOnEntryRemovedListener(this);
@@ -41,15 +41,15 @@ TextureCache::~TextureCache() {
// Size management
///////////////////////////////////////////////////////////////////////////////
-unsigned int TextureCache::getSize() {
+uint32_t TextureCache::getSize() {
return mSize;
}
-unsigned int TextureCache::getMaxSize() {
+uint32_t TextureCache::getMaxSize() {
return mMaxSize;
}
-void TextureCache::setMaxSize(unsigned int maxSize) {
+void TextureCache::setMaxSize(uint32_t maxSize) {
mMaxSize = maxSize;
while (mSize > mMaxSize) {
mCache.removeOldest();
@@ -62,7 +62,7 @@ void TextureCache::setMaxSize(unsigned int maxSize) {
void TextureCache::operator()(SkBitmap* bitmap, Texture* texture) {
if (bitmap) {
- const unsigned int size = bitmap->rowBytes() * bitmap->height();
+ const uint32_t size = bitmap->rowBytes() * bitmap->height();
mSize -= size;
}
@@ -79,7 +79,7 @@ void TextureCache::operator()(SkBitmap* bitmap, Texture* texture) {
Texture* TextureCache::get(SkBitmap* bitmap) {
Texture* texture = mCache.get(bitmap);
if (!texture) {
- const unsigned int size = bitmap->rowBytes() * bitmap->height();
+ const uint32_t size = bitmap->rowBytes() * bitmap->height();
// Don't even try to cache a bitmap that's bigger than the cache
if (size < mMaxSize) {
while (mSize + size > mMaxSize) {