summaryrefslogtreecommitdiff
path: root/libs/hwui/Debug.h
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2016-01-22 16:28:07 -0800
committer John Reck <jreck@google.com> 2016-01-25 16:15:14 -0800
commit975591a7af883d866d86ab819e164c6004694744 (patch)
treeb0247aebad80c7380141137e9de8d7edcf1ef89f /libs/hwui/Debug.h
parentfe434a15d6bde9299b51dc284b336944e5cf8a1c (diff)
Add fine-grained debug layer
Full GLES error checking layer via -include trickery. Change DEBUG_OPENGL to a level system. HIGH = every GL call is error checked MODERATE = checkpointing at interesting spots LOW = only asserts there are no errors at the end of a frame or when the FBO changes NONE = AIN'T GOT NO TIME FOR ERRORS GOTTA GO FAST! Change-Id: Ibe81aae93d942059c4ddf1cbb11c828b7ce4c10b
Diffstat (limited to 'libs/hwui/Debug.h')
-rw-r--r--libs/hwui/Debug.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h
index e98fa0440591..748edef730b7 100644
--- a/libs/hwui/Debug.h
+++ b/libs/hwui/Debug.h
@@ -17,8 +17,18 @@
#ifndef ANDROID_HWUI_DEBUG_H
#define ANDROID_HWUI_DEBUG_H
+#define DEBUG_LEVEL_HIGH 3
+#define DEBUG_LEVEL_MODERATE 2
+#define DEBUG_LEVEL_LOW 1
+#define DEBUG_LEVEL_NONE 0
+
// Turn on to check for OpenGL errors on each frame
-#define DEBUG_OPENGL 1
+// Note DEBUG_LEVEL_HIGH for DEBUG_OPENGL is only setable by enabling
+// HWUI_ENABLE_OPENGL_VALIDATION when building HWUI. Similarly if
+// HWUI_ENABLE_OPENGL_VALIDATION is set then this is always DEBUG_LEVEL_HIGH
+#ifndef DEBUG_OPENGL
+#define DEBUG_OPENGL DEBUG_LEVEL_LOW
+#endif
// Turn on to enable initialization information
#define DEBUG_INIT 0