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