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/Debug.h | |
parent | 21c1114dad3a778992479ec8ef514e412a7b2646 (diff) |
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/Debug.h')
-rw-r--r-- | libs/hwui/Debug.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h new file mode 100644 index 000000000000..feaba258354a --- /dev/null +++ b/libs/hwui/Debug.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ANDROID_HWUI_DEBUG_H +#define ANDROID_HWUI_DEBUG_H + +// Turn on to check for OpenGL errors on each frame +#define DEBUG_OPENGL 1 + +// Turn on to enable memory usage summary on each frame +#define DEBUG_MEMORY_USAGE 0 + +// Turn on to enable layers debugging when renderered as regions +#define DEBUG_LAYERS_AS_REGIONS 0 + +// Turn on to display debug info about vertex/fragment shaders +#define DEBUG_PROGRAMS 0 + +// Turn on to display info about layers +#define DEBUG_LAYERS 0 + +// Turn on to display debug infor about 9patch objects +#define DEBUG_PATCHES 0 + +// Turn on to display debug info about paths +#define DEBUG_PATHS 0 + +// Turn on to display debug info about textures +#define DEBUG_TEXTURES 0 + +#endif // ANDROID_HWUI_DEBUG_H |