From e190aa69756aecfaffabdd4c6d32cb6b3220d842 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 10 Nov 2010 19:01:29 -0800 Subject: Add new runtime debug flags. Change-Id: I07955de166a89b5053c6c13f250bb3e2936ca86e --- libs/hwui/PathCache.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/hwui/PathCache.cpp') 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 { -- cgit v1.2.3-59-g8ed1b