| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 204 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 205 int maxTextureSize() const { return fMaxTextureSize; } | 205 int maxTextureSize() const { return fMaxTextureSize; } |
| 206 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. | 206 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. |
| 207 It is usually the max texture size, unless we're overriding it for testi
ng. */ | 207 It is usually the max texture size, unless we're overriding it for testi
ng. */ |
| 208 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } | 208 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } |
| 209 | 209 |
| 210 // Will be 0 if MSAA is not supported | 210 // Will be 0 if MSAA is not supported |
| 211 int maxColorSampleCount() const { return fMaxColorSampleCount; } | 211 int maxColorSampleCount() const { return fMaxColorSampleCount; } |
| 212 // Will be 0 if MSAA is not supported | 212 // Will be 0 if MSAA is not supported |
| 213 int maxStencilSampleCount() const { return fMaxStencilSampleCount; } | 213 int maxStencilSampleCount() const { return fMaxStencilSampleCount; } |
| 214 // Will be 0 if raster multisample is not supported. Raster multisample is a
special HW mode |
| 215 // where the rasterizer runs with more samples than are in the target frameb
uffer. |
| 216 int maxRasterSamples() const { return fMaxRasterSamples; } |
| 214 // We require the sample count to be less than maxColorSampleCount and maxSt
encilSampleCount. | 217 // We require the sample count to be less than maxColorSampleCount and maxSt
encilSampleCount. |
| 215 // If we are using mixed samples, we only care about stencil. | 218 // If we are using mixed samples, we only care about stencil. |
| 216 int maxSampleCount() const { | 219 int maxSampleCount() const { |
| 217 if (this->usesMixedSamples()) { | 220 if (this->usesMixedSamples()) { |
| 218 return this->maxStencilSampleCount(); | 221 return this->maxStencilSampleCount(); |
| 219 } else { | 222 } else { |
| 220 return SkTMin(this->maxColorSampleCount(), this->maxStencilSampleCou
nt()); | 223 return SkTMin(this->maxColorSampleCount(), this->maxStencilSampleCou
nt()); |
| 221 } | 224 } |
| 222 } | 225 } |
| 223 | 226 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 287 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 285 | 288 |
| 286 uint32_t fMapBufferFlags; | 289 uint32_t fMapBufferFlags; |
| 287 int fGeometryBufferMapThreshold; | 290 int fGeometryBufferMapThreshold; |
| 288 | 291 |
| 289 int fMaxRenderTargetSize; | 292 int fMaxRenderTargetSize; |
| 290 int fMaxTextureSize; | 293 int fMaxTextureSize; |
| 291 int fMaxTileSize; | 294 int fMaxTileSize; |
| 292 int fMaxColorSampleCount; | 295 int fMaxColorSampleCount; |
| 293 int fMaxStencilSampleCount; | 296 int fMaxStencilSampleCount; |
| 297 int fMaxRasterSamples; |
| 294 | 298 |
| 295 private: | 299 private: |
| 296 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 300 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
| 297 | 301 |
| 298 bool fSuppressPrints : 1; | 302 bool fSuppressPrints : 1; |
| 299 bool fImmediateFlush: 1; | 303 bool fImmediateFlush: 1; |
| 300 bool fDrawPathMasksToCompressedTextureSupport : 1; | 304 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 301 | 305 |
| 302 typedef SkRefCnt INHERITED; | 306 typedef SkRefCnt INHERITED; |
| 303 }; | 307 }; |
| 304 | 308 |
| 305 #endif | 309 #endif |
| OLD | NEW |