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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 144 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
145 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 145 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
146 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 146 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
147 bool usesMixedSamples() const { return fUsesMixedSamples; } | 147 bool usesMixedSamples() const { return fUsesMixedSamples; } |
148 | 148 |
149 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 149 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
150 bool useDrawInsteadOfPartialRenderTargetWrite() const { | 150 bool useDrawInsteadOfPartialRenderTargetWrite() const { |
151 return fUseDrawInsteadOfPartialRenderTargetWrite; | 151 return fUseDrawInsteadOfPartialRenderTargetWrite; |
152 } | 152 } |
153 | 153 |
| 154 bool useDrawInsteadOfAllRenderTargetWrites() const { |
| 155 return fUseDrawInsteadOfAllRenderTargetWrites; |
| 156 } |
| 157 |
154 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } | 158 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } |
155 | 159 |
156 /** | 160 /** |
157 * Indicates the capabilities of the fixed function blend unit. | 161 * Indicates the capabilities of the fixed function blend unit. |
158 */ | 162 */ |
159 enum BlendEquationSupport { | 163 enum BlendEquationSupport { |
160 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that | 164 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that |
161 // combines src and dst terms
. | 165 // combines src and dst terms
. |
162 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific | 166 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific |
163 // SVG/PDF blend modes. Requi
res blend barriers. | 167 // SVG/PDF blend modes. Requi
res blend barriers. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool fOversizedStencilSupport : 1; | 277 bool fOversizedStencilSupport : 1; |
274 bool fTextureBarrierSupport : 1; | 278 bool fTextureBarrierSupport : 1; |
275 bool fUsesMixedSamples : 1; | 279 bool fUsesMixedSamples : 1; |
276 bool fSupportsInstancedDraws : 1; | 280 bool fSupportsInstancedDraws : 1; |
277 bool fFullClearIsFree : 1; | 281 bool fFullClearIsFree : 1; |
278 bool fMustClearUploadedBufferData : 1; | 282 bool fMustClearUploadedBufferData : 1; |
279 | 283 |
280 // Driver workaround | 284 // Driver workaround |
281 bool fUseDrawInsteadOfClear : 1; | 285 bool fUseDrawInsteadOfClear : 1; |
282 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; | 286 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; |
| 287 bool fUseDrawInsteadOfAllRenderTargetWrites : 1; |
283 | 288 |
284 // ANGLE workaround | 289 // ANGLE workaround |
285 bool fPreferVRAMUseOverFlushes : 1; | 290 bool fPreferVRAMUseOverFlushes : 1; |
286 | 291 |
287 BlendEquationSupport fBlendEquationSupport; | 292 BlendEquationSupport fBlendEquationSupport; |
288 uint32_t fAdvBlendEqBlacklist; | 293 uint32_t fAdvBlendEqBlacklist; |
289 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 294 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
290 | 295 |
291 uint32_t fMapBufferFlags; | 296 uint32_t fMapBufferFlags; |
292 int fGeometryBufferMapThreshold; | 297 int fGeometryBufferMapThreshold; |
293 | 298 |
294 int fMaxRenderTargetSize; | 299 int fMaxRenderTargetSize; |
295 int fMaxTextureSize; | 300 int fMaxTextureSize; |
296 int fMaxTileSize; | 301 int fMaxTileSize; |
297 int fMaxColorSampleCount; | 302 int fMaxColorSampleCount; |
298 int fMaxStencilSampleCount; | 303 int fMaxStencilSampleCount; |
299 int fMaxRasterSamples; | 304 int fMaxRasterSamples; |
300 | 305 |
301 private: | 306 private: |
302 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 307 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
303 | 308 |
304 bool fSuppressPrints : 1; | 309 bool fSuppressPrints : 1; |
305 bool fImmediateFlush: 1; | 310 bool fImmediateFlush: 1; |
306 bool fDrawPathMasksToCompressedTextureSupport : 1; | 311 bool fDrawPathMasksToCompressedTextureSupport : 1; |
307 | 312 |
308 typedef SkRefCnt INHERITED; | 313 typedef SkRefCnt INHERITED; |
309 }; | 314 }; |
310 | 315 |
311 #endif | 316 #endif |
OLD | NEW |