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

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 1789663002: sRGB support in Ganesh. Several pieces: (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Workaround for bug in clang warning. Created 4 years, 9 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
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 8
9 #ifndef GrGLCaps_DEFINED 9 #ifndef GrGLCaps_DEFINED
10 #define GrGLCaps_DEFINED 10 #define GrGLCaps_DEFINED
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 }; 113 };
114 114
115 /** 115 /**
116 * Initializes the GrGLCaps to the set of features supported in the current 116 * Initializes the GrGLCaps to the set of features supported in the current
117 * OpenGL context accessible via ctxInfo. 117 * OpenGL context accessible via ctxInfo.
118 */ 118 */
119 GrGLCaps(const GrContextOptions& contextOptions, const GrGLContextInfo& ctxI nfo, 119 GrGLCaps(const GrContextOptions& contextOptions, const GrGLContextInfo& ctxI nfo,
120 const GrGLInterface* glInterface); 120 const GrGLInterface* glInterface);
121 121
122 bool isConfigTexturable(GrPixelConfig config) const override { 122 bool isConfigTexturable(GrPixelConfig config) const override {
123 SkASSERT(kGrPixelConfigCnt > config); 123 SkASSERT(kGrPixelConfigCnt > static_cast<int>(config));
124 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kTextureable_F lag); 124 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kTextureable_F lag);
125 } 125 }
126 126
127 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { 127 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override {
128 SkASSERT(kGrPixelConfigCnt > config); 128 SkASSERT(kGrPixelConfigCnt > static_cast<int>(config));
129 if (withMSAA) { 129 if (withMSAA) {
130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag); 130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag);
131 } else { 131 } else {
132 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag); 132 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag);
133 } 133 }
134 } 134 }
135 135
136 bool isConfigTexSupportEnabled(GrPixelConfig config) const { 136 bool isConfigTexSupportEnabled(GrPixelConfig config) const {
137 SkASSERT(kGrPixelConfigCnt > config); 137 SkASSERT(kGrPixelConfigCnt > static_cast<int>(config));
138 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag); 138 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag);
139 } 139 }
140 140
141 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */ 141 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */
142 const GrSwizzle& configSwizzle(GrPixelConfig config) const { 142 const GrSwizzle& configSwizzle(GrPixelConfig config) const {
143 return fConfigTable[config].fSwizzle; 143 return fConfigTable[config].fSwizzle;
144 } 144 }
145 145
146 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig, 146 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig,
147 GrGLenum* internalFormat, GrGLenum* externalFormat, 147 GrGLenum* internalFormat, GrGLenum* externalFormat,
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 GrSwizzle fSwizzle; 489 GrSwizzle fSwizzle;
490 }; 490 };
491 491
492 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 492 ConfigInfo fConfigTable[kGrPixelConfigCnt];
493 493
494 typedef GrCaps INHERITED; 494 typedef GrCaps INHERITED;
495 }; 495 };
496 496
497 #endif 497 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698