1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #ifndef ANDROID_HWUI_DEBUG_H 18 #define ANDROID_HWUI_DEBUG_H 19 20 // Turn on to check for OpenGL errors on each frame 21 #define DEBUG_OPENGL 1 22 23 // Turn on to display informations about the GPU 24 #define DEBUG_EXTENSIONS 0 25 26 // Turn on to enable initialization information 27 #define DEBUG_INIT 0 28 29 // Turn on to enable memory usage summary on each frame 30 #define DEBUG_MEMORY_USAGE 0 31 32 // Turn on to enable debugging of cache flushes 33 #define DEBUG_CACHE_FLUSH 0 34 35 // Turn on to enable layers debugging when rendered as regions 36 #define DEBUG_LAYERS_AS_REGIONS 0 37 38 // Turn on to enable debugging when the clip is not a rect 39 #define DEBUG_CLIP_REGIONS 0 40 41 // Turn on to display debug info about vertex/fragment shaders 42 #define DEBUG_PROGRAMS 0 43 44 // Turn on to display info about layers 45 #define DEBUG_LAYERS 0 46 47 // Turn on to display info about render buffers 48 #define DEBUG_RENDER_BUFFERS 0 49 50 // Turn on to make stencil operations easier to debug 51 // (writes 255 instead of 1 in the buffer, forces 8 bit stencil) 52 #define DEBUG_STENCIL 0 53 54 // Turn on to display debug info about 9patch objects 55 #define DEBUG_PATCHES 0 56 // Turn on to "explode" 9patch objects 57 #define DEBUG_EXPLODE_PATCHES 0 58 // Turn on to display vertex and tex coords data about 9patch objects 59 // This flag requires DEBUG_PATCHES to be turned on 60 #define DEBUG_PATCHES_VERTICES 0 61 // Turn on to display vertex and tex coords data used by empty quads 62 // in 9patch objects 63 // This flag requires DEBUG_PATCHES to be turned on 64 #define DEBUG_PATCHES_EMPTY_VERTICES 0 65 66 // Turn on to display debug info about shapes 67 #define DEBUG_PATHS 0 68 69 // Turn on to display debug info about textures 70 #define DEBUG_TEXTURES 0 71 72 // Turn on to display debug info about the layer renderer 73 #define DEBUG_LAYER_RENDERER 0 74 75 // Turn on to enable additional debugging in the font renderers 76 #define DEBUG_FONT_RENDERER 0 77 78 // Turn on to log draw operation batching and deferral information 79 #define DEBUG_DEFER 0 80 81 // Turn on to dump display list state 82 #define DEBUG_DISPLAY_LIST 0 83 84 // Turn on to insert an event marker for each display list op 85 #define DEBUG_DISPLAY_LIST_OPS_AS_EVENTS 0 86 87 // Turn on to highlight drawing batches and merged batches with different colors 88 #define DEBUG_MERGE_BEHAVIOR 0 89 90 #if DEBUG_INIT 91 #define INIT_LOGD(...) ALOGD(__VA_ARGS__) 92 #else 93 #define INIT_LOGD(...) 94 #endif 95 96 #endif // ANDROID_HWUI_DEBUG_H 97