| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 GrShaderCaps(); | 56 GrShaderCaps(); |
| 57 | 57 |
| 58 virtual SkString dump() const; | 58 virtual SkString dump() const; |
| 59 | 59 |
| 60 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } | 60 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } |
| 61 bool geometryShaderSupport() const { return fGeometryShaderSupport; } | 61 bool geometryShaderSupport() const { return fGeometryShaderSupport; } |
| 62 bool pathRenderingSupport() const { return fPathRenderingSupport; } | 62 bool pathRenderingSupport() const { return fPathRenderingSupport; } |
| 63 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } | 63 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } |
| 64 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} | 64 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} |
| 65 bool mixedSamplesSupport() const { return fMixedSamplesSupport; } | |
| 66 bool programmableSampleLocationsSupport() const { return fProgrammableSample
LocationsSupport; } | 65 bool programmableSampleLocationsSupport() const { return fProgrammableSample
LocationsSupport; } |
| 67 | 66 |
| 68 /** | 67 /** |
| 69 * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSL
Type, etc in a | 68 * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSL
Type, etc in a |
| 70 * given shader type. If the shader type is not supported or the precision le
vel is not | 69 * given shader type. If the shader type is not supported or the precision le
vel is not |
| 71 * supported in that shader type then the returned struct will report false w
hen supported() is | 70 * supported in that shader type then the returned struct will report false w
hen supported() is |
| 72 * called. | 71 * called. |
| 73 */ | 72 */ |
| 74 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, | 73 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, |
| 75 GrSLPrecision precision) const { | 74 GrSLPrecision precision) const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 86 protected: | 85 protected: |
| 87 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by | 86 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by |
| 88 the client. Note that overrides will only reduce the caps never expand t
hem. */ | 87 the client. Note that overrides will only reduce the caps never expand t
hem. */ |
| 89 void applyOptionsOverrides(const GrContextOptions& options); | 88 void applyOptionsOverrides(const GrContextOptions& options); |
| 90 | 89 |
| 91 bool fShaderDerivativeSupport : 1; | 90 bool fShaderDerivativeSupport : 1; |
| 92 bool fGeometryShaderSupport : 1; | 91 bool fGeometryShaderSupport : 1; |
| 93 bool fPathRenderingSupport : 1; | 92 bool fPathRenderingSupport : 1; |
| 94 bool fDstReadInShaderSupport : 1; | 93 bool fDstReadInShaderSupport : 1; |
| 95 bool fDualSourceBlendingSupport : 1; | 94 bool fDualSourceBlendingSupport : 1; |
| 96 bool fMixedSamplesSupport : 1; | |
| 97 bool fProgrammableSampleLocationsSupport : 1; | 95 bool fProgrammableSampleLocationsSupport : 1; |
| 98 | 96 |
| 99 bool fShaderPrecisionVaries; | 97 bool fShaderPrecisionVaries; |
| 100 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 98 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
| 101 | 99 |
| 102 private: | 100 private: |
| 103 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 101 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
| 104 typedef SkRefCnt INHERITED; | 102 typedef SkRefCnt INHERITED; |
| 105 }; | 103 }; |
| 106 | 104 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 123 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | 121 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } |
| 124 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } | 122 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } |
| 125 #if GR_FORCE_GPU_TRACE_DEBUGGING | 123 #if GR_FORCE_GPU_TRACE_DEBUGGING |
| 126 bool gpuTracingSupport() const { return true; } | 124 bool gpuTracingSupport() const { return true; } |
| 127 #else | 125 #else |
| 128 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 126 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
| 129 #endif | 127 #endif |
| 130 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 128 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
| 131 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 129 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
| 132 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 130 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
| 131 bool mixedSamplesSupport() const { return fMixedSamplesSupport; } |
| 133 | 132 |
| 134 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 133 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
| 135 bool useDrawInsteadOfPartialRenderTargetWrite() const { | 134 bool useDrawInsteadOfPartialRenderTargetWrite() const { |
| 136 return fUseDrawInsteadOfPartialRenderTargetWrite; | 135 return fUseDrawInsteadOfPartialRenderTargetWrite; |
| 137 } | 136 } |
| 138 | 137 |
| 139 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } | 138 bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } |
| 140 | 139 |
| 141 /** | 140 /** |
| 142 * Indicates the capabilities of the fixed function blend unit. | 141 * Indicates the capabilities of the fixed function blend unit. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 bool fMipMapSupport : 1; | 239 bool fMipMapSupport : 1; |
| 241 bool fTwoSidedStencilSupport : 1; | 240 bool fTwoSidedStencilSupport : 1; |
| 242 bool fStencilWrapOpsSupport : 1; | 241 bool fStencilWrapOpsSupport : 1; |
| 243 bool fDiscardRenderTargetSupport : 1; | 242 bool fDiscardRenderTargetSupport : 1; |
| 244 bool fReuseScratchTextures : 1; | 243 bool fReuseScratchTextures : 1; |
| 245 bool fReuseScratchBuffers : 1; | 244 bool fReuseScratchBuffers : 1; |
| 246 bool fGpuTracingSupport : 1; | 245 bool fGpuTracingSupport : 1; |
| 247 bool fCompressedTexSubImageSupport : 1; | 246 bool fCompressedTexSubImageSupport : 1; |
| 248 bool fOversizedStencilSupport : 1; | 247 bool fOversizedStencilSupport : 1; |
| 249 bool fTextureBarrierSupport : 1; | 248 bool fTextureBarrierSupport : 1; |
| 249 bool fMixedSamplesSupport : 1; |
| 250 bool fSupportsInstancedDraws : 1; | 250 bool fSupportsInstancedDraws : 1; |
| 251 bool fFullClearIsFree : 1; | 251 bool fFullClearIsFree : 1; |
| 252 bool fMustClearUploadedBufferData : 1; | 252 bool fMustClearUploadedBufferData : 1; |
| 253 | 253 |
| 254 // Driver workaround | 254 // Driver workaround |
| 255 bool fUseDrawInsteadOfClear : 1; | 255 bool fUseDrawInsteadOfClear : 1; |
| 256 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; | 256 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; |
| 257 | 257 |
| 258 // ANGLE workaround | 258 // ANGLE workaround |
| 259 bool fPreferVRAMUseOverFlushes : 1; | 259 bool fPreferVRAMUseOverFlushes : 1; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 277 private: | 277 private: |
| 278 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 278 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
| 279 | 279 |
| 280 bool fSupressPrints : 1; | 280 bool fSupressPrints : 1; |
| 281 bool fDrawPathMasksToCompressedTextureSupport : 1; | 281 bool fDrawPathMasksToCompressedTextureSupport : 1; |
| 282 | 282 |
| 283 typedef SkRefCnt INHERITED; | 283 typedef SkRefCnt INHERITED; |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 #endif | 286 #endif |
| OLD | NEW |