OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "GrContextFactory.h" | 9 #include "GrContextFactory.h" |
10 #include "gl/GLTestContext.h" | 10 #include "gl/GLTestContext.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 #endif | 191 #endif |
192 default: | 192 default: |
193 return ContextInfo(); | 193 return ContextInfo(); |
194 } | 194 } |
195 testCtx->makeCurrent(); | 195 testCtx->makeCurrent(); |
196 SkASSERT(testCtx && testCtx->backend() == backend); | 196 SkASSERT(testCtx && testCtx->backend() == backend); |
197 GrContextOptions grOptions = fGlobalOptions; | 197 GrContextOptions grOptions = fGlobalOptions; |
198 if (ContextOptions::kUseInstanced & options) { | 198 if (ContextOptions::kUseInstanced & options) { |
199 grOptions.fEnableInstancedRendering = true; | 199 grOptions.fEnableInstancedRendering = true; |
200 } | 200 } |
| 201 grOptions.fRequireDecodeDisableForSRGB = |
| 202 SkToBool(ContextOptions::kRequireSRGBDecodeDisableSupport & options); |
201 grCtx.reset(GrContext::Create(backend, backendContext, grOptions)); | 203 grCtx.reset(GrContext::Create(backend, backendContext, grOptions)); |
202 if (!grCtx.get()) { | 204 if (!grCtx.get()) { |
203 return ContextInfo(); | 205 return ContextInfo(); |
204 } | 206 } |
205 if (ContextOptions::kEnableNVPR & options) { | 207 if (ContextOptions::kEnableNVPR & options) { |
206 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { | 208 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { |
207 return ContextInfo(); | 209 return ContextInfo(); |
208 } | 210 } |
209 } | 211 } |
210 if (ContextOptions::kUseInstanced & options) { | 212 if (ContextOptions::kUseInstanced & options) { |
(...skipping 10 matching lines...) Expand all Loading... |
221 Context& context = fContexts.push_back(); | 223 Context& context = fContexts.push_back(); |
222 context.fBackend = backend; | 224 context.fBackend = backend; |
223 context.fTestContext = testCtx.release(); | 225 context.fTestContext = testCtx.release(); |
224 context.fGrContext = SkRef(grCtx.get()); | 226 context.fGrContext = SkRef(grCtx.get()); |
225 context.fType = type; | 227 context.fType = type; |
226 context.fOptions = options; | 228 context.fOptions = options; |
227 context.fAbandoned = false; | 229 context.fAbandoned = false; |
228 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); | 230 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex
t); |
229 } | 231 } |
230 } // namespace sk_gpu_test | 232 } // namespace sk_gpu_test |
OLD | NEW |