blob: e472a4c51447d380b71d7f57d763a293de951cc9 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
bungeman@google.combe9ad4e2011-06-07 19:16:02 +00008#ifndef SkBenchGpuTimer_DEFINED
9#define SkBenchGpuTimer_DEFINED
10
robertphillips@google.com6177e692013-02-28 20:16:25 +000011class SkGLContextHelper;
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000012
13class BenchGpuTimer {
14public:
robertphillips@google.com6177e692013-02-28 20:16:25 +000015 BenchGpuTimer(const SkGLContextHelper* glctx);
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000016 ~BenchGpuTimer();
17 void startGpu();
18 double endGpu();
19private:
bsalomon@google.com373a6632011-10-19 20:43:20 +000020 unsigned fQuery;
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000021 int fStarted;
robertphillips@google.com6177e692013-02-28 20:16:25 +000022 const SkGLContextHelper* fContext;
bsalomon@google.com373a6632011-10-19 20:43:20 +000023 bool fSupported;
bungeman@google.combe9ad4e2011-06-07 19:16:02 +000024};
25
26#endif