2 * Copyright (C) 2010 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef ANDROID_HWUI_DEBUG_H
18 #define ANDROID_HWUI_DEBUG_H
20 #define DEBUG_LEVEL_HIGH 3
21 #define DEBUG_LEVEL_MODERATE 2
22 #define DEBUG_LEVEL_LOW 1
23 #define DEBUG_LEVEL_NONE 0
25 // Turn on to check for OpenGL errors on each frame
26 // Note DEBUG_LEVEL_HIGH for DEBUG_OPENGL is only setable by enabling
27 // HWUI_ENABLE_OPENGL_VALIDATION when building HWUI. Similarly if
28 // HWUI_ENABLE_OPENGL_VALIDATION is set then this is always DEBUG_LEVEL_HIGH
30 #define DEBUG_OPENGL DEBUG_LEVEL_LOW
33 // Turn on to enable initialization information
36 // Turn on to enable memory usage summary on each frame
37 #define DEBUG_MEMORY_USAGE 0
39 // Turn on to enable debugging of cache flushes
40 #define DEBUG_CACHE_FLUSH 0
42 // Turn on to enable layers debugging when rendered as regions
43 #define DEBUG_LAYERS_AS_REGIONS 0
45 // Turn on to enable debugging when the clip is not a rect
46 #define DEBUG_CLIP_REGIONS 0
48 // Turn on to display debug info about vertex/fragment shaders
49 #define DEBUG_PROGRAMS 0
51 // Turn on to display info about layers
52 #define DEBUG_LAYERS 0
54 // Turn on to display info about render buffers
55 #define DEBUG_RENDER_BUFFERS 0
57 // Turn on to make stencil operations easier to debug
58 // (writes 255 instead of 1 in the buffer, forces 8 bit stencil)
59 #define DEBUG_STENCIL 0
61 // Turn on to display debug info about 9patch objects
62 #define DEBUG_PATCHES 0
63 // Turn on to display vertex and tex coords data about 9patch objects
64 // This flag requires DEBUG_PATCHES to be turned on
65 #define DEBUG_PATCHES_VERTICES 0
66 // Turn on to display vertex and tex coords data used by empty quads
68 // This flag requires DEBUG_PATCHES to be turned on
69 #define DEBUG_PATCHES_EMPTY_VERTICES 0
71 // Turn on to display debug info about shapes
74 // Turn on to display debug info about textures
75 #define DEBUG_TEXTURES 0
77 // Turn on to display debug info about the layer renderer
78 #define DEBUG_LAYER_RENDERER 0
80 // Turn on to enable additional debugging in the font renderers
81 #define DEBUG_FONT_RENDERER 0
83 // Turn on to log draw operation batching and deferral information
86 // Turn on to dump display list state
87 #define DEBUG_DISPLAY_LIST 0
89 // Turn on to insert an event marker for each display list op
90 #define DEBUG_DISPLAY_LIST_OPS_AS_EVENTS 0
92 // Turn on to insert detailed event markers
93 #define DEBUG_DETAILED_EVENTS 0
95 // Turn on to highlight drawing batches and merged batches with different colors
96 #define DEBUG_MERGE_BEHAVIOR 0
98 // Turn on to enable debugging shadow
99 #define DEBUG_SHADOW 0
101 // Turn on to enable debugging vector drawable
102 #define DEBUG_VECTOR_DRAWABLE 0
105 #define INIT_LOGD(...) ALOGD(__VA_ARGS__)
107 #define INIT_LOGD(...)
110 #endif // ANDROID_HWUI_DEBUG_H