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; } | |
66 | 65 |
67 /** | 66 /** |
68 * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSL
Type, etc in a | 67 * 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 | 68 * 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 | 69 * supported in that shader type then the returned struct will report false w
hen supported() is |
71 * called. | 70 * called. |
72 */ | 71 */ |
73 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, | 72 const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, |
74 GrSLPrecision precision) co
nst { | 73 GrSLPrecision precision) co
nst { |
75 return fFloatPrecisions[shaderType][precision]; | 74 return fFloatPrecisions[shaderType][precision]; |
(...skipping 27 matching lines...) Expand all Loading... |
103 protected: | 102 protected: |
104 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by | 103 /** 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. */ | 104 the client. Note that overrides will only reduce the caps never expand t
hem. */ |
106 void applyOptionsOverrides(const GrContextOptions& options); | 105 void applyOptionsOverrides(const GrContextOptions& options); |
107 | 106 |
108 bool fShaderDerivativeSupport : 1; | 107 bool fShaderDerivativeSupport : 1; |
109 bool fGeometryShaderSupport : 1; | 108 bool fGeometryShaderSupport : 1; |
110 bool fPathRenderingSupport : 1; | 109 bool fPathRenderingSupport : 1; |
111 bool fDstReadInShaderSupport : 1; | 110 bool fDstReadInShaderSupport : 1; |
112 bool fDualSourceBlendingSupport : 1; | 111 bool fDualSourceBlendingSupport : 1; |
113 bool fIntegerSupport : 1; | |
114 | 112 |
115 bool fShaderPrecisionVaries; | 113 bool fShaderPrecisionVaries; |
116 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 114 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
117 int fPixelLocalStorageSize; | 115 int fPixelLocalStorageSize; |
118 bool fPLSPathRenderingSupport; | 116 bool fPLSPathRenderingSupport; |
119 | 117 |
120 private: | 118 private: |
121 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 119 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
122 typedef SkRefCnt INHERITED; | 120 typedef SkRefCnt INHERITED; |
123 }; | 121 }; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 306 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
309 | 307 |
310 bool fSuppressPrints : 1; | 308 bool fSuppressPrints : 1; |
311 bool fImmediateFlush: 1; | 309 bool fImmediateFlush: 1; |
312 bool fDrawPathMasksToCompressedTextureSupport : 1; | 310 bool fDrawPathMasksToCompressedTextureSupport : 1; |
313 | 311 |
314 typedef SkRefCnt INHERITED; | 312 typedef SkRefCnt INHERITED; |
315 }; | 313 }; |
316 | 314 |
317 #endif | 315 #endif |
OLD | NEW |