diff options
author | robertphillips <robertphillips@google.com> | 2016-03-30 09:26:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-30 09:26:24 -0700 |
commit | 6f70d43719d0583d486a000f66e915c10a6b83a2 (patch) | |
tree | 6f9511faa88ca6d44932e1a247fc10c0f297a3e0 /bench | |
parent | fe3456cb006110d045b26ff3f8681b893a757b58 (diff) |
Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ )
Reason for revert:
red bots
Original issue's description:
> Move SkGLContext and some GrGLInterface implementations to skgputest module
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58
TBR=jvanverth@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1845473004
Diffstat (limited to 'bench')
-rw-r--r-- | bench/nanobench.cpp | 19 | ||||
-rw-r--r-- | bench/nanobench.h | 4 |
2 files changed, 10 insertions, 13 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 235de02f57..c0f674fc59 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -56,9 +56,6 @@ #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 @@ -158,21 +155,21 @@ bool Target::capturePixels(SkBitmap* bmp) { #if SK_SUPPORT_GPU struct GPUTarget : public Target { explicit GPUTarget(const Config& c) : Target(c), gl(nullptr) { } - GLContext* gl; + SkGLContext* gl; void setup() override { this->gl->makeCurrent(); // Make sure we're done with whatever came before. - GR_GL_CALL(this->gl->gl(), Finish()); + SK_GL(*this->gl, Finish()); } void endTiming() override { if (this->gl) { - GR_GL_CALL(this->gl->gl(), Flush()); + SK_GL(*this->gl, Flush()); this->gl->waitOnSyncOrSwap(); } } void fence() override { - GR_GL_CALL(this->gl->gl(), Finish()); + SK_GL(*this->gl, Finish()); } bool needsFrameTiming(int* maxFrameLag) const override { @@ -203,16 +200,16 @@ struct GPUTarget : public Target { } void fillOptions(ResultsWriter* log) override { const GrGLubyte* version; - GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VERSION)); + SK_GL_RET(*this->gl, version, GetString(GR_GL_VERSION)); log->configOption("GL_VERSION", (const char*)(version)); - GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_RENDERER)); + SK_GL_RET(*this->gl, version, GetString(GR_GL_RENDERER)); log->configOption("GL_RENDERER", (const char*) version); - GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_VENDOR)); + SK_GL_RET(*this->gl, version, GetString(GR_GL_VENDOR)); log->configOption("GL_VENDOR", (const char*) version); - GR_GL_CALL_RET(this->gl->gl(), version, GetString(GR_GL_SHADING_LANGUAGE_VERSION)); + SK_GL_RET(*this->gl, version, GetString(GR_GL_SHADING_LANGUAGE_VERSION)); log->configOption("GL_SHADING_LANGUAGE_VERSION", (const char*) version); } }; diff --git a/bench/nanobench.h b/bench/nanobench.h index 844811e26d..5e4efbf077 100644 --- a/bench/nanobench.h +++ b/bench/nanobench.h @@ -29,8 +29,8 @@ struct Config { SkColorProfileType profile; int samples; #if SK_SUPPORT_GPU - sk_gpu_test::GrContextFactory::GLContextType ctxType; - sk_gpu_test::GrContextFactory::GLContextOptions ctxOptions; + GrContextFactory::GLContextType ctxType; + GrContextFactory::GLContextOptions ctxOptions; bool useDFText; #else int bogusInt; |