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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return fConfigTextureSupport[config]; | 193 return fConfigTextureSupport[config]; |
194 } | 194 } |
195 | 195 |
196 bool suppressPrints() const { return fSupressPrints; } | 196 bool suppressPrints() const { return fSupressPrints; } |
197 | 197 |
198 bool drawPathMasksToCompressedTexturesSupport() const { | 198 bool drawPathMasksToCompressedTexturesSupport() const { |
199 return fDrawPathMasksToCompressedTextureSupport; | 199 return fDrawPathMasksToCompressedTextureSupport; |
200 } | 200 } |
201 | 201 |
202 size_t geometryBufferMapThreshold() const { | 202 size_t geometryBufferMapThreshold() const { |
| 203 SkASSERT(fGeometryBufferMapThreshold >= 0); |
203 return fGeometryBufferMapThreshold; | 204 return fGeometryBufferMapThreshold; |
204 } | 205 } |
205 | 206 |
206 protected: | 207 protected: |
207 /** Subclasses must call this at the end of their constructors in order to a
pply caps | 208 /** Subclasses must call this at the end of their constructors in order to a
pply caps |
208 overrides requested by the client. Note that overrides will only reduce
the caps never | 209 overrides requested by the client. Note that overrides will only reduce
the caps never |
209 expand them. */ | 210 expand them. */ |
210 void applyOptionsOverrides(const GrContextOptions& options); | 211 void applyOptionsOverrides(const GrContextOptions& options); |
211 | 212 |
212 SkAutoTUnref<GrShaderCaps> fShaderCaps; | 213 SkAutoTUnref<GrShaderCaps> fShaderCaps; |
213 | 214 |
214 bool fNPOTTextureTileSupport : 1; | 215 bool fNPOTTextureTileSupport : 1; |
215 bool fMipMapSupport : 1; | 216 bool fMipMapSupport : 1; |
216 bool fTwoSidedStencilSupport : 1; | 217 bool fTwoSidedStencilSupport : 1; |
217 bool fStencilWrapOpsSupport : 1; | 218 bool fStencilWrapOpsSupport : 1; |
218 bool fDiscardRenderTargetSupport : 1; | 219 bool fDiscardRenderTargetSupport : 1; |
219 bool fReuseScratchTextures : 1; | 220 bool fReuseScratchTextures : 1; |
220 bool fGpuTracingSupport : 1; | 221 bool fGpuTracingSupport : 1; |
221 bool fCompressedTexSubImageSupport : 1; | 222 bool fCompressedTexSubImageSupport : 1; |
222 bool fOversizedStencilSupport : 1; | 223 bool fOversizedStencilSupport : 1; |
223 bool fTextureBarrierSupport : 1; | 224 bool fTextureBarrierSupport : 1; |
224 // Driver workaround | 225 // Driver workaround |
225 bool fUseDrawInsteadOfClear : 1; | 226 bool fUseDrawInsteadOfClear : 1; |
226 | 227 |
227 BlendEquationSupport fBlendEquationSupport; | 228 BlendEquationSupport fBlendEquationSupport; |
228 uint32_t fMapBufferFlags; | 229 uint32_t fMapBufferFlags; |
| 230 int fGeometryBufferMapThreshold; |
229 | 231 |
230 int fMaxRenderTargetSize; | 232 int fMaxRenderTargetSize; |
231 int fMaxTextureSize; | 233 int fMaxTextureSize; |
232 int fMaxSampleCount; | 234 int fMaxSampleCount; |
233 | 235 |
234 // The first entry for each config is without msaa and the second is with. | 236 // The first entry for each config is without msaa and the second is with. |
235 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 237 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
236 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 238 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
237 | 239 |
238 private: | 240 private: |
239 bool fSupressPrints : 1; | 241 bool fSupressPrints : 1; |
240 bool fDrawPathMasksToCompressedTextureSupport : 1; | 242 bool fDrawPathMasksToCompressedTextureSupport : 1; |
241 size_t fGeometryBufferMapThreshold; | |
242 | 243 |
243 typedef SkRefCnt INHERITED; | 244 typedef SkRefCnt INHERITED; |
244 }; | 245 }; |
245 | 246 |
246 #endif | 247 #endif |
OLD | NEW |