diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrCaps.h | 3 | ||||
-rw-r--r-- | include/gpu/GrContextOptions.h | 17 |
2 files changed, 17 insertions, 3 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 82a4be2c25..0b4c2e7ee5 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -55,8 +55,6 @@ public: bool usesMixedSamples() const { return fUsesMixedSamples; } bool preferClientSideDynamicBuffers() const { return fPreferClientSideDynamicBuffers; } - bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } - bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } /** @@ -210,7 +208,6 @@ protected: bool fMustClearUploadedBufferData : 1; // Driver workaround - bool fUseDrawInsteadOfClear : 1; bool fAvoidInstancedDrawsToFPTargets : 1; bool fBlacklistCoverageCounting : 1; bool fAvoidStencilBuffers : 1; diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index 61dc8b0457..894813b5cc 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -15,6 +15,17 @@ class SkExecutor; struct GrContextOptions { + enum class Enable { + /** Forces an option to be disabled. */ + kNo, + /** Forces an option to be enabled. */ + kYes, + /** + * Uses Skia's default behavior, which may use runtime properties (e.g. driver version). + */ + kDefault + }; + GrContextOptions() {} // Suppress prints for the GrContext. @@ -88,6 +99,12 @@ struct GrContextOptions { */ bool fAvoidStencilBuffers = false; + /** + * Enables driver workaround to use draws instead of glClear. This only applies to + * kOpenGL_GrBackend. + */ + Enable fUseDrawInsteadOfGLClear = Enable::kDefault; + #if GR_TEST_UTILS /** * Private options that are only meant for testing within Skia's tools. |