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

Side by Side Diff: tools/gpu/GrContextFactory.cpp

Issue 2547603002: Revert of Enable sRGB on iOS, make sRGB decode support optional (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « tools/gpu/GrContextFactory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
203 grCtx.reset(GrContext::Create(backend, backendContext, grOptions)); 201 grCtx.reset(GrContext::Create(backend, backendContext, grOptions));
204 if (!grCtx.get()) { 202 if (!grCtx.get()) {
205 return ContextInfo(); 203 return ContextInfo();
206 } 204 }
207 if (ContextOptions::kEnableNVPR & options) { 205 if (ContextOptions::kEnableNVPR & options) {
208 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) { 206 if (!grCtx->caps()->shaderCaps()->pathRenderingSupport()) {
209 return ContextInfo(); 207 return ContextInfo();
210 } 208 }
211 } 209 }
212 if (ContextOptions::kUseInstanced & options) { 210 if (ContextOptions::kUseInstanced & options) {
(...skipping 10 matching lines...) Expand all
223 Context& context = fContexts.push_back(); 221 Context& context = fContexts.push_back();
224 context.fBackend = backend; 222 context.fBackend = backend;
225 context.fTestContext = testCtx.release(); 223 context.fTestContext = testCtx.release();
226 context.fGrContext = SkRef(grCtx.get()); 224 context.fGrContext = SkRef(grCtx.get());
227 context.fType = type; 225 context.fType = type;
228 context.fOptions = options; 226 context.fOptions = options;
229 context.fAbandoned = false; 227 context.fAbandoned = false;
230 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex t); 228 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex t);
231 } 229 }
232 } // namespace sk_gpu_test 230 } // namespace sk_gpu_test
OLDNEW
« no previous file with comments | « tools/gpu/GrContextFactory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698