summaryrefslogtreecommitdiff
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2010-10-25 15:47:32 -0700
committer Chet Haase <chet@google.com> 2010-10-26 06:54:55 -0700
commitd98aa2de9ab18e09c2be1997f41212740f51f6e6 (patch)
tree04bf505226c6a38fde7a466e28154e006e806f30 /libs/hwui/TextureCache.cpp
parent9bb127869666be6507fb5c4b37b7d1965c7e5fa6 (diff)
DisplayList optimizations and fixes.
We now use a copy of SkPaint objects to avoid having it changed from under us. We reuse copies that have not changed. We also copy the SkMatrix every time to avoid the same problem. Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 701df8358964..d860953bc247 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -94,6 +94,8 @@ void TextureCache::operator()(SkBitmap*& bitmap, Texture*& texture) {
// This will be called already locked
if (texture) {
mSize -= texture->bitmapSize;
+ TEXTURE_LOGD("TextureCache::callback: removed size, mSize = %d, %d",
+ texture->bitmapSize, mSize);
glDeleteTextures(1, &texture->id);
delete texture;
}
@@ -131,6 +133,8 @@ Texture* TextureCache::get(SkBitmap* bitmap) {
if (size < mMaxSize) {
mLock.lock();
mSize += size;
+ TEXTURE_LOGD("TextureCache::get: create texture(0x%p): size, mSize = %d, %d",
+ bitmap, size, mSize);
mCache.put(bitmap, texture);
mLock.unlock();
} else {
@@ -151,6 +155,7 @@ void TextureCache::remove(SkBitmap* bitmap) {
void TextureCache::clear() {
Mutex::Autolock _l(mLock);
mCache.clear();
+ TEXTURE_LOGD("TextureCache:clear(), miSize = %d", mSize);
}
void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate) {