blob: ac2348274a1ac5127cb2f2f12d1afcfaa60b793c [file] [log] [blame]
bungeman@google.combe9ad4e2011-06-07 19:16:02 +00001#ifndef SkBenchGpuTimer_DEFINED
2#define SkBenchGpuTimer_DEFINED
3
4#if defined(SK_MESA)
5 #include <GL/osmesa.h>
6
7#elif defined(SK_BUILD_FOR_WIN32)
8 #define WIN32_LEAN_AND_MEAN 1
9 #include <Windows.h>
10 #include <GL/GL.h>
11
12#elif defined(SK_BUILD_FOR_MAC)
13 #include <OpenGL/gl.h>
14
15#elif defined(SK_BUILD_FOR_UNIX)
16 #include <GL/gl.h>
17
18#else
19 #error unsupported platform
20#endif
21
22class BenchGpuTimer {
23public:
24 BenchGpuTimer();
25 ~BenchGpuTimer();
26 void startGpu();
27 double endGpu();
28private:
29 GLuint fQuery;
30 int fStarted;
31};
32
33#endif