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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return fFloatPrecisions[shaderType][precision]; | 74 return fFloatPrecisions[shaderType][precision]; |
75 }; | 75 }; |
76 | 76 |
77 /** | 77 /** |
78 * Is there any difference between the float shader variable precision types?
If this is true | 78 * Is there any difference between the float shader variable precision types?
If this is true |
79 * then unless the shader type is not supported, any call to getFloatShaderPr
ecisionInfo() would | 79 * then unless the shader type is not supported, any call to getFloatShaderPr
ecisionInfo() would |
80 * report the same info for all precisions in all shader types. | 80 * report the same info for all precisions in all shader types. |
81 */ | 81 */ |
82 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } | 82 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } |
83 | 83 |
| 84 int pixelLocalStorageSize() const { return fPixelLocalStorageSize; } |
| 85 |
84 protected: | 86 protected: |
85 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by | 87 /** Subclasses must call this after initialization in order to apply caps ov
errides requested by |
86 the client. Note that overrides will only reduce the caps never expand t
hem. */ | 88 the client. Note that overrides will only reduce the caps never expand t
hem. */ |
87 void applyOptionsOverrides(const GrContextOptions& options); | 89 void applyOptionsOverrides(const GrContextOptions& options); |
88 | 90 |
89 bool fShaderDerivativeSupport : 1; | 91 bool fShaderDerivativeSupport : 1; |
90 bool fGeometryShaderSupport : 1; | 92 bool fGeometryShaderSupport : 1; |
91 bool fPathRenderingSupport : 1; | 93 bool fPathRenderingSupport : 1; |
92 bool fDstReadInShaderSupport : 1; | 94 bool fDstReadInShaderSupport : 1; |
93 bool fDualSourceBlendingSupport : 1; | 95 bool fDualSourceBlendingSupport : 1; |
94 | 96 |
95 bool fShaderPrecisionVaries; | 97 bool fShaderPrecisionVaries; |
96 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 98 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
| 99 int fPixelLocalStorageSize; |
97 | 100 |
98 private: | 101 private: |
99 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 102 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
100 typedef SkRefCnt INHERITED; | 103 typedef SkRefCnt INHERITED; |
101 }; | 104 }; |
102 | 105 |
103 /** | 106 /** |
104 * Represents the capabilities of a GrContext. | 107 * Represents the capabilities of a GrContext. |
105 */ | 108 */ |
106 class GrCaps : public SkRefCnt { | 109 class GrCaps : public SkRefCnt { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 281 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
279 | 282 |
280 bool fSuppressPrints : 1; | 283 bool fSuppressPrints : 1; |
281 bool fImmediateFlush: 1; | 284 bool fImmediateFlush: 1; |
282 bool fDrawPathMasksToCompressedTextureSupport : 1; | 285 bool fDrawPathMasksToCompressedTextureSupport : 1; |
283 | 286 |
284 typedef SkRefCnt INHERITED; | 287 typedef SkRefCnt INHERITED; |
285 }; | 288 }; |
286 | 289 |
287 #endif | 290 #endif |
OLD | NEW |