]> git.cworth.org Git - apitrace/blobdiff - egltrace.py
Don't abuse NotImplementedError.
[apitrace] / egltrace.py
index e16367a7fa1ac927424d4a27893833ff89b09de1..5d5c7593a9f51b8663b901e9fe969786d7fa2115 100644 (file)
@@ -53,15 +53,15 @@ class EglTracer(GlTracer):
             print '    // update the profile'
             print '    if (ctx != EGL_NO_CONTEXT) {'
             print '        EGLint api = EGL_OPENGL_ES_API, version = 1;'
-            print '        tracer_context *tr = __get_context();'
+            print '        gltrace::Context *tr = gltrace::getContext();'
             print '        __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);'
             print '        __eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &version);'
             print '        if (api == EGL_OPENGL_API)'
-            print '            tr->profile = PROFILE_COMPAT;'
+            print '            tr->profile = gltrace::PROFILE_COMPAT;'
             print '        else if (version == 1)'
-            print '            tr->profile = PROFILE_ES1;'
+            print '            tr->profile = gltrace::PROFILE_ES1;'
             print '        else'
-            print '            tr->profile = PROFILE_ES2;'
+            print '            tr->profile = gltrace::PROFILE_ES2;'
             print '    }'
 
     def wrapRet(self, function, instance):
@@ -113,6 +113,12 @@ if __name__ == '__main__':
     print r'''
 
 
+/*
+ * Android does not support LD_PRELOAD.
+ */
+#if !defined(ANDROID)
+
+
 /*
  * Invoke the true dlopen() function.
  */
@@ -186,5 +192,8 @@ void * dlopen(const char *filename, int flag)
 }
 
 
+#endif /* !ANDROID */
+
+
 
 '''