Index: tools/kilobench/kilobench.cpp |
diff --git a/tools/kilobench/kilobench.cpp b/tools/kilobench/kilobench.cpp |
index 81238353e215e19c6a0597b9229e7a3f5ce047eb..c0422d81eb6d2bbfbf0bf62990eb1bcd645a6aa9 100644 |
--- a/tools/kilobench/kilobench.cpp |
+++ b/tools/kilobench/kilobench.cpp |
@@ -20,7 +20,6 @@ |
#include "Timer.h" |
#include "VisualSKPBench.h" |
#include "gl/GrGLDefines.h" |
-#include "gl/GrGLUtil.h" |
#include "../private/SkMutex.h" |
#include "../private/SkSemaphore.h" |
#include "../private/SkGpuFenceSync.h" |
@@ -29,8 +28,6 @@ |
#include <unistd.h> |
#include <sys/types.h> |
#include <sys/wait.h> |
- |
-using namespace sk_gpu_test; |
/* |
* This is an experimental GPU only benchmarking program. The initial implementation will only |
@@ -147,14 +144,14 @@ |
void setup() { |
fGL->makeCurrent(); |
// Make sure we're done with whatever came before. |
- GR_GL_CALL(fGL->gl(), Finish()); |
+ SK_GL(*fGL, Finish()); |
} |
SkCanvas* beginTiming(SkCanvas* canvas) { return canvas; } |
void endTiming(bool usePlatformSwapBuffers) { |
if (fGL) { |
- GR_GL_CALL(fGL->gl(), Flush()); |
+ SK_GL(*fGL, Flush()); |
if (usePlatformSwapBuffers) { |
fGL->swapBuffers(); |
} else { |
@@ -163,7 +160,7 @@ |
} |
} |
void finish() { |
- GR_GL_CALL(fGL->gl(), Finish()); |
+ SK_GL(*fGL, Finish()); |
} |
bool needsFrameTiming(int* maxFrameLag) const { |
@@ -218,10 +215,10 @@ |
return true; |
} |
- GLContext* gl() { return fGL; } |
+ SkGLContext* gl() { return fGL; } |
private: |
- GLContext* fGL; |
+ SkGLContext* fGL; |
SkAutoTDelete<SkSurface> fSurface; |
}; |
@@ -282,7 +279,7 @@ |
static double now_ms() { return SkTime::GetNSecs() * 1e-6; } |
struct TimingThread { |
- TimingThread(GLContext* mainContext) |
+ TimingThread(SkGLContext* mainContext) |
: fFenceSync(mainContext->fenceSync()) |
, fMainContext(mainContext) |
, fDone(false) {} |
@@ -308,8 +305,8 @@ |
void timingLoop() { |
// Create a context which shares display lists with the main thread |
- SkAutoTDelete<GLContext> glContext(CreatePlatformGLContext(kNone_GrGLStandard, |
- fMainContext)); |
+ SkAutoTDelete<SkGLContext> glContext(SkCreatePlatformGLContext(kNone_GrGLStandard, |
+ fMainContext)); |
glContext->makeCurrent(); |
// Basic timing methodology is: |
@@ -405,7 +402,7 @@ |
SyncQueue fFrameEndSyncs; |
SkTArray<double> fTimings; |
SkMutex fDoneMutex; |
- GLContext* fMainContext; |
+ SkGLContext* fMainContext; |
bool fDone; |
}; |