| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 188 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 189 int maxTextureSize() const { return fMaxTextureSize; } | 189 int maxTextureSize() const { return fMaxTextureSize; } |
| 190 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. | 190 /** This is the maximum tile size to use by GPU devices for rendering sw-bac
ked images/bitmaps. |
| 191 It is usually the max texture size, unless we're overriding it for testi
ng. */ | 191 It is usually the max texture size, unless we're overriding it for testi
ng. */ |
| 192 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } | 192 int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return
fMaxTileSize; } |
| 193 | 193 |
| 194 // Will be 0 if MSAA is not supported | 194 // Will be 0 if MSAA is not supported |
| 195 int maxSampleCount() const { return fMaxSampleCount; } | 195 int maxSampleCount() const { return fMaxSampleCount; } |
| 196 | 196 |
| 197 virtual bool isConfigTexturable(GrPixelConfig config) const = 0; | 197 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { |
| 198 virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const =
0; | 198 SkASSERT(kGrPixelConfigCnt > config); |
| 199 return fConfigRenderSupport[config][withMSAA]; |
| 200 } |
| 201 |
| 202 bool isConfigTexturable(GrPixelConfig config) const { |
| 203 SkASSERT(kGrPixelConfigCnt > config); |
| 204 return fConfigTextureSupport[config]; |
| 205 } |
| 199 | 206 |
| 200 bool suppressPrints() const { return fSuppressPrints; } | 207 bool suppressPrints() const { return fSuppressPrints; } |
| 201 | 208 |
| 202 bool immediateFlush() const { return fImmediateFlush; } | 209 bool immediateFlush() const { return fImmediateFlush; } |
| 203 | 210 |
| 204 bool drawPathMasksToCompressedTexturesSupport() const { | 211 bool drawPathMasksToCompressedTexturesSupport() const { |
| 205 return fDrawPathMasksToCompressedTextureSupport; | 212 return fDrawPathMasksToCompressedTextureSupport; |
| 206 } | 213 } |
| 207 | 214 |
| 208 size_t geometryBufferMapThreshold() const { | 215 size_t geometryBufferMapThreshold() const { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 263 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 257 | 264 |
| 258 uint32_t fMapBufferFlags; | 265 uint32_t fMapBufferFlags; |
| 259 int fGeometryBufferMapThreshold; | 266 int fGeometryBufferMapThreshold; |
| 260 | 267 |
| 261 int fMaxRenderTargetSize; | 268 int fMaxRenderTargetSize; |
| 262 int fMaxTextureSize; | 269 int fMaxTextureSize; |
| 263 int fMaxTileSize; | 270 int fMaxTileSize; |
| 264 int fMaxSampleCount; | 271 int fMaxSampleCount; |
| 265 | 272 |
| 273 // The first entry for each config is without msaa and the second is with. |
| 274 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 275 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 276 |
| 266 private: | 277 private: |
| 267 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 278 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
| 268 | 279 |
| 269 bool fSuppressPrints : 1; | 280 bool fSuppressPrints : 1; |
| 270 bool fImmediateFlush: 1; | 281 bool fImmediateFlush: 1; |
| 271 bool fDrawPathMasksToCompressedTextureSupport : 1; | 282 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 272 | 283 |
| 273 typedef SkRefCnt INHERITED; | 284 typedef SkRefCnt INHERITED; |
| 274 }; | 285 }; |
| 275 | 286 |
| 276 #endif | 287 #endif |
| OLD | NEW |