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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 uint32_t mapBufferFlags() const { return fMapBufferFlags; } | 203 uint32_t mapBufferFlags() const { return fMapBufferFlags; } |
204 | 204 |
205 // Scratch textures not being reused means that those scratch textures | 205 // Scratch textures not being reused means that those scratch textures |
206 // that we upload to (i.e., don't have a render target) will not be | 206 // that we upload to (i.e., don't have a render target) will not be |
207 // recycled in the texture cache. This is to prevent ghosting by drivers | 207 // recycled in the texture cache. This is to prevent ghosting by drivers |
208 // (in particular for deferred architectures). | 208 // (in particular for deferred architectures). |
209 bool reuseScratchTextures() const { return fReuseScratchTextures; } | 209 bool reuseScratchTextures() const { return fReuseScratchTextures; } |
210 bool reuseScratchBuffers() const { return fReuseScratchBuffers; } | 210 bool reuseScratchBuffers() const { return fReuseScratchBuffers; } |
211 | 211 |
| 212 /// maximum number of attribute values per vertex |
| 213 int maxVertexAttributes() const { return fMaxVertexAttributes; } |
| 214 |
212 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 215 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
213 int maxTextureSize() const { return fMaxTextureSize; } | 216 int maxTextureSize() const { return fMaxTextureSize; } |
214 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. | 217 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. |
215 It is usually the max texture size, unless we're overriding it for testi
ng. */ | 218 It is usually the max texture size, unless we're overriding it for testi
ng. */ |
216 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } | 219 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } |
217 | 220 |
218 // Will be 0 if MSAA is not supported | 221 // Will be 0 if MSAA is not supported |
219 int maxColorSampleCount() const { return fMaxColorSampleCount; } | 222 int maxColorSampleCount() const { return fMaxColorSampleCount; } |
220 // Will be 0 if MSAA is not supported | 223 // Will be 0 if MSAA is not supported |
221 int maxStencilSampleCount() const { return fMaxStencilSampleCount; } | 224 int maxStencilSampleCount() const { return fMaxStencilSampleCount; } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 bool fPreferVRAMUseOverFlushes : 1; | 297 bool fPreferVRAMUseOverFlushes : 1; |
295 | 298 |
296 BlendEquationSupport fBlendEquationSupport; | 299 BlendEquationSupport fBlendEquationSupport; |
297 uint32_t fAdvBlendEqBlacklist; | 300 uint32_t fAdvBlendEqBlacklist; |
298 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 301 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
299 | 302 |
300 uint32_t fMapBufferFlags; | 303 uint32_t fMapBufferFlags; |
301 int fGeometryBufferMapThreshold; | 304 int fGeometryBufferMapThreshold; |
302 | 305 |
303 int fMaxRenderTargetSize; | 306 int fMaxRenderTargetSize; |
| 307 int fMaxVertexAttributes; |
304 int fMaxTextureSize; | 308 int fMaxTextureSize; |
305 int fMaxTileSize; | 309 int fMaxTileSize; |
306 int fMaxColorSampleCount; | 310 int fMaxColorSampleCount; |
307 int fMaxStencilSampleCount; | 311 int fMaxStencilSampleCount; |
308 int fMaxRasterSamples; | 312 int fMaxRasterSamples; |
309 | 313 |
310 private: | 314 private: |
311 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 315 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
312 | 316 |
313 bool fSuppressPrints : 1; | 317 bool fSuppressPrints : 1; |
314 bool fImmediateFlush: 1; | 318 bool fImmediateFlush: 1; |
315 bool fDrawPathMasksToCompressedTextureSupport : 1; | 319 bool fDrawPathMasksToCompressedTextureSupport : 1; |
316 | 320 |
317 typedef SkRefCnt INHERITED; | 321 typedef SkRefCnt INHERITED; |
318 }; | 322 }; |
319 | 323 |
320 #endif | 324 #endif |
OLD | NEW |