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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 integerSupport() const { return fIntegerSupport; } | 65 bool integerSupport() const { return fIntegerSupport; } |
| 66 bool texelBufferSupport() const { return fTexelBufferSupport; } |
66 | 67 |
67 /** | 68 /** |
68 * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSL
Type, etc in a | 69 * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSL
Type, etc in a |
69 * given shader type. If the shader type is not supported or the precision le
vel is not | 70 * given shader type. If the shader type is not supported or the precision le
vel is not |
70 * supported in that shader type then the returned struct will report false w
hen supported() is | 71 * supported in that shader type then the returned struct will report false w
hen supported() is |
71 * called. | 72 * called. |
72 */ | 73 */ |
73 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, | 74 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, |
74 GrSLPrecision precision) co
nst { | 75 GrSLPrecision precision) co
nst { |
75 return fFloatPrecisions[shaderType][precision]; | 76 return fFloatPrecisions[shaderType][precision]; |
(...skipping 28 matching lines...) Expand all Loading... |
104 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by | 105 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by |
105 the client. Note that overrides will only reduce the caps never expand t
hem. */ | 106 the client. Note that overrides will only reduce the caps never expand t
hem. */ |
106 void applyOptionsOverrides(const GrContextOptions& options); | 107 void applyOptionsOverrides(const GrContextOptions& options); |
107 | 108 |
108 bool fShaderDerivativeSupport : 1; | 109 bool fShaderDerivativeSupport : 1; |
109 bool fGeometryShaderSupport : 1; | 110 bool fGeometryShaderSupport : 1; |
110 bool fPathRenderingSupport : 1; | 111 bool fPathRenderingSupport : 1; |
111 bool fDstReadInShaderSupport : 1; | 112 bool fDstReadInShaderSupport : 1; |
112 bool fDualSourceBlendingSupport : 1; | 113 bool fDualSourceBlendingSupport : 1; |
113 bool fIntegerSupport : 1; | 114 bool fIntegerSupport : 1; |
| 115 bool fTexelBufferSupport : 1; |
114 | 116 |
115 bool fShaderPrecisionVaries; | 117 bool fShaderPrecisionVaries; |
116 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 118 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
117 int fPixelLocalStorageSize; | 119 int fPixelLocalStorageSize; |
118 bool fPLSPathRenderingSupport; | 120 bool fPLSPathRenderingSupport; |
119 | 121 |
120 private: | 122 private: |
121 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 123 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
122 typedef SkRefCnt INHERITED; | 124 typedef SkRefCnt INHERITED; |
123 }; | 125 }; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 328 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
327 | 329 |
328 bool fSuppressPrints : 1; | 330 bool fSuppressPrints : 1; |
329 bool fImmediateFlush: 1; | 331 bool fImmediateFlush: 1; |
330 bool fDrawPathMasksToCompressedTextureSupport : 1; | 332 bool fDrawPathMasksToCompressedTextureSupport : 1; |
331 | 333 |
332 typedef SkRefCnt INHERITED; | 334 typedef SkRefCnt INHERITED; |
333 }; | 335 }; |
334 | 336 |
335 #endif | 337 #endif |
OLD | NEW |