bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 1 | /* |
robertphillips@google.com | 6177e69 | 2013-02-28 20:16:25 +0000 | [diff] [blame] | 2 | * Copyright 2013 Google Inc. |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 7 | |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 8 | #include "GLTestContext.h" |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 9 | |
Greg Daniel | 02611d9 | 2017-07-25 10:05:01 -0400 | [diff] [blame^] | 10 | #include "GrContext.h" |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 11 | #include "GpuTimer.h" |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 12 | #include "gl/GrGLUtil.h" |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 13 | |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 14 | namespace { |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 15 | |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 16 | class GLFenceSync : public sk_gpu_test::FenceSync { |
| 17 | public: |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 18 | static std::unique_ptr<GLFenceSync> MakeIfSupported(const sk_gpu_test::GLTestContext*); |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 19 | |
| 20 | sk_gpu_test::PlatformFence SK_WARN_UNUSED_RESULT insertFence() const override; |
| 21 | bool waitFence(sk_gpu_test::PlatformFence fence) const override; |
| 22 | void deleteFence(sk_gpu_test::PlatformFence fence) const override; |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 23 | |
| 24 | private: |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 25 | GLFenceSync(const sk_gpu_test::GLTestContext*, const char* ext = ""); |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 26 | |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 27 | bool validate() { return fGLFenceSync && fGLClientWaitSync && fGLDeleteSync; } |
| 28 | |
| 29 | static constexpr GrGLenum GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; |
| 30 | static constexpr GrGLenum GL_WAIT_FAILED = 0x911d; |
| 31 | static constexpr GrGLbitfield GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 32 | |
| 33 | typedef struct __GLsync *GLsync; |
csmartdalton | 024229a | 2016-10-04 14:24:23 -0700 | [diff] [blame] | 34 | GR_STATIC_ASSERT(sizeof(GLsync) <= sizeof(sk_gpu_test::PlatformFence)); |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 35 | |
| 36 | typedef GLsync (GR_GL_FUNCTION_TYPE* GLFenceSyncProc) (GrGLenum, GrGLbitfield); |
| 37 | typedef GrGLenum (GR_GL_FUNCTION_TYPE* GLClientWaitSyncProc) (GLsync, GrGLbitfield, GrGLuint64); |
| 38 | typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GLDeleteSyncProc) (GLsync); |
| 39 | |
| 40 | GLFenceSyncProc fGLFenceSync; |
| 41 | GLClientWaitSyncProc fGLClientWaitSync; |
| 42 | GLDeleteSyncProc fGLDeleteSync; |
| 43 | |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 44 | typedef FenceSync INHERITED; |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 45 | }; |
| 46 | |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 47 | std::unique_ptr<GLFenceSync> GLFenceSync::MakeIfSupported(const sk_gpu_test::GLTestContext* ctx) { |
| 48 | std::unique_ptr<GLFenceSync> ret; |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 49 | if (kGL_GrGLStandard == ctx->gl()->fStandard) { |
| 50 | if (GrGLGetVersion(ctx->gl()) < GR_GL_VER(3,2) && !ctx->gl()->hasExtension("GL_ARB_sync")) { |
| 51 | return nullptr; |
| 52 | } |
| 53 | ret.reset(new GLFenceSync(ctx)); |
| 54 | } else { |
Brian Osman | 80be240 | 2017-04-21 15:12:30 -0400 | [diff] [blame] | 55 | if (ctx->gl()->hasExtension("GL_APPLE_sync")) { |
| 56 | ret.reset(new GLFenceSync(ctx, "APPLE")); |
| 57 | } else if (GrGLGetVersion(ctx->gl()) >= GR_GL_VER(3, 0)) { |
| 58 | ret.reset(new GLFenceSync(ctx)); |
| 59 | } else { |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 60 | return nullptr; |
| 61 | } |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 62 | } |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 63 | if (!ret->validate()) { |
| 64 | ret = nullptr; |
| 65 | } |
| 66 | return ret; |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | GLFenceSync::GLFenceSync(const sk_gpu_test::GLTestContext* ctx, const char* ext) { |
| 70 | ctx->getGLProcAddress(&fGLFenceSync, "glFenceSync"); |
| 71 | ctx->getGLProcAddress(&fGLClientWaitSync, "glClientWaitSync"); |
| 72 | ctx->getGLProcAddress(&fGLDeleteSync, "glDeleteSync"); |
| 73 | } |
| 74 | |
| 75 | sk_gpu_test::PlatformFence GLFenceSync::insertFence() const { |
| 76 | __GLsync* glsync = fGLFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); |
| 77 | return reinterpret_cast<sk_gpu_test::PlatformFence>(glsync); |
| 78 | } |
| 79 | |
| 80 | bool GLFenceSync::waitFence(sk_gpu_test::PlatformFence fence) const { |
| 81 | GLsync glsync = reinterpret_cast<GLsync>(fence); |
| 82 | return GL_WAIT_FAILED != fGLClientWaitSync(glsync, GL_SYNC_FLUSH_COMMANDS_BIT, -1); |
| 83 | } |
| 84 | |
| 85 | void GLFenceSync::deleteFence(sk_gpu_test::PlatformFence fence) const { |
| 86 | GLsync glsync = reinterpret_cast<GLsync>(fence); |
| 87 | fGLDeleteSync(glsync); |
| 88 | } |
| 89 | |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 90 | class GLGpuTimer : public sk_gpu_test::GpuTimer { |
| 91 | public: |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 92 | static std::unique_ptr<GLGpuTimer> MakeIfSupported(const sk_gpu_test::GLTestContext*); |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 93 | |
| 94 | QueryStatus checkQueryStatus(sk_gpu_test::PlatformTimerQuery) override; |
| 95 | std::chrono::nanoseconds getTimeElapsed(sk_gpu_test::PlatformTimerQuery) override; |
| 96 | void deleteQuery(sk_gpu_test::PlatformTimerQuery) override; |
| 97 | |
| 98 | private: |
| 99 | GLGpuTimer(bool disjointSupport, const sk_gpu_test::GLTestContext*, const char* ext = ""); |
| 100 | |
| 101 | bool validate() const; |
| 102 | |
| 103 | sk_gpu_test::PlatformTimerQuery onQueueTimerStart() const override; |
| 104 | void onQueueTimerStop(sk_gpu_test::PlatformTimerQuery) const override; |
| 105 | |
| 106 | static constexpr GrGLenum GL_QUERY_RESULT = 0x8866; |
| 107 | static constexpr GrGLenum GL_QUERY_RESULT_AVAILABLE = 0x8867; |
| 108 | static constexpr GrGLenum GL_TIME_ELAPSED = 0x88bf; |
| 109 | static constexpr GrGLenum GL_GPU_DISJOINT = 0x8fbb; |
| 110 | |
| 111 | typedef void (GR_GL_FUNCTION_TYPE* GLGetIntegervProc) (GrGLenum, GrGLint*); |
| 112 | typedef void (GR_GL_FUNCTION_TYPE* GLGenQueriesProc) (GrGLsizei, GrGLuint*); |
| 113 | typedef void (GR_GL_FUNCTION_TYPE* GLDeleteQueriesProc) (GrGLsizei, const GrGLuint*); |
| 114 | typedef void (GR_GL_FUNCTION_TYPE* GLBeginQueryProc) (GrGLenum, GrGLuint); |
| 115 | typedef void (GR_GL_FUNCTION_TYPE* GLEndQueryProc) (GrGLenum); |
| 116 | typedef void (GR_GL_FUNCTION_TYPE* GLGetQueryObjectuivProc) (GrGLuint, GrGLenum, GrGLuint*); |
| 117 | typedef void (GR_GL_FUNCTION_TYPE* GLGetQueryObjectui64vProc) (GrGLuint, GrGLenum, GrGLuint64*); |
| 118 | |
| 119 | GLGetIntegervProc fGLGetIntegerv; |
| 120 | GLGenQueriesProc fGLGenQueries; |
| 121 | GLDeleteQueriesProc fGLDeleteQueries; |
| 122 | GLBeginQueryProc fGLBeginQuery; |
| 123 | GLEndQueryProc fGLEndQuery; |
| 124 | GLGetQueryObjectuivProc fGLGetQueryObjectuiv; |
| 125 | GLGetQueryObjectui64vProc fGLGetQueryObjectui64v; |
| 126 | |
| 127 | |
| 128 | typedef sk_gpu_test::GpuTimer INHERITED; |
| 129 | }; |
| 130 | |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 131 | std::unique_ptr<GLGpuTimer> GLGpuTimer::MakeIfSupported(const sk_gpu_test::GLTestContext* ctx) { |
| 132 | std::unique_ptr<GLGpuTimer> ret; |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 133 | const GrGLInterface* gl = ctx->gl(); |
| 134 | if (gl->fExtensions.has("GL_EXT_disjoint_timer_query")) { |
| 135 | ret.reset(new GLGpuTimer(true, ctx, "EXT")); |
| 136 | } else if (kGL_GrGLStandard == gl->fStandard && |
| 137 | (GrGLGetVersion(gl) > GR_GL_VER(3,3) || gl->fExtensions.has("GL_ARB_timer_query"))) { |
| 138 | ret.reset(new GLGpuTimer(false, ctx)); |
| 139 | } else if (gl->fExtensions.has("GL_EXT_timer_query")) { |
| 140 | ret.reset(new GLGpuTimer(false, ctx, "EXT")); |
| 141 | } |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 142 | if (ret && !ret->validate()) { |
| 143 | ret = nullptr; |
| 144 | } |
| 145 | return ret; |
csmartdalton | c6618dd | 2016-10-05 08:42:03 -0700 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | GLGpuTimer::GLGpuTimer(bool disjointSupport, const sk_gpu_test::GLTestContext* ctx, const char* ext) |
| 149 | : INHERITED(disjointSupport) { |
| 150 | ctx->getGLProcAddress(&fGLGetIntegerv, "glGetIntegerv"); |
| 151 | ctx->getGLProcAddress(&fGLGenQueries, "glGenQueries", ext); |
| 152 | ctx->getGLProcAddress(&fGLDeleteQueries, "glDeleteQueries", ext); |
| 153 | ctx->getGLProcAddress(&fGLBeginQuery, "glBeginQuery", ext); |
| 154 | ctx->getGLProcAddress(&fGLEndQuery, "glEndQuery", ext); |
| 155 | ctx->getGLProcAddress(&fGLGetQueryObjectuiv, "glGetQueryObjectuiv", ext); |
| 156 | ctx->getGLProcAddress(&fGLGetQueryObjectui64v, "glGetQueryObjectui64v", ext); |
| 157 | } |
| 158 | |
| 159 | bool GLGpuTimer::validate() const { |
| 160 | return fGLGetIntegerv && fGLGenQueries && fGLDeleteQueries && fGLBeginQuery && fGLEndQuery && |
| 161 | fGLGetQueryObjectuiv && fGLGetQueryObjectui64v; |
| 162 | } |
| 163 | |
| 164 | sk_gpu_test::PlatformTimerQuery GLGpuTimer::onQueueTimerStart() const { |
| 165 | GrGLuint queryID; |
| 166 | fGLGenQueries(1, &queryID); |
| 167 | if (!queryID) { |
| 168 | return sk_gpu_test::kInvalidTimerQuery; |
| 169 | } |
| 170 | if (this->disjointSupport()) { |
| 171 | // Clear the disjoint flag. |
| 172 | GrGLint disjoint; |
| 173 | fGLGetIntegerv(GL_GPU_DISJOINT, &disjoint); |
| 174 | } |
| 175 | fGLBeginQuery(GL_TIME_ELAPSED, queryID); |
| 176 | return static_cast<sk_gpu_test::PlatformTimerQuery>(queryID); |
| 177 | } |
| 178 | |
| 179 | void GLGpuTimer::onQueueTimerStop(sk_gpu_test::PlatformTimerQuery platformTimer) const { |
| 180 | if (sk_gpu_test::kInvalidTimerQuery == platformTimer) { |
| 181 | return; |
| 182 | } |
| 183 | fGLEndQuery(GL_TIME_ELAPSED); |
| 184 | } |
| 185 | |
| 186 | sk_gpu_test::GpuTimer::QueryStatus |
| 187 | GLGpuTimer::checkQueryStatus(sk_gpu_test::PlatformTimerQuery platformTimer) { |
| 188 | const GrGLuint queryID = static_cast<GrGLuint>(platformTimer); |
| 189 | if (!queryID) { |
| 190 | return QueryStatus::kInvalid; |
| 191 | } |
| 192 | GrGLuint available = 0; |
| 193 | fGLGetQueryObjectuiv(queryID, GL_QUERY_RESULT_AVAILABLE, &available); |
| 194 | if (!available) { |
| 195 | return QueryStatus::kPending; |
| 196 | } |
| 197 | if (this->disjointSupport()) { |
| 198 | GrGLint disjoint = 1; |
| 199 | fGLGetIntegerv(GL_GPU_DISJOINT, &disjoint); |
| 200 | if (disjoint) { |
| 201 | return QueryStatus::kDisjoint; |
| 202 | } |
| 203 | } |
| 204 | return QueryStatus::kAccurate; |
| 205 | } |
| 206 | |
| 207 | std::chrono::nanoseconds GLGpuTimer::getTimeElapsed(sk_gpu_test::PlatformTimerQuery platformTimer) { |
| 208 | SkASSERT(this->checkQueryStatus(platformTimer) >= QueryStatus::kDisjoint); |
| 209 | const GrGLuint queryID = static_cast<GrGLuint>(platformTimer); |
| 210 | GrGLuint64 nanoseconds; |
| 211 | fGLGetQueryObjectui64v(queryID, GL_QUERY_RESULT, &nanoseconds); |
| 212 | return std::chrono::nanoseconds(nanoseconds); |
| 213 | } |
| 214 | |
| 215 | void GLGpuTimer::deleteQuery(sk_gpu_test::PlatformTimerQuery platformTimer) { |
| 216 | const GrGLuint queryID = static_cast<GrGLuint>(platformTimer); |
| 217 | fGLDeleteQueries(1, &queryID); |
| 218 | } |
| 219 | |
| 220 | GR_STATIC_ASSERT(sizeof(GrGLuint) <= sizeof(sk_gpu_test::PlatformTimerQuery)); |
| 221 | |
csmartdalton | 421a3c1 | 2016-10-04 11:08:45 -0700 | [diff] [blame] | 222 | } // anonymous namespace |
| 223 | |
| 224 | namespace sk_gpu_test { |
| 225 | |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 226 | GLTestContext::GLTestContext() : TestContext() {} |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 227 | |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 228 | GLTestContext::~GLTestContext() { |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 229 | SkASSERT(nullptr == fGL.get()); |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 230 | } |
| 231 | |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 232 | void GLTestContext::init(const GrGLInterface* gl, std::unique_ptr<FenceSync> fenceSync) { |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 233 | SkASSERT(!fGL.get()); |
| 234 | fGL.reset(gl); |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 235 | fFenceSync = fenceSync ? std::move(fenceSync) : GLFenceSync::MakeIfSupported(this); |
| 236 | fGpuTimer = GLGpuTimer::MakeIfSupported(this); |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 237 | } |
| 238 | |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 239 | void GLTestContext::teardown() { |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 240 | fGL.reset(nullptr); |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 241 | INHERITED::teardown(); |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 242 | } |
bsalomon | 944bcf0 | 2014-07-29 08:01:52 -0700 | [diff] [blame] | 243 | |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 244 | void GLTestContext::testAbandon() { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 245 | INHERITED::testAbandon(); |
bsalomon | 49f085d | 2014-09-05 13:34:00 -0700 | [diff] [blame] | 246 | if (fGL) { |
bsalomon | 944bcf0 | 2014-07-29 08:01:52 -0700 | [diff] [blame] | 247 | fGL->abandon(); |
| 248 | } |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 249 | } |
| 250 | |
bsalomon | c869932 | 2016-05-11 11:55:36 -0700 | [diff] [blame] | 251 | void GLTestContext::submit() { |
| 252 | if (fGL) { |
| 253 | GR_GL_CALL(fGL.get(), Flush()); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | void GLTestContext::finish() { |
| 258 | if (fGL) { |
| 259 | GR_GL_CALL(fGL.get(), Finish()); |
| 260 | } |
| 261 | } |
| 262 | |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 263 | GrGLint GLTestContext::createTextureRectangle(int width, int height, GrGLenum internalFormat, |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 264 | GrGLenum externalFormat, GrGLenum externalType, |
| 265 | GrGLvoid* data) { |
Hal Canary | 1b612a8 | 2016-11-03 16:26:13 -0400 | [diff] [blame] | 266 | if (!(kGL_GrGLStandard == fGL->fStandard && GrGLGetVersion(fGL.get()) >= GR_GL_VER(3, 1)) && |
bsalomon | e5286e0 | 2016-01-14 09:24:09 -0800 | [diff] [blame] | 267 | !fGL->fExtensions.has("GL_ARB_texture_rectangle")) { |
| 268 | return 0; |
| 269 | } |
bsalomon | e179a91 | 2016-01-20 06:18:10 -0800 | [diff] [blame] | 270 | |
Hal Canary | 1b612a8 | 2016-11-03 16:26:13 -0400 | [diff] [blame] | 271 | if (GrGLGetGLSLVersion(fGL.get()) < GR_GLSL_VER(1, 40)) { |
bsalomon | e179a91 | 2016-01-20 06:18:10 -0800 | [diff] [blame] | 272 | return 0; |
| 273 | } |
| 274 | |
bsalomon | e5286e0 | 2016-01-14 09:24:09 -0800 | [diff] [blame] | 275 | GrGLuint id; |
Hal Canary | 1b612a8 | 2016-11-03 16:26:13 -0400 | [diff] [blame] | 276 | GR_GL_CALL(fGL.get(), GenTextures(1, &id)); |
| 277 | GR_GL_CALL(fGL.get(), BindTexture(GR_GL_TEXTURE_RECTANGLE, id)); |
| 278 | GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MAG_FILTER, |
| 279 | GR_GL_NEAREST)); |
| 280 | GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_MIN_FILTER, |
| 281 | GR_GL_NEAREST)); |
| 282 | GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_S, |
| 283 | GR_GL_CLAMP_TO_EDGE)); |
| 284 | GR_GL_CALL(fGL.get(), TexParameteri(GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_WRAP_T, |
| 285 | GR_GL_CLAMP_TO_EDGE)); |
| 286 | GR_GL_CALL(fGL.get(), TexImage2D(GR_GL_TEXTURE_RECTANGLE, 0, internalFormat, width, height, 0, |
| 287 | externalFormat, externalType, data)); |
bsalomon | e5286e0 | 2016-01-14 09:24:09 -0800 | [diff] [blame] | 288 | return id; |
| 289 | } |
Greg Daniel | 02611d9 | 2017-07-25 10:05:01 -0400 | [diff] [blame^] | 290 | |
| 291 | sk_sp<GrContext> GLTestContext::makeGrContext(const GrContextOptions& options) { |
| 292 | return GrContext::MakeGL(fGL.get(), options); |
| 293 | } |
| 294 | |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 295 | } // namespace sk_gpu_test |