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

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

Issue 2539993002: Enable sRGB on iOS, make sRGB decode support optional (Closed)
Patch Set: Don't allow sRGBA on ES BGRA devices 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/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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 //! OpenGL or OpenGL ES context depending on the platform. To be removed. 86 //! OpenGL or OpenGL ES context depending on the platform. To be removed.
87 static const ContextType kNativeGL_ContextType; 87 static const ContextType kNativeGL_ContextType;
88 88
89 static const int kContextTypeCnt = kLastContextType + 1; 89 static const int kContextTypeCnt = kLastContextType + 1;
90 90
91 /** 91 /**
92 * Options for GL context creation. For historical and testing reasons the o ptions will default 92 * Options for GL context creation. For historical and testing reasons the o ptions will default
93 * to not using GL_NV_path_rendering extension even when the driver support s it. 93 * to not using GL_NV_path_rendering extension even when the driver support s it.
94 */ 94 */
95 enum class ContextOptions { 95 enum class ContextOptions {
96 kNone = 0x0, 96 kNone = 0x0,
97 kEnableNVPR = 0x1, 97 kEnableNVPR = 0x1,
98 kUseInstanced = 0x2, 98 kUseInstanced = 0x2,
99 kRequireSRGBSupport = 0x4, 99 kRequireSRGBSupport = 0x4,
100 kRequireSRGBDecodeDisableSupport = 0x8,
100 }; 101 };
101 102
102 static ContextType NativeContextTypeForBackend(GrBackend backend) { 103 static ContextType NativeContextTypeForBackend(GrBackend backend) {
103 switch (backend) { 104 switch (backend) {
104 case kOpenGL_GrBackend: 105 case kOpenGL_GrBackend:
105 return kNativeGL_ContextType; 106 return kNativeGL_ContextType;
106 case kVulkan_GrBackend: 107 case kVulkan_GrBackend:
107 return kVulkan_ContextType; 108 return kVulkan_ContextType;
108 default: 109 default:
109 SkFAIL("Unknown backend"); 110 SkFAIL("Unknown backend");
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 }; 164 };
164 SkTArray<Context, true> fContexts; 165 SkTArray<Context, true> fContexts;
165 std::unique_ptr<GLTestContext> fSentinelGLContext; 166 std::unique_ptr<GLTestContext> fSentinelGLContext;
166 const GrContextOptions fGlobalOptions; 167 const GrContextOptions fGlobalOptions;
167 }; 168 };
168 } // namespace sk_gpu_test 169 } // namespace sk_gpu_test
169 170
170 GR_MAKE_BITFIELD_CLASS_OPS(sk_gpu_test::GrContextFactory::ContextOptions); 171 GR_MAKE_BITFIELD_CLASS_OPS(sk_gpu_test::GrContextFactory::ContextOptions);
171 172
172 #endif 173 #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