/* * 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 #elif defined(SK_BUILD_FOR_WIN32) #define WIN32_LEAN_AND_MEAN 1 #include #include #elif defined(SK_BUILD_FOR_MAC) #include #elif defined(SK_BUILD_FOR_UNIX) #include #else #error unsupported platform #endif class BenchGpuTimer { public: BenchGpuTimer(); ~BenchGpuTimer(); void startGpu(); double endGpu(); private: GLuint fQuery; int fStarted; }; #endif