| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 #if GR_FORCE_GPU_TRACE_DEBUGGING | 126 #if GR_FORCE_GPU_TRACE_DEBUGGING |
| 127 bool gpuTracingSupport() const { return true; } | 127 bool gpuTracingSupport() const { return true; } |
| 128 #else | 128 #else |
| 129 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 129 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
| 130 #endif | 130 #endif |
| 131 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 131 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
| 132 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 132 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
| 133 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 133 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
| 134 | 134 |
| 135 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 135 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
| 136 bool useDrawInsteadOfPartialRenderTargetWrite() const { |
| 137 return fUseDrawInsteadOfPartialRenderTargetWrite; |
| 138 } |
| 136 | 139 |
| 137 /** | 140 /** |
| 138 * Indicates the capabilities of the fixed function blend unit. | 141 * Indicates the capabilities of the fixed function blend unit. |
| 139 */ | 142 */ |
| 140 enum BlendEquationSupport { | 143 enum BlendEquationSupport { |
| 141 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that | 144 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that |
| 142 // combines src and dst terms
. | 145 // combines src and dst terms
. |
| 143 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific | 146 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific |
| 144 // SVG/PDF blend modes. Requi
res blend barriers. | 147 // SVG/PDF blend modes. Requi
res blend barriers. |
| 145 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not | 148 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } | 216 } |
| 214 | 217 |
| 215 protected: | 218 protected: |
| 216 /** Subclasses must call this at the end of their constructors in order to a
pply caps | 219 /** Subclasses must call this at the end of their constructors in order to a
pply caps |
| 217 overrides requested by the client. Note that overrides will only reduce
the caps never | 220 overrides requested by the client. Note that overrides will only reduce
the caps never |
| 218 expand them. */ | 221 expand them. */ |
| 219 void applyOptionsOverrides(const GrContextOptions& options); | 222 void applyOptionsOverrides(const GrContextOptions& options); |
| 220 | 223 |
| 221 SkAutoTUnref<GrShaderCaps> fShaderCaps; | 224 SkAutoTUnref<GrShaderCaps> fShaderCaps; |
| 222 | 225 |
| 223 bool fNPOTTextureTileSupport : 1; | 226 bool fNPOTTextureTileSupport : 1; |
| 224 bool fMipMapSupport : 1; | 227 bool fMipMapSupport : 1; |
| 225 bool fTwoSidedStencilSupport : 1; | 228 bool fTwoSidedStencilSupport : 1; |
| 226 bool fStencilWrapOpsSupport : 1; | 229 bool fStencilWrapOpsSupport : 1; |
| 227 bool fDiscardRenderTargetSupport : 1; | 230 bool fDiscardRenderTargetSupport : 1; |
| 228 bool fReuseScratchTextures : 1; | 231 bool fReuseScratchTextures : 1; |
| 229 bool fGpuTracingSupport : 1; | 232 bool fGpuTracingSupport : 1; |
| 230 bool fCompressedTexSubImageSupport : 1; | 233 bool fCompressedTexSubImageSupport : 1; |
| 231 bool fOversizedStencilSupport : 1; | 234 bool fOversizedStencilSupport : 1; |
| 232 bool fTextureBarrierSupport : 1; | 235 bool fTextureBarrierSupport : 1; |
| 233 // Driver workaround | 236 // Driver workaround |
| 234 bool fUseDrawInsteadOfClear : 1; | 237 bool fUseDrawInsteadOfClear : 1; |
| 238 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; |
| 235 | 239 |
| 236 BlendEquationSupport fBlendEquationSupport; | 240 BlendEquationSupport fBlendEquationSupport; |
| 237 uint32_t fAdvBlendEqBlacklist; | 241 uint32_t fAdvBlendEqBlacklist; |
| 238 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); | 242 GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 239 | 243 |
| 240 uint32_t fMapBufferFlags; | 244 uint32_t fMapBufferFlags; |
| 241 int fGeometryBufferMapThreshold; | 245 int fGeometryBufferMapThreshold; |
| 242 | 246 |
| 243 int fMaxRenderTargetSize; | 247 int fMaxRenderTargetSize; |
| 244 int fMaxTextureSize; | 248 int fMaxTextureSize; |
| 245 int fMinTextureSize; | 249 int fMinTextureSize; |
| 246 int fMaxSampleCount; | 250 int fMaxSampleCount; |
| 247 | 251 |
| 248 // The first entry for each config is without msaa and the second is with. | 252 // The first entry for each config is without msaa and the second is with. |
| 249 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 253 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 250 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 254 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 251 | 255 |
| 252 private: | 256 private: |
| 253 bool fSupressPrints : 1; | 257 bool fSupressPrints : 1; |
| 254 bool fDrawPathMasksToCompressedTextureSupport : 1; | 258 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 255 | 259 |
| 256 typedef SkRefCnt INHERITED; | 260 typedef SkRefCnt INHERITED; |
| 257 }; | 261 }; |
| 258 | 262 |
| 259 #endif | 263 #endif |
| OLD | NEW |