Index: bench/nanobench.cpp |
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp |
index c0f674fc59d141ed246437aaafb55cf077821549..235de02f578cce7d7b77efc3988fa29bb67dbc2d 100644 |
--- a/bench/nanobench.cpp |
+++ b/bench/nanobench.cpp |
@@ -56,6 +56,9 @@ |
#include "gl/GrGLDefines.h" |
#include "GrCaps.h" |
#include "GrContextFactory.h" |
+ #include "gl/GrGLUtil.h" |
+ using sk_gpu_test::GrContextFactory; |
+ using sk_gpu_test::GLContext; |
SkAutoTDelete<GrContextFactory> gGrFactory; |
#endif |
@@ -155,21 +158,21 @@ bool Target::capturePixels(SkBitmap* bmp) { |
#if SK_SUPPORT_GPU |
struct GPUTarget : public Target { |
explicit GPUTarget(const Config& c) : Target(c), gl(nullptr) { } |
- SkGLContext* gl; |
+ GLContext* gl; |
void setup() override { |
this->gl->makeCurrent(); |
// Make sure we're done with whatever came before. |
- SK_GL(*this->gl, Finish()); |
+ GR_GL_CALL(this->gl->gl(), Finish()); |
} |
void endTiming() override { |
if (this->gl) { |
- SK_GL(*this->gl, Flush()); |
+ GR_GL_CALL(this->gl->gl(), Flush()); |
this->gl->waitOnSyncOrSwap(); |
} |
} |
void fence() override { |
- SK_GL(*this->gl, Finish()); |
+ GR_GL_CALL(this->gl->gl(), Finish()); |
} |
bool needsFrameTiming(int* maxFrameLag) const override { |
@@ -200,16 +203,16 @@ struct GPUTarget : public Target { |
} |
void fillOptions(ResultsWriter* log) override { |
const GrGLubyte* version; |
- SK_GL_RET(*this->gl, version, GetString(GR_GL_VERSION)); |
+ GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VERSION)); |
log->configOption("GL_VERSION", (const char*)(version)); |
- SK_GL_RET(*this->gl, version, GetString(GR_GL_RENDERER)); |
+ GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_RENDERER)); |
log->configOption("GL_RENDERER", (const char*) version); |
- SK_GL_RET(*this->gl, version, GetString(GR_GL_VENDOR)); |
+ GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VENDOR)); |
log->configOption("GL_VENDOR", (const char*) version); |
- SK_GL_RET(*this->gl, version, GetString(GR_GL_SHADING_LANGUAGE_VERSION)); |
+ GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_SHADING_LANGUAGE_VERSION)); |
log->configOption("GL_SHADING_LANGUAGE_VERSION", (const char*) version); |
} |
}; |