| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 uint32_t mapBufferFlags() const { return fMapBufferFlags; } | 173 uint32_t mapBufferFlags() const { return fMapBufferFlags; } |
| 174 | 174 |
| 175 // Scratch textures not being reused means that those scratch textures | 175 // Scratch textures not being reused means that those scratch textures |
| 176 // that we upload to (i.e., don't have a render target) will not be | 176 // that we upload to (i.e., don't have a render target) will not be |
| 177 // recycled in the texture cache. This is to prevent ghosting by drivers | 177 // recycled in the texture cache. This is to prevent ghosting by drivers |
| 178 // (in particular for deferred architectures). | 178 // (in particular for deferred architectures). |
| 179 bool reuseScratchTextures() const { return fReuseScratchTextures; } | 179 bool reuseScratchTextures() const { return fReuseScratchTextures; } |
| 180 | 180 |
| 181 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 181 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 182 int maxTextureSize() const { return fMaxTextureSize; } | 182 int maxTextureSize() const { return fMaxTextureSize; } |
| 183 /** 0 unless GPU has problems with small textures */ |
| 184 int minTextureSize() const { return fMinTextureSize; } |
| 185 |
| 183 // Will be 0 if MSAA is not supported | 186 // Will be 0 if MSAA is not supported |
| 184 int maxSampleCount() const { return fMaxSampleCount; } | 187 int maxSampleCount() const { return fMaxSampleCount; } |
| 185 | 188 |
| 186 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { | 189 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { |
| 187 SkASSERT(kGrPixelConfigCnt > config); | 190 SkASSERT(kGrPixelConfigCnt > config); |
| 188 return fConfigRenderSupport[config][withMSAA]; | 191 return fConfigRenderSupport[config][withMSAA]; |
| 189 } | 192 } |
| 190 | 193 |
| 191 bool isConfigTexturable(GrPixelConfig config) const { | 194 bool isConfigTexturable(GrPixelConfig config) const { |
| 192 SkASSERT(kGrPixelConfigCnt > config); | 195 SkASSERT(kGrPixelConfigCnt > config); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 222 bool fOversizedStencilSupport : 1; | 225 bool fOversizedStencilSupport : 1; |
| 223 bool fTextureBarrierSupport : 1; | 226 bool fTextureBarrierSupport : 1; |
| 224 // Driver workaround | 227 // Driver workaround |
| 225 bool fUseDrawInsteadOfClear : 1; | 228 bool fUseDrawInsteadOfClear : 1; |
| 226 | 229 |
| 227 BlendEquationSupport fBlendEquationSupport; | 230 BlendEquationSupport fBlendEquationSupport; |
| 228 uint32_t fMapBufferFlags; | 231 uint32_t fMapBufferFlags; |
| 229 | 232 |
| 230 int fMaxRenderTargetSize; | 233 int fMaxRenderTargetSize; |
| 231 int fMaxTextureSize; | 234 int fMaxTextureSize; |
| 235 int fMinTextureSize; |
| 232 int fMaxSampleCount; | 236 int fMaxSampleCount; |
| 233 | 237 |
| 234 // The first entry for each config is without msaa and the second is with. | 238 // The first entry for each config is without msaa and the second is with. |
| 235 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 239 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 236 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 240 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 237 | 241 |
| 238 private: | 242 private: |
| 239 bool fSupressPrints : 1; | 243 bool fSupressPrints : 1; |
| 240 bool fDrawPathMasksToCompressedTextureSupport : 1; | 244 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 241 size_t fGeometryBufferMapThreshold; | 245 size_t fGeometryBufferMapThreshold; |
| 242 | 246 |
| 243 typedef SkRefCnt INHERITED; | 247 typedef SkRefCnt INHERITED; |
| 244 }; | 248 }; |
| 245 | 249 |
| 246 #endif | 250 #endif |
| OLD | NEW |