aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/android
diff options
context:
space:
mode:
authordhewg2011-04-03 17:33:10 +0200
committerdhewg2011-04-03 20:34:14 +0200
commit1692605b0840cd869a83bd87055e9372acda0e76 (patch)
treeea68bbf96bb5439d8532c9e388af92acc7f7f49a /backends/platform/android
parent101d4b66e234fda4670edb4c81262381bcf661ab (diff)
downloadscummvm-rg350-1692605b0840cd869a83bd87055e9372acda0e76.tar.gz
scummvm-rg350-1692605b0840cd869a83bd87055e9372acda0e76.tar.bz2
scummvm-rg350-1692605b0840cd869a83bd87055e9372acda0e76.zip
ANDROID: Helper define to debug hanging GLES calls
Diffstat (limited to 'backends/platform/android')
-rw-r--r--backends/platform/android/android.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index 40dc0fe4fd..76db012173 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -48,6 +48,7 @@
// toggles start
//#define ANDROID_DEBUG_ENTER
//#define ANDROID_DEBUG_GL
+//#define ANDROID_DEBUG_GL_CALLS
// toggles end
extern const char *android_log_tag;
@@ -67,9 +68,23 @@ extern const char *android_log_tag;
#ifdef ANDROID_DEBUG_GL
extern void checkGlError(const char *expr, const char *file, int line);
+#ifdef ANDROID_DEBUG_GL_CALLS
+#define GLCALLLOG(x, before) \
+ do { \
+ if (before) \
+ LOGD("calling '%s' (%s:%d)", x, __FILE__, __LINE__); \
+ else \
+ LOGD("returned from '%s' (%s:%d)", x, __FILE__, __LINE__); \
+ } while (false)
+#else
+#define GLCALLLOG(x, before) do { } while (false)
+#endif
+
#define GLCALL(x) \
do { \
+ GLCALLLOG(#x, true); \
(x); \
+ GLCALLLOG(#x, false); \
checkGlError(#x, __FILE__, __LINE__); \
} while (false)