summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-11-10 19:06:17 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2010-11-10 19:06:17 -0800
commit6ae689201f23643bcffc8ca95872a905ff2f8d32 (patch)
tree9b6b5dbc191e2feba2d125e0c0b5bd7d80064107 /libs/hwui/PathCache.cpp
parent2f8b27bfe5527e9b6b5078123d38fb5e65fff5ec (diff)
parente190aa69756aecfaffabdd4c6d32cb6b3220d842 (diff)
Merge "Add new runtime debug flags."
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 04d07dbbee8a..7ff26dcaf080 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -63,6 +63,8 @@ void PathCache::init() {
GLint maxTextureSize;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);
mMaxTextureSize = maxTextureSize;
+
+ mDebugEnabled = readDebugLevel() & kDebugCaches;
}
///////////////////////////////////////////////////////////////////////////////
@@ -98,6 +100,9 @@ void PathCache::operator()(PathCacheEntry& path, PathTexture*& texture) {
PATH_LOGD("PathCache::callback: delete path: name, size, mSize = %d, %d, %d",
texture->id, size, mSize);
+ if (mDebugEnabled) {
+ LOGD("Path deleted, size = %d", size);
+ }
glDeleteTextures(1, &texture->id);
delete texture;
@@ -199,6 +204,9 @@ PathTexture* PathCache::addTexture(const PathCacheEntry& entry,
mSize += size;
PATH_LOGD("PathCache::get: create path: name, size, mSize = %d, %d, %d",
texture->id, size, mSize);
+ if (mDebugEnabled) {
+ LOGD("Path created, size = %d", size);
+ }
mCache.put(entry, texture);
mLock.unlock();
} else {