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

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

Issue 1814533003: Revert of sRGB support in Ganesh. Several pieces: (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | src/gpu/gl/GrGLCaps.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 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 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kTextureable_F lag); 124 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kTextureable_F lag);
124 } 125 }
125 126
126 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { 127 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override {
128 SkASSERT(kGrPixelConfigCnt > config);
127 if (withMSAA) { 129 if (withMSAA) {
128 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag); 130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag);
129 } else { 131 } else {
130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag); 132 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag);
131 } 133 }
132 } 134 }
133 135
134 bool isConfigTexSupportEnabled(GrPixelConfig config) const { 136 bool isConfigTexSupportEnabled(GrPixelConfig config) const {
137 SkASSERT(kGrPixelConfigCnt > config);
135 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag); 138 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag);
136 } 139 }
137 140
138 /** 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. */
139 const GrSwizzle& configSwizzle(GrPixelConfig config) const { 142 const GrSwizzle& configSwizzle(GrPixelConfig config) const {
140 return fConfigTable[config].fSwizzle; 143 return fConfigTable[config].fSwizzle;
141 } 144 }
142 145
143 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig, 146 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig,
144 GrGLenum* internalFormat, GrGLenum* externalFormat, 147 GrGLenum* internalFormat, GrGLenum* externalFormat,
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 488
486 GrSwizzle fSwizzle; 489 GrSwizzle fSwizzle;
487 }; 490 };
488 491
489 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 492 ConfigInfo fConfigTable[kGrPixelConfigCnt];
490 493
491 typedef GrCaps INHERITED; 494 typedef GrCaps INHERITED;
492 }; 495 };
493 496
494 #endif 497 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureStripAtlas.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698