diff options
author | 2010-11-10 19:01:29 -0800 | |
---|---|---|
committer | 2010-11-10 19:01:29 -0800 | |
commit | e190aa69756aecfaffabdd4c6d32cb6b3220d842 (patch) | |
tree | 3e0b6400e428be77544e2670627eeec8ceb6a434 /libs/hwui/PathCache.cpp | |
parent | c15008e72ec00ca20a271c3006dac649fd07533b (diff) |
Add new runtime debug flags.
Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r-- | libs/hwui/PathCache.cpp | 8 |
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 { |