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
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 701df83..d860953 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -94,6 +94,8 @@
// 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 @@
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::clear() {
Mutex::Autolock _l(mLock);
mCache.clear();
+ TEXTURE_LOGD("TextureCache:clear(), miSize = %d", mSize);
}
void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool regenerate) {