diff options
Diffstat (limited to 'bench/BenchGpuTimer_gl.h')
-rw-r--r-- | bench/BenchGpuTimer_gl.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/bench/BenchGpuTimer_gl.h b/bench/BenchGpuTimer_gl.h index ac23482..7c7b5c2 100644 --- a/bench/BenchGpuTimer_gl.h +++ b/bench/BenchGpuTimer_gl.h @@ -1,33 +1,26 @@ + +/* + * Copyright 2011 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ #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 SkGLContext; class BenchGpuTimer { public: - BenchGpuTimer(); + BenchGpuTimer(const SkGLContext* glctx); ~BenchGpuTimer(); void startGpu(); double endGpu(); private: - GLuint fQuery; + unsigned fQuery; int fStarted; + const SkGLContext* fContext; + bool fSupported; }; #endif |