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

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

Issue 2182783004: Add test configs for instanced rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add test configs for instanced rendering Created 4 years, 4 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') | tools/gpu/GrContextFactory.cpp » ('j') | 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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrContextFactory_DEFINED 8 #ifndef GrContextFactory_DEFINED
9 #define GrContextFactory_DEFINED 9 #define GrContextFactory_DEFINED
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 static const int kContextTypeCnt = kLastContextType + 1; 86 static const int kContextTypeCnt = kLastContextType + 1;
87 87
88 /** 88 /**
89 * Options for GL context creation. For historical and testing reasons the o ptions will default 89 * Options for GL context creation. For historical and testing reasons the o ptions will default
90 * to not using GL_NV_path_rendering extension even when the driver support s it. 90 * to not using GL_NV_path_rendering extension even when the driver support s it.
91 */ 91 */
92 enum ContextOptions { 92 enum ContextOptions {
93 kNone_ContextOptions = 0x0, 93 kNone_ContextOptions = 0x0,
94 kEnableNVPR_ContextOptions = 0x1, 94 kEnableNVPR_ContextOptions = 0x1,
95 kRequireSRGBSupport_ContextOptions = 0x2, 95 kUseInstanced_ContextOptions = 0x2,
96 kRequireSRGBSupport_ContextOptions = 0x4,
96 }; 97 };
97 98
98 static ContextType NativeContextTypeForBackend(GrBackend backend) { 99 static ContextType NativeContextTypeForBackend(GrBackend backend) {
99 switch (backend) { 100 switch (backend) {
100 case kOpenGL_GrBackend: 101 case kOpenGL_GrBackend:
101 return kNativeGL_ContextType; 102 return kNativeGL_ContextType;
102 case kVulkan_GrBackend: 103 case kVulkan_GrBackend:
103 return kVulkan_ContextType; 104 return kVulkan_ContextType;
104 default: 105 default:
105 SkFAIL("Unknown backend"); 106 SkFAIL("Unknown backend");
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 TestContext* fTestContext; 180 TestContext* fTestContext;
180 GrContext* fGrContext; 181 GrContext* fGrContext;
181 bool fAbandoned; 182 bool fAbandoned;
182 }; 183 };
183 SkTArray<Context, true> fContexts; 184 SkTArray<Context, true> fContexts;
184 SkAutoTDelete<GLTestContext> fSentinelGLContext; 185 SkAutoTDelete<GLTestContext> fSentinelGLContext;
185 const GrContextOptions fGlobalOptions; 186 const GrContextOptions fGlobalOptions;
186 }; 187 };
187 } // namespace sk_gpu_test 188 } // namespace sk_gpu_test
188 #endif 189 #endif
OLDNEW
« no previous file with comments | « tools/flags/SkCommonFlagsConfig.cpp ('k') | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698