| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef GrCaps_DEFINED | 8 #ifndef GrCaps_DEFINED |
| 9 #define GrCaps_DEFINED | 9 #define GrCaps_DEFINED |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 return fUseDrawInsteadOfPartialRenderTargetWrite; | 167 return fUseDrawInsteadOfPartialRenderTargetWrite; |
| 168 } | 168 } |
| 169 | 169 |
| 170 bool useDrawInsteadOfAllRenderTargetWrites() const { | 170 bool useDrawInsteadOfAllRenderTargetWrites() const { |
| 171 return fUseDrawInsteadOfAllRenderTargetWrites; | 171 return fUseDrawInsteadOfAllRenderTargetWrites; |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } | 174 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } |
| 175 | 175 |
| 176 /** | 176 /** |
| 177 * Indicates the level of support for gr_instanced::* functionality. A highe
r level includes |
| 178 * all functionality from the levels below it. |
| 179 */ |
| 180 enum class InstancedSupport { |
| 181 kNone, |
| 182 kBasic, |
| 183 kMultisampled, |
| 184 kMixedSampled |
| 185 }; |
| 186 |
| 187 InstancedSupport instancedSupport() const { return fInstancedSupport; } |
| 188 |
| 189 bool avoidInstancedDrawsToFPTargets() const { return fAvoidInstancedDrawsToF
PTargets; } |
| 190 |
| 191 /** |
| 177 * Indicates the capabilities of the fixed function blend unit. | 192 * Indicates the capabilities of the fixed function blend unit. |
| 178 */ | 193 */ |
| 179 enum BlendEquationSupport { | 194 enum BlendEquationSupport { |
| 180 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that | 195 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that |
| 181 // combines src and dst terms
. | 196 // combines src and dst terms
. |
| 182 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific | 197 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific |
| 183 // SVG/PDF blend modes. Requi
res blend barriers. | 198 // SVG/PDF blend modes. Requi
res blend barriers. |
| 184 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not | 199 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not |
| 185 // require blend barriers, an
d permits overlap. | 200 // require blend barriers, an
d permits overlap. |
| 186 | 201 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 bool fUsesMixedSamples : 1; | 315 bool fUsesMixedSamples : 1; |
| 301 bool fPreferClientSideDynamicBuffers : 1; | 316 bool fPreferClientSideDynamicBuffers : 1; |
| 302 bool fSupportsInstancedDraws : 1; | 317 bool fSupportsInstancedDraws : 1; |
| 303 bool fFullClearIsFree : 1; | 318 bool fFullClearIsFree : 1; |
| 304 bool fMustClearUploadedBufferData : 1; | 319 bool fMustClearUploadedBufferData : 1; |
| 305 | 320 |
| 306 // Driver workaround | 321 // Driver workaround |
| 307 bool fUseDrawInsteadOfClear : 1; | 322 bool fUseDrawInsteadOfClear : 1; |
| 308 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; | 323 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; |
| 309 bool fUseDrawInsteadOfAllRenderTargetWrites : 1; | 324 bool fUseDrawInsteadOfAllRenderTargetWrites : 1; |
| 325 bool fAvoidInstancedDrawsToFPTargets : 1; |
| 310 | 326 |
| 311 // ANGLE workaround | 327 // ANGLE workaround |
| 312 bool fPreferVRAMUseOverFlushes : 1; | 328 bool fPreferVRAMUseOverFlushes : 1; |
| 313 | 329 |
| 314 bool fSampleShadingSupport : 1; | 330 bool fSampleShadingSupport : 1; |
| 315 | 331 |
| 332 InstancedSupport fInstancedSupport; |
| 333 |
| 316 BlendEquationSupport fBlendEquationSupport; | 334 BlendEquationSupport fBlendEquationSupport; |
| 317 uint32_t fAdvBlendEqBlacklist; | 335 uint32_t fAdvBlendEqBlacklist; |
| 318 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 336 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 319 | 337 |
| 320 uint32_t fMapBufferFlags; | 338 uint32_t fMapBufferFlags; |
| 321 int fBufferMapThreshold; | 339 int fBufferMapThreshold; |
| 322 | 340 |
| 323 int fMaxRenderTargetSize; | 341 int fMaxRenderTargetSize; |
| 324 int fMaxVertexAttributes; | 342 int fMaxVertexAttributes; |
| 325 int fMaxTextureSize; | 343 int fMaxTextureSize; |
| 326 int fMaxTileSize; | 344 int fMaxTileSize; |
| 327 int fMaxColorSampleCount; | 345 int fMaxColorSampleCount; |
| 328 int fMaxStencilSampleCount; | 346 int fMaxStencilSampleCount; |
| 329 int fMaxRasterSamples; | 347 int fMaxRasterSamples; |
| 330 | 348 |
| 331 private: | 349 private: |
| 332 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 350 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
| 333 | 351 |
| 334 bool fSuppressPrints : 1; | 352 bool fSuppressPrints : 1; |
| 335 bool fImmediateFlush: 1; | 353 bool fImmediateFlush: 1; |
| 336 | 354 |
| 337 typedef SkRefCnt INHERITED; | 355 typedef SkRefCnt INHERITED; |
| 338 }; | 356 }; |
| 339 | 357 |
| 340 #endif | 358 #endif |
| OLD | NEW |