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

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

Issue 2005863002: Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Allow creation of sRGB Vulkan context Created 4 years, 7 months 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/flags/SkCommonFlagsConfig.cpp ('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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (!glInterface) { 156 if (!glInterface) {
157 return ContextInfo(); 157 return ContextInfo();
158 } 158 }
159 } 159 }
160 backendContext = reinterpret_cast<GrBackendContext>(glInterface.get( )); 160 backendContext = reinterpret_cast<GrBackendContext>(glInterface.get( ));
161 break; 161 break;
162 } 162 }
163 #ifdef SK_VULKAN 163 #ifdef SK_VULKAN
164 case kVulkan_GrBackend: 164 case kVulkan_GrBackend:
165 SkASSERT(kVulkan_ContextType == type); 165 SkASSERT(kVulkan_ContextType == type);
166 if ((kEnableNVPR_ContextOptions & options) || 166 if (kEnableNVPR_ContextOptions & options) {
167 (kRequireSRGBSupport_ContextOptions & options)) {
168 return ContextInfo(); 167 return ContextInfo();
169 } 168 }
170 testCtx.reset(CreatePlatformVkTestContext()); 169 testCtx.reset(CreatePlatformVkTestContext());
171 if (!testCtx) { 170 if (!testCtx) {
172 return ContextInfo(); 171 return ContextInfo();
173 } 172 }
174 173
175 // There is some bug (either in Skia or the NV Vulkan driver) where VkDevice 174 // There is some bug (either in Skia or the NV Vulkan driver) where VkDevice
176 // destruction will hang occaisonally. For some reason having an exi sting GL 175 // destruction will hang occaisonally. For some reason having an exi sting GL
177 // context fixes this. 176 // context fixes this.
(...skipping 29 matching lines...) Expand all
207 Context& context = fContexts.push_back(); 206 Context& context = fContexts.push_back();
208 context.fBackend = backend; 207 context.fBackend = backend;
209 context.fTestContext = testCtx.release(); 208 context.fTestContext = testCtx.release();
210 context.fGrContext = SkRef(grCtx.get()); 209 context.fGrContext = SkRef(grCtx.get());
211 context.fType = type; 210 context.fType = type;
212 context.fOptions = options; 211 context.fOptions = options;
213 context.fAbandoned = false; 212 context.fAbandoned = false;
214 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex t); 213 return ContextInfo(context.fBackend, context.fTestContext, context.fGrContex t);
215 } 214 }
216 } // namespace sk_gpu_test 215 } // namespace sk_gpu_test
OLDNEW
« no previous file with comments | « tools/flags/SkCommonFlagsConfig.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698