diff options
author | Romain Guy <romainguy@google.com> | 2010-11-10 11:59:15 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-11-10 11:59:15 -0800 |
commit | c15008e72ec00ca20a271c3006dac649fd07533b (patch) | |
tree | a518cebc2b12966bde88c0a3a80ee19b989d17bb /libs/hwui/OpenGLRenderer.cpp | |
parent | 21c1114dad3a778992479ec8ef514e412a7b2646 (diff) | |
download | frameworks_base-c15008e72ec00ca20a271c3006dac649fd07533b.zip frameworks_base-c15008e72ec00ca20a271c3006dac649fd07533b.tar.gz frameworks_base-c15008e72ec00ca20a271c3006dac649fd07533b.tar.bz2 |
Move all debug flags in a single place.
This change also adds a new memory usage flag. When turned on, the
following is printed after every frame:
D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes):
D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520
D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608
D/OpenGLRenderer( 3723): GradientCache 135168 / 524288
D/OpenGLRenderer( 3723): PathCache 41180 / 4194304
D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152
D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144
D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144
D/OpenGLRenderer( 3723): Other:
D/OpenGLRenderer( 3723): FboCache 2 / 12
D/OpenGLRenderer( 3723): PatchCache 31 / 512
D/OpenGLRenderer( 3723): Total memory usage:
D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB
This should help tracking possibe memory issues.
Change-Id: I83f483ca1d2dbef904829bce368e33fe5503e8d6
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 782d9b2..19a5973 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -161,6 +161,9 @@ void OpenGLRenderer::finish() { LOGD("GL error from OpenGLRenderer: 0x%x", status); } #endif +#if DEBUG_MEMORY_USAGE + mCaches.dumpMemoryUsage(); +#endif } void OpenGLRenderer::acquireContext() { |