2011-07-28 14:26:00 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-06-07 19:16:02 +00:00
|
|
|
#ifndef SkBenchGpuTimer_DEFINED
|
|
|
|
#define SkBenchGpuTimer_DEFINED
|
|
|
|
|
2013-02-28 20:16:25 +00:00
|
|
|
class SkGLContextHelper;
|
2011-06-07 19:16:02 +00:00
|
|
|
|
|
|
|
class BenchGpuTimer {
|
|
|
|
public:
|
2013-02-28 20:16:25 +00:00
|
|
|
BenchGpuTimer(const SkGLContextHelper* glctx);
|
2011-06-07 19:16:02 +00:00
|
|
|
~BenchGpuTimer();
|
|
|
|
void startGpu();
|
|
|
|
double endGpu();
|
|
|
|
private:
|
2011-10-19 20:43:20 +00:00
|
|
|
unsigned fQuery;
|
2011-06-07 19:16:02 +00:00
|
|
|
int fStarted;
|
2013-02-28 20:16:25 +00:00
|
|
|
const SkGLContextHelper* fContext;
|
2011-10-19 20:43:20 +00:00
|
|
|
bool fSupported;
|
2011-06-07 19:16:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|