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 integerSupport() const { return fIntegerSupport; } |
65 | 66 |
66 /** | 67 /** |
67 * 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 |
68 * 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 |
69 * 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 |
70 * called. | 71 * called. |
71 */ | 72 */ |
72 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, | 73 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, |
73 GrSLPrecision precision) co
nst { | 74 GrSLPrecision precision) co
nst { |
74 return fFloatPrecisions[shaderType][precision]; | 75 return fFloatPrecisions[shaderType][precision]; |
(...skipping 27 matching lines...) Expand all Loading... |
102 protected: | 103 protected: |
103 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by | 104 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by |
104 the client. Note that overrides will only reduce the caps never expand t
hem. */ | 105 the client. Note that overrides will only reduce the caps never expand t
hem. */ |
105 void applyOptionsOverrides(const GrContextOptions& options); | 106 void applyOptionsOverrides(const GrContextOptions& options); |
106 | 107 |
107 bool fShaderDerivativeSupport : 1; | 108 bool fShaderDerivativeSupport : 1; |
108 bool fGeometryShaderSupport : 1; | 109 bool fGeometryShaderSupport : 1; |
109 bool fPathRenderingSupport : 1; | 110 bool fPathRenderingSupport : 1; |
110 bool fDstReadInShaderSupport : 1; | 111 bool fDstReadInShaderSupport : 1; |
111 bool fDualSourceBlendingSupport : 1; | 112 bool fDualSourceBlendingSupport : 1; |
| 113 bool fIntegerSupport : 1; |
112 | 114 |
113 bool fShaderPrecisionVaries; | 115 bool fShaderPrecisionVaries; |
114 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 116 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
115 int fPixelLocalStorageSize; | 117 int fPixelLocalStorageSize; |
116 bool fPLSPathRenderingSupport; | 118 bool fPLSPathRenderingSupport; |
117 | 119 |
118 private: | 120 private: |
119 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 121 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
120 typedef SkRefCnt INHERITED; | 122 typedef SkRefCnt INHERITED; |
121 }; | 123 }; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 302 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
301 | 303 |
302 bool fSuppressPrints : 1; | 304 bool fSuppressPrints : 1; |
303 bool fImmediateFlush: 1; | 305 bool fImmediateFlush: 1; |
304 bool fDrawPathMasksToCompressedTextureSupport : 1; | 306 bool fDrawPathMasksToCompressedTextureSupport : 1; |
305 | 307 |
306 typedef SkRefCnt INHERITED; | 308 typedef SkRefCnt INHERITED; |
307 }; | 309 }; |
308 | 310 |
309 #endif | 311 #endif |
OLD | NEW |