diff options
author | 2011-07-26 20:35:55 -0700 | |
---|---|---|
committer | 2011-07-26 20:35:55 -0700 | |
commit | eea60692b060737faeaa02bb30f5b79e2202b482 (patch) | |
tree | 3dcf0aee4e80c38b0475250767a37901e686fde7 /libs/hwui/LayerCache.cpp | |
parent | 912a7b32d0c59ba38265c5dd6ff84ce93f909a7f (diff) |
Improve layers debugging
Change-Id: Ia4950dd5f0e0a224ecb69c581d33aa4f32260a7c
Diffstat (limited to 'libs/hwui/LayerCache.cpp')
-rw-r--r-- | libs/hwui/LayerCache.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index 58c0fac67d18..89c35da3f088 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -112,17 +112,21 @@ Layer* LayerCache::get(const uint32_t width, const uint32_t height) { glPixelStorei(GL_UNPACK_ALIGNMENT, 4); #if DEBUG_LAYERS - size_t size = mCache.size(); - for (size_t i = 0; i < size; i++) { - const LayerEntry& entry = mCache.itemAt(i); - LAYER_LOGD(" Layer size %dx%d", entry.mWidth, entry.mHeight); - } + dump(); #endif } return layer; } +void LayerCache::dump() { + size_t size = mCache.size(); + for (size_t i = 0; i < size; i++) { + const LayerEntry& entry = mCache.itemAt(i); + LAYER_LOGD(" Layer size %dx%d", entry.mWidth, entry.mHeight); + } +} + bool LayerCache::resize(Layer* layer, const uint32_t width, const uint32_t height) { // TODO: We should be smarter and see if we have a texture of the appropriate // size already in the cache, and reuse it instead of creating a new one |