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 GrDrawTargetCaps_DEFINED | 8 #ifndef GrDrawTargetCaps_DEFINED |
9 #define GrDrawTargetCaps_DEFINED | 9 #define GrDrawTargetCaps_DEFINED |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #else | 84 #else |
85 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 85 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
86 #endif | 86 #endif |
87 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 87 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
88 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 88 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
89 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 89 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
90 | 90 |
91 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 91 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
92 | 92 |
93 /** | 93 /** |
| 94 * Indicates the capabilities of the fixed function blend unit. |
| 95 */ |
| 96 enum BlendEquationSupport { |
| 97 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that |
| 98 // combines src and dst terms
. |
| 99 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific |
| 100 // SVG/PDF blend modes. Requi
res blend barriers. |
| 101 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not |
| 102 // require blend barriers, an
d permits overlap. |
| 103 |
| 104 kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport |
| 105 }; |
| 106 |
| 107 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup
port; } |
| 108 |
| 109 bool advancedBlendEquationSupport() const { |
| 110 return kBasic_BlendEquationSupport != fBlendEquationSupport; |
| 111 } |
| 112 |
| 113 /** |
94 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and | 114 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and |
95 * textures allows partial mappings or full mappings. | 115 * textures allows partial mappings or full mappings. |
96 */ | 116 */ |
97 enum MapFlags { | 117 enum MapFlags { |
98 kNone_MapFlags = 0x0, //<! Cannot map the resource. | 118 kNone_MapFlags = 0x0, //<! Cannot map the resource. |
99 | 119 |
100 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of | 120 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of |
101 // the other flags to have meaning.k | 121 // the other flags to have meaning.k |
102 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. | 122 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. |
103 }; | 123 }; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool fDstReadInShaderSupport : 1; | 175 bool fDstReadInShaderSupport : 1; |
156 bool fDiscardRenderTargetSupport : 1; | 176 bool fDiscardRenderTargetSupport : 1; |
157 bool fReuseScratchTextures : 1; | 177 bool fReuseScratchTextures : 1; |
158 bool fGpuTracingSupport : 1; | 178 bool fGpuTracingSupport : 1; |
159 bool fCompressedTexSubImageSupport : 1; | 179 bool fCompressedTexSubImageSupport : 1; |
160 bool fOversizedStencilSupport : 1; | 180 bool fOversizedStencilSupport : 1; |
161 bool fTextureBarrierSupport : 1; | 181 bool fTextureBarrierSupport : 1; |
162 // Driver workaround | 182 // Driver workaround |
163 bool fUseDrawInsteadOfClear : 1; | 183 bool fUseDrawInsteadOfClear : 1; |
164 | 184 |
| 185 BlendEquationSupport fBlendEquationSupport; |
165 uint32_t fMapBufferFlags; | 186 uint32_t fMapBufferFlags; |
166 | 187 |
167 int fMaxRenderTargetSize; | 188 int fMaxRenderTargetSize; |
168 int fMaxTextureSize; | 189 int fMaxTextureSize; |
169 int fMaxSampleCount; | 190 int fMaxSampleCount; |
170 | 191 |
171 // The first entry for each config is without msaa and the second is with. | 192 // The first entry for each config is without msaa and the second is with. |
172 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 193 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
173 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 194 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
174 | 195 |
175 bool fShaderPrecisionVaries; | 196 bool fShaderPrecisionVaries; |
176 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 197 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
177 | 198 |
178 private: | 199 private: |
179 typedef SkRefCnt INHERITED; | 200 typedef SkRefCnt INHERITED; |
180 }; | 201 }; |
181 | 202 |
182 #endif | 203 #endif |
OLD | NEW |