Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: bench/nanobench.cpp

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/nanobench.h ('k') | cmake/CMakeLists.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
};
« no previous file with comments | « bench/nanobench.h ('k') | cmake/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698