gen_shader=0;\r
osd_program=0;\r
\r
+#ifdef BENCHMARK_FPS\r
+ last_benchmark_time=getTimeMS();\r
+ num_benchmark_frames=0;\r
+#endif\r
\r
\r
}\r
eglSwapBuffers(egl_display, egl_surface);\r
\r
EndPainting();\r
+#ifdef BENCHMARK_FPS\r
+ num_benchmark_frames++;\r
+ if (getTimeMS()-last_benchmark_time>4000) {\r
+ float fps=1000./(float)(getTimeMS()-last_benchmark_time);\r
+ fps*=((float)num_benchmark_frames);\r
+ num_benchmark_frames=0;\r
+ Log::getInstance()->log("OSD", Log::NOTICE, "Current FPS %g", fps);\r
+ last_benchmark_time=getTimeMS();\r
+\r
+ }\r
+\r
+#endif\r
\r
\r
// if (!external_driving) {\r
#include "threadp.h"\r
#include "mutex.h"\r
\r
-\r
+#define BENCHMARK_FPS\r
\r
\r
\r
EGLDisplay egl_display;\r
EGLSurface egl_surface;\r
EGLContext egl_context;\r
+#ifdef BENCHMARK_FPS\r
+ long long last_benchmark_time;\r
+ unsigned int num_benchmark_frames;\r
+#endif\r
\r
};\r
\r