| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // Scratch textures not being reused means that those scratch textures | 183 // Scratch textures not being reused means that those scratch textures |
| 184 // that we upload to (i.e., don't have a render target) will not be | 184 // that we upload to (i.e., don't have a render target) will not be |
| 185 // recycled in the texture cache. This is to prevent ghosting by drivers | 185 // recycled in the texture cache. This is to prevent ghosting by drivers |
| 186 // (in particular for deferred architectures). | 186 // (in particular for deferred architectures). |
| 187 bool reuseScratchTextures() const { return fReuseScratchTextures; } | 187 bool reuseScratchTextures() const { return fReuseScratchTextures; } |
| 188 bool reuseScratchBuffers() const { return fReuseScratchBuffers; } | 188 bool reuseScratchBuffers() const { return fReuseScratchBuffers; } |
| 189 | 189 |
| 190 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 190 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 191 int maxTextureSize() const { return fMaxTextureSize; } | 191 int maxTextureSize() const { return fMaxTextureSize; } |
| 192 /** 0 unless GPU has problems with small textures */ | |
| 193 int minTextureSize() const { return fMinTextureSize; } | |
| 194 | 192 |
| 195 // Will be 0 if MSAA is not supported | 193 // Will be 0 if MSAA is not supported |
| 196 int maxSampleCount() const { return fMaxSampleCount; } | 194 int maxSampleCount() const { return fMaxSampleCount; } |
| 197 | 195 |
| 198 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { | 196 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { |
| 199 SkASSERT(kGrPixelConfigCnt > config); | 197 SkASSERT(kGrPixelConfigCnt > config); |
| 200 return fConfigRenderSupport[config][withMSAA]; | 198 return fConfigRenderSupport[config][withMSAA]; |
| 201 } | 199 } |
| 202 | 200 |
| 203 bool isConfigTexturable(GrPixelConfig config) const { | 201 bool isConfigTexturable(GrPixelConfig config) const { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 256 |
| 259 BlendEquationSupport fBlendEquationSupport; | 257 BlendEquationSupport fBlendEquationSupport; |
| 260 uint32_t fAdvBlendEqBlacklist; | 258 uint32_t fAdvBlendEqBlacklist; |
| 261 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 259 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 262 | 260 |
| 263 uint32_t fMapBufferFlags; | 261 uint32_t fMapBufferFlags; |
| 264 int fGeometryBufferMapThreshold; | 262 int fGeometryBufferMapThreshold; |
| 265 | 263 |
| 266 int fMaxRenderTargetSize; | 264 int fMaxRenderTargetSize; |
| 267 int fMaxTextureSize; | 265 int fMaxTextureSize; |
| 268 int fMinTextureSize; | |
| 269 int fMaxSampleCount; | 266 int fMaxSampleCount; |
| 270 | 267 |
| 271 // The first entry for each config is without msaa and the second is with. | 268 // The first entry for each config is without msaa and the second is with. |
| 272 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 269 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 273 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 270 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 274 | 271 |
| 275 private: | 272 private: |
| 276 bool fSupressPrints : 1; | 273 bool fSupressPrints : 1; |
| 277 bool fDrawPathMasksToCompressedTextureSupport : 1; | 274 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 278 | 275 |
| 279 typedef SkRefCnt INHERITED; | 276 typedef SkRefCnt INHERITED; |
| 280 }; | 277 }; |
| 281 | 278 |
| 282 #endif | 279 #endif |
| OLD | NEW |