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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 #else | 135 #else |
136 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 136 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
137 #endif | 137 #endif |
138 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup port; } | 138 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup port; } |
139 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 139 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
140 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 140 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
141 | 141 |
142 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 142 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
143 | 143 |
144 /** | 144 /** |
145 * Indicates the capabilities of the fixed function blend unit. | |
146 */ | |
147 enum BlendEquationSupport { | |
egdaniel
2015/05/05 21:20:01
Can BlendEquationSupport and related functions be
Chris Dalton
2015/05/06 16:06:27
Not easily, most the places where we add support f
egdaniel
2015/05/06 17:57:46
sgtm
| |
148 kBasic_BlendEquationSupport, //<! Support to select the oper ator that | |
149 // combines src and dst terms . | |
150 kAdvanced_BlendEquationSupport, //<! Additional fixed function support for specific | |
151 // SVG/PDF blend modes. Requi res blend barriers. | |
152 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su pport that does not | |
153 // require blend barriers, an d permits overlap. | |
154 | |
155 kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport | |
156 }; | |
157 | |
158 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup port; } | |
159 | |
160 bool advancedBlendEquationSupport() const { | |
161 return kBasic_BlendEquationSupport != fBlendEquationSupport; | |
162 } | |
163 | |
164 /** | |
145 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and | 165 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte x buffers and |
146 * textures allows partial mappings or full mappings. | 166 * textures allows partial mappings or full mappings. |
147 */ | 167 */ |
148 enum MapFlags { | 168 enum MapFlags { |
149 kNone_MapFlags = 0x0, //<! Cannot map the resource. | 169 kNone_MapFlags = 0x0, //<! Cannot map the resource. |
150 | 170 |
151 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of | 171 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s et for any of |
152 // the other flags to have meaning.k | 172 // the other flags to have meaning.k |
153 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. | 173 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. |
154 }; | 174 }; |
(...skipping 30 matching lines...) Expand all Loading... | |
185 bool fStencilWrapOpsSupport : 1; | 205 bool fStencilWrapOpsSupport : 1; |
186 bool fDiscardRenderTargetSupport : 1; | 206 bool fDiscardRenderTargetSupport : 1; |
187 bool fReuseScratchTextures : 1; | 207 bool fReuseScratchTextures : 1; |
188 bool fGpuTracingSupport : 1; | 208 bool fGpuTracingSupport : 1; |
189 bool fCompressedTexSubImageSupport : 1; | 209 bool fCompressedTexSubImageSupport : 1; |
190 bool fOversizedStencilSupport : 1; | 210 bool fOversizedStencilSupport : 1; |
191 bool fTextureBarrierSupport : 1; | 211 bool fTextureBarrierSupport : 1; |
192 // Driver workaround | 212 // Driver workaround |
193 bool fUseDrawInsteadOfClear : 1; | 213 bool fUseDrawInsteadOfClear : 1; |
194 | 214 |
215 BlendEquationSupport fBlendEquationSupport; | |
195 uint32_t fMapBufferFlags; | 216 uint32_t fMapBufferFlags; |
196 | 217 |
197 int fMaxRenderTargetSize; | 218 int fMaxRenderTargetSize; |
198 int fMaxTextureSize; | 219 int fMaxTextureSize; |
199 int fMaxSampleCount; | 220 int fMaxSampleCount; |
200 | 221 |
201 // The first entry for each config is without msaa and the second is with. | 222 // The first entry for each config is without msaa and the second is with. |
202 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 223 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
203 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 224 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
204 | 225 |
205 private: | 226 private: |
206 typedef SkRefCnt INHERITED; | 227 typedef SkRefCnt INHERITED; |
207 }; | 228 }; |
208 | 229 |
209 #endif | 230 #endif |
OLD | NEW |