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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 bool suppressPrints() const { return fSuppressPrints; } | 271 bool suppressPrints() const { return fSuppressPrints; } |
272 | 272 |
273 bool immediateFlush() const { return fImmediateFlush; } | 273 bool immediateFlush() const { return fImmediateFlush; } |
274 | 274 |
275 size_t bufferMapThreshold() const { | 275 size_t bufferMapThreshold() const { |
276 SkASSERT(fBufferMapThreshold >= 0); | 276 SkASSERT(fBufferMapThreshold >= 0); |
277 return fBufferMapThreshold; | 277 return fBufferMapThreshold; |
278 } | 278 } |
279 | 279 |
280 bool supportsInstancedDraws() const { | |
281 return fSupportsInstancedDraws; | |
282 } | |
283 | |
284 bool fullClearIsFree() const { return fFullClearIsFree; } | 280 bool fullClearIsFree() const { return fFullClearIsFree; } |
285 | 281 |
286 /** True in environments that will issue errors if memory uploaded to buffer
s | 282 /** True in environments that will issue errors if memory uploaded to buffer
s |
287 is not initialized (even if not read by draw calls). */ | 283 is not initialized (even if not read by draw calls). */ |
288 bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferDa
ta; } | 284 bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferDa
ta; } |
289 | 285 |
290 bool sampleShadingSupport() const { return fSampleShadingSupport; } | 286 bool sampleShadingSupport() const { return fSampleShadingSupport; } |
291 | 287 |
292 protected: | 288 protected: |
293 /** Subclasses must call this at the end of their constructors in order to a
pply caps | 289 /** Subclasses must call this at the end of their constructors in order to a
pply caps |
(...skipping 13 matching lines...) Expand all Loading... |
307 bool fReuseScratchTextures : 1; | 303 bool fReuseScratchTextures : 1; |
308 bool fReuseScratchBuffers : 1; | 304 bool fReuseScratchBuffers : 1; |
309 bool fGpuTracingSupport : 1; | 305 bool fGpuTracingSupport : 1; |
310 bool fCompressedTexSubImageSupport : 1; | 306 bool fCompressedTexSubImageSupport : 1; |
311 bool fOversizedStencilSupport : 1; | 307 bool fOversizedStencilSupport : 1; |
312 bool fTextureBarrierSupport : 1; | 308 bool fTextureBarrierSupport : 1; |
313 bool fSampleLocationsSupport : 1; | 309 bool fSampleLocationsSupport : 1; |
314 bool fMultisampleDisableSupport : 1; | 310 bool fMultisampleDisableSupport : 1; |
315 bool fUsesMixedSamples : 1; | 311 bool fUsesMixedSamples : 1; |
316 bool fPreferClientSideDynamicBuffers : 1; | 312 bool fPreferClientSideDynamicBuffers : 1; |
317 bool fSupportsInstancedDraws : 1; | |
318 bool fFullClearIsFree : 1; | 313 bool fFullClearIsFree : 1; |
319 bool fMustClearUploadedBufferData : 1; | 314 bool fMustClearUploadedBufferData : 1; |
320 | 315 |
321 // Driver workaround | 316 // Driver workaround |
322 bool fUseDrawInsteadOfClear : 1; | 317 bool fUseDrawInsteadOfClear : 1; |
323 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; | 318 bool fUseDrawInsteadOfPartialRenderTargetWrite : 1; |
324 bool fUseDrawInsteadOfAllRenderTargetWrites : 1; | 319 bool fUseDrawInsteadOfAllRenderTargetWrites : 1; |
325 bool fAvoidInstancedDrawsToFPTargets : 1; | 320 bool fAvoidInstancedDrawsToFPTargets : 1; |
326 | 321 |
327 // ANGLE workaround | 322 // ANGLE workaround |
(...skipping 21 matching lines...) Expand all Loading... |
349 private: | 344 private: |
350 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 345 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
351 | 346 |
352 bool fSuppressPrints : 1; | 347 bool fSuppressPrints : 1; |
353 bool fImmediateFlush: 1; | 348 bool fImmediateFlush: 1; |
354 | 349 |
355 typedef SkRefCnt INHERITED; | 350 typedef SkRefCnt INHERITED; |
356 }; | 351 }; |
357 | 352 |
358 #endif | 353 #endif |
OLD | NEW |