OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 /** | 109 /** |
110 * Call to check whether a config has been verified as a valid color | 110 * Call to check whether a config has been verified as a valid color |
111 * attachment. | 111 * attachment. |
112 */ | 112 */ |
113 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const { | 113 bool isConfigVerifiedColorAttachment(GrPixelConfig config) const { |
114 return fVerifiedColorConfigs.isVerified(config); | 114 return fVerifiedColorConfigs.isVerified(config); |
115 } | 115 } |
116 | 116 |
117 /** | 117 /** |
118 * Call to note that a color config / stencil format pair passed | |
119 * FBO status check. We may skip calling glCheckFramebufferStatus for | |
120 * this combination in the future using | |
121 * isColorConfigAndStencilFormatVerified(). | |
122 */ | |
123 void markColorConfigAndStencilFormatAsVerified( | |
124 GrPixelConfig config, | |
125 const GrGLStencilAttachment::Format& format); | |
126 | |
127 /** | |
128 * Call to check whether color config / stencil format pair has already | |
129 * passed FBO status check. | |
130 */ | |
131 bool isColorConfigAndStencilFormatVerified( | |
132 GrPixelConfig config, | |
133 const GrGLStencilAttachment::Format& format) const; | |
134 | |
135 /** | |
136 * Reports the type of MSAA FBO support. | 118 * Reports the type of MSAA FBO support. |
137 */ | 119 */ |
138 MSFBOType msFBOType() const { return fMSFBOType; } | 120 MSFBOType msFBOType() const { return fMSFBOType; } |
139 | 121 |
140 /** | 122 /** |
141 * Does the supported MSAA FBO extension have MSAA renderbuffers? | 123 * Does the supported MSAA FBO extension have MSAA renderbuffers? |
142 */ | 124 */ |
143 bool usesMSAARenderBuffers() const { | 125 bool usesMSAARenderBuffers() const { |
144 return kNone_MSFBOType != fMSFBOType && | 126 return kNone_MSFBOType != fMSFBOType && |
145 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && | 127 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 318 |
337 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, | 319 void initShaderPrecisionTable(const GrGLContextInfo& ctxInfo, |
338 const GrGLInterface* intf, | 320 const GrGLInterface* intf, |
339 GrGLSLCaps* glslCaps); | 321 GrGLSLCaps* glslCaps); |
340 | 322 |
341 // tracks configs that have been verified to pass the FBO completeness when | 323 // tracks configs that have been verified to pass the FBO completeness when |
342 // used as a color attachment | 324 // used as a color attachment |
343 VerifiedColorConfigs fVerifiedColorConfigs; | 325 VerifiedColorConfigs fVerifiedColorConfigs; |
344 | 326 |
345 SkTArray<StencilFormat, true> fStencilFormats; | 327 SkTArray<StencilFormat, true> fStencilFormats; |
346 // tracks configs that have been verified to pass the FBO completeness when | |
347 // used as a color attachment when a particular stencil format is used | |
348 // as a stencil attachment. | |
349 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; | |
350 | 328 |
351 int fMaxFragmentUniformVectors; | 329 int fMaxFragmentUniformVectors; |
352 int fMaxVertexAttributes; | 330 int fMaxVertexAttributes; |
353 int fMaxFragmentTextureUnits; | 331 int fMaxFragmentTextureUnits; |
354 | 332 |
355 MSFBOType fMSFBOType; | 333 MSFBOType fMSFBOType; |
356 InvalidateFBType fInvalidateFBType; | 334 InvalidateFBType fInvalidateFBType; |
357 MapBufferType fMapBufferType; | 335 MapBufferType fMapBufferType; |
358 LATCAlias fLATCAlias; | 336 LATCAlias fLATCAlias; |
359 | 337 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 && fType == rhs.fType | 371 && fType == rhs.fType |
394 && fFboFormat == rhs.fFboFormat; | 372 && fFboFormat == rhs.fFboFormat; |
395 } | 373 } |
396 }; | 374 }; |
397 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; | 375 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach
e; |
398 | 376 |
399 typedef GrCaps INHERITED; | 377 typedef GrCaps INHERITED; |
400 }; | 378 }; |
401 | 379 |
402 #endif | 380 #endif |
OLD | NEW |