bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 1 | |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2014 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | #include "GrContextFactory.h" |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 10 | #include "gl/GLTestContext.h" |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 11 | |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 12 | #if SK_ANGLE |
| 13 | #include "gl/angle/GLTestContext_angle.h" |
| 14 | #endif |
mtklein | 605d952 | 2016-09-21 14:01:32 -0700 | [diff] [blame] | 15 | #include "gl/command_buffer/GLTestContext_command_buffer.h" |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 16 | #include "gl/debug/DebugGLTestContext.h" |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 17 | #if SK_MESA |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 18 | #include "gl/mesa/GLTestContext_mesa.h" |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 19 | #endif |
djsollen | 7e73108 | 2016-06-09 13:07:13 -0700 | [diff] [blame] | 20 | #ifdef SK_VULKAN |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 21 | #include "vk/VkTestContext.h" |
bsalomon | 7c62b47 | 2016-04-01 07:42:05 -0700 | [diff] [blame] | 22 | #endif |
bsalomon | 273c0f5 | 2016-03-31 10:59:06 -0700 | [diff] [blame] | 23 | #include "gl/null/NullGLTestContext.h" |
kkinnunen | cfe62e3 | 2015-07-01 02:58:50 -0700 | [diff] [blame] | 24 | #include "gl/GrGLGpu.h" |
| 25 | #include "GrCaps.h" |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 26 | |
Brian Osman | 3f375d0 | 2016-12-28 11:19:22 -0500 | [diff] [blame] | 27 | #if defined(SK_BUILD_FOR_WIN32) && defined(SK_ENABLE_DISCRETE_GPU) |
| 28 | extern "C" { |
| 29 | // NVIDIA documents that the presence and value of this symbol programmatically enable the high |
| 30 | // performance GPU in laptops with switchable graphics. |
| 31 | // https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm |
| 32 | // From testing, including this symbol, even if it is set to 0, we still get the NVIDIA GPU. |
| 33 | _declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; |
| 34 | |
| 35 | // AMD has a similar mechanism, although I don't have an AMD laptop, so this is untested. |
| 36 | // https://community.amd.com/thread/169965 |
| 37 | __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; |
| 38 | } |
| 39 | #endif |
| 40 | |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 41 | namespace sk_gpu_test { |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 42 | GrContextFactory::GrContextFactory() { } |
| 43 | |
| 44 | GrContextFactory::GrContextFactory(const GrContextOptions& opts) |
| 45 | : fGlobalOptions(opts) { |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 46 | // In this factory, instanced rendering is specified with ContextOptions::kUseInstanced. |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 47 | SkASSERT(!fGlobalOptions.fEnableInstancedRendering); |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | GrContextFactory::~GrContextFactory() { |
| 51 | this->destroyContexts(); |
| 52 | } |
| 53 | |
| 54 | void GrContextFactory::destroyContexts() { |
| 55 | for (Context& context : fContexts) { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 56 | if (context.fTestContext) { |
| 57 | context.fTestContext->makeCurrent(); |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 58 | } |
| 59 | if (!context.fGrContext->unique()) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 60 | context.fGrContext->releaseResourcesAndAbandonContext(); |
| 61 | context.fAbandoned = true; |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 62 | } |
| 63 | context.fGrContext->unref(); |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 64 | delete context.fTestContext; |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 65 | } |
| 66 | fContexts.reset(); |
| 67 | } |
| 68 | |
| 69 | void GrContextFactory::abandonContexts() { |
| 70 | for (Context& context : fContexts) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 71 | if (!context.fAbandoned) { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 72 | if (context.fTestContext) { |
| 73 | context.fTestContext->makeCurrent(); |
| 74 | context.fTestContext->testAbandon(); |
| 75 | delete(context.fTestContext); |
| 76 | context.fTestContext = nullptr; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 77 | } |
| 78 | context.fGrContext->abandonContext(); |
| 79 | context.fAbandoned = true; |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 80 | } |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 81 | } |
| 82 | } |
| 83 | |
bsalomon | 6e2aad4 | 2016-04-01 11:54:31 -0700 | [diff] [blame] | 84 | void GrContextFactory::releaseResourcesAndAbandonContexts() { |
| 85 | for (Context& context : fContexts) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 86 | if (!context.fAbandoned) { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 87 | if (context.fTestContext) { |
| 88 | context.fTestContext->makeCurrent(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 89 | } |
bsalomon | 6e2aad4 | 2016-04-01 11:54:31 -0700 | [diff] [blame] | 90 | context.fGrContext->releaseResourcesAndAbandonContext(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 91 | context.fAbandoned = true; |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 92 | if (context.fTestContext) { |
| 93 | delete context.fTestContext; |
| 94 | context.fTestContext = nullptr; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 95 | } |
bsalomon | 6e2aad4 | 2016-04-01 11:54:31 -0700 | [diff] [blame] | 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
bsalomon | 85b4b53 | 2016-04-05 11:06:27 -0700 | [diff] [blame] | 100 | #if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_MAC) |
| 101 | const GrContextFactory::ContextType GrContextFactory::kNativeGL_ContextType = |
| 102 | GrContextFactory::kGL_ContextType; |
| 103 | #else |
| 104 | const GrContextFactory::ContextType GrContextFactory::kNativeGL_ContextType = |
| 105 | GrContextFactory::kGLES_ContextType; |
| 106 | #endif |
| 107 | |
bsalomon | f2f1c17 | 2016-04-05 12:59:06 -0700 | [diff] [blame] | 108 | ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions options) { |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 109 | for (int i = 0; i < fContexts.count(); ++i) { |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 110 | Context& context = fContexts[i]; |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 111 | if (context.fType == type && |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 112 | context.fOptions == options && |
| 113 | !context.fAbandoned) { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 114 | context.fTestContext->makeCurrent(); |
| 115 | return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 116 | } |
| 117 | } |
Ben Wagner | 145dbcd | 2016-11-03 14:40:50 -0400 | [diff] [blame] | 118 | std::unique_ptr<TestContext> testCtx; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 119 | sk_sp<GrContext> grCtx; |
| 120 | GrBackendContext backendContext = 0; |
| 121 | sk_sp<const GrGLInterface> glInterface; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 122 | GrBackend backend = ContextTypeBackend(type); |
| 123 | switch (backend) { |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 124 | case kOpenGL_GrBackend: { |
| 125 | GLTestContext* glCtx; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 126 | switch (type) { |
| 127 | case kGL_ContextType: |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 128 | glCtx = CreatePlatformGLTestContext(kGL_GrGLStandard); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 129 | break; |
| 130 | case kGLES_ContextType: |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 131 | glCtx = CreatePlatformGLTestContext(kGLES_GrGLStandard); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 132 | break; |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 133 | #if SK_ANGLE |
bsalomon | 11abd8d | 2016-10-14 08:13:48 -0700 | [diff] [blame] | 134 | case kANGLE_D3D9_ES2_ContextType: |
Ben Wagner | 12e8dc2 | 2016-11-03 15:43:44 -0400 | [diff] [blame] | 135 | glCtx = MakeANGLETestContext(ANGLEBackend::kD3D9, ANGLEContextVersion::kES2).release(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 136 | break; |
bsalomon | 11abd8d | 2016-10-14 08:13:48 -0700 | [diff] [blame] | 137 | case kANGLE_D3D11_ES2_ContextType: |
Ben Wagner | 12e8dc2 | 2016-11-03 15:43:44 -0400 | [diff] [blame] | 138 | glCtx = MakeANGLETestContext(ANGLEBackend::kD3D11, ANGLEContextVersion::kES2).release(); |
bsalomon | 11abd8d | 2016-10-14 08:13:48 -0700 | [diff] [blame] | 139 | break; |
| 140 | case kANGLE_D3D11_ES3_ContextType: |
Ben Wagner | 12e8dc2 | 2016-11-03 15:43:44 -0400 | [diff] [blame] | 141 | glCtx = MakeANGLETestContext(ANGLEBackend::kD3D11, ANGLEContextVersion::kES3).release(); |
bsalomon | 11abd8d | 2016-10-14 08:13:48 -0700 | [diff] [blame] | 142 | break; |
| 143 | case kANGLE_GL_ES2_ContextType: |
Ben Wagner | 12e8dc2 | 2016-11-03 15:43:44 -0400 | [diff] [blame] | 144 | glCtx = MakeANGLETestContext(ANGLEBackend::kOpenGL, ANGLEContextVersion::kES2).release(); |
bsalomon | 11abd8d | 2016-10-14 08:13:48 -0700 | [diff] [blame] | 145 | break; |
| 146 | case kANGLE_GL_ES3_ContextType: |
Ben Wagner | 12e8dc2 | 2016-11-03 15:43:44 -0400 | [diff] [blame] | 147 | glCtx = MakeANGLETestContext(ANGLEBackend::kOpenGL, ANGLEContextVersion::kES3).release(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 148 | break; |
Mike Klein | c168a3a | 2016-11-14 14:53:13 +0000 | [diff] [blame] | 149 | #endif |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 150 | case kCommandBuffer_ContextType: |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 151 | glCtx = CommandBufferGLTestContext::Create(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 152 | break; |
kkinnunen | 3e980c3 | 2015-12-23 01:33:00 -0800 | [diff] [blame] | 153 | #if SK_MESA |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 154 | case kMESA_ContextType: |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 155 | glCtx = CreateMesaGLTestContext(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 156 | break; |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 157 | #endif |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 158 | case kNullGL_ContextType: |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 159 | glCtx = CreateNullGLTestContext(ContextOptions::kEnableNVPR & options); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 160 | break; |
| 161 | case kDebugGL_ContextType: |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 162 | glCtx = CreateDebugGLTestContext(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 163 | break; |
| 164 | default: |
| 165 | return ContextInfo(); |
| 166 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 167 | if (!glCtx) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 168 | return ContextInfo(); |
| 169 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 170 | testCtx.reset(glCtx); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 171 | glInterface.reset(SkRef(glCtx->gl())); |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 172 | // Block NVPR from non-NVPR types. We don't block NVPR from contexts that will use |
| 173 | // instanced rendering because that would prevent us from testing mixed samples. |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 174 | if (!((ContextOptions::kEnableNVPR | ContextOptions::kUseInstanced) & options)) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 175 | glInterface.reset(GrGLInterfaceRemoveNVPR(glInterface.get())); |
| 176 | if (!glInterface) { |
| 177 | return ContextInfo(); |
| 178 | } |
| 179 | } |
| 180 | backendContext = reinterpret_cast<GrBackendContext>(glInterface.get()); |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 181 | break; |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 182 | } |
jvanverth | a50e17a | 2015-08-12 12:19:36 -0700 | [diff] [blame] | 183 | #ifdef SK_VULKAN |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 184 | case kVulkan_GrBackend: |
| 185 | SkASSERT(kVulkan_ContextType == type); |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 186 | if (ContextOptions::kEnableNVPR & options) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 187 | return ContextInfo(); |
| 188 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 189 | testCtx.reset(CreatePlatformVkTestContext()); |
| 190 | if (!testCtx) { |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 191 | return ContextInfo(); |
| 192 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 193 | |
Brian Salomon | 7f9c29a | 2017-01-24 22:22:05 +0000 | [diff] [blame^] | 194 | // There is some bug (either in Skia or the NV Vulkan driver) where VkDevice |
| 195 | // destruction will hang occaisonally. For some reason having an existing GL |
| 196 | // context fixes this. |
| 197 | if (!fSentinelGLContext) { |
| 198 | fSentinelGLContext.reset(CreatePlatformGLTestContext(kGL_GrGLStandard)); |
| 199 | if (!fSentinelGLContext) { |
| 200 | fSentinelGLContext.reset(CreatePlatformGLTestContext(kGLES_GrGLStandard)); |
| 201 | } |
| 202 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 203 | backendContext = testCtx->backendContext(); |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 204 | break; |
jvanverth | a50e17a | 2015-08-12 12:19:36 -0700 | [diff] [blame] | 205 | #endif |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 206 | default: |
| 207 | return ContextInfo(); |
| 208 | } |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 209 | testCtx->makeCurrent(); |
| 210 | SkASSERT(testCtx && testCtx->backend() == backend); |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 211 | GrContextOptions grOptions = fGlobalOptions; |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 212 | if (ContextOptions::kUseInstanced & options) { |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 213 | grOptions.fEnableInstancedRendering = true; |
| 214 | } |
brianosman | 2047189 | 2016-12-02 06:43:32 -0800 | [diff] [blame] | 215 | grOptions.fRequireDecodeDisableForSRGB = |
| 216 | SkToBool(ContextOptions::kRequireSRGBDecodeDisableSupport & options); |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 217 | grCtx.reset(GrContext::Create(backend, backendContext, grOptions)); |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 218 | if (!grCtx.get()) { |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 219 | return ContextInfo(); |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 220 | } |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 221 | if (ContextOptions::kEnableNVPR & options) { |
kkinnunen | cfe62e3 | 2015-07-01 02:58:50 -0700 | [diff] [blame] | 222 | if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 223 | return ContextInfo(); |
kkinnunen | cfe62e3 | 2015-07-01 02:58:50 -0700 | [diff] [blame] | 224 | } |
| 225 | } |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 226 | if (ContextOptions::kUseInstanced & options) { |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 227 | if (GrCaps::InstancedSupport::kNone == grCtx->caps()->instancedSupport()) { |
| 228 | return ContextInfo(); |
| 229 | } |
| 230 | } |
csmartdalton | 6270e55 | 2016-09-13 10:41:49 -0700 | [diff] [blame] | 231 | if (ContextOptions::kRequireSRGBSupport & options) { |
brianosman | 61d3b08 | 2016-03-30 11:19:36 -0700 | [diff] [blame] | 232 | if (!grCtx->caps()->srgbSupport()) { |
| 233 | return ContextInfo(); |
| 234 | } |
| 235 | } |
kkinnunen | cfe62e3 | 2015-07-01 02:58:50 -0700 | [diff] [blame] | 236 | |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 237 | Context& context = fContexts.push_back(); |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 238 | context.fBackend = backend; |
| 239 | context.fTestContext = testCtx.release(); |
kkinnunen | 3405800 | 2016-01-06 23:49:30 -0800 | [diff] [blame] | 240 | context.fGrContext = SkRef(grCtx.get()); |
| 241 | context.fType = type; |
| 242 | context.fOptions = options; |
bsalomon | dc0fcd4 | 2016-04-11 14:21:33 -0700 | [diff] [blame] | 243 | context.fAbandoned = false; |
bsalomon | 18a2f9d | 2016-05-11 10:09:18 -0700 | [diff] [blame] | 244 | return ContextInfo(context.fBackend, context.fTestContext, context.fGrContext); |
djsollen | e454521 | 2014-11-13 11:12:41 -0800 | [diff] [blame] | 245 | } |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 246 | } // namespace sk_gpu_test |