aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContextOptions.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-10-18 08:33:29 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-18 12:55:06 +0000
commit43f8bf0f784f4182ed0fca9053ecf570caf7ad70 (patch)
tree2a705f6737fceb0d322d6a91d51b01160d68e844 /include/gpu/GrContextOptions.h
parent57caa660c024cf6fda5e1fba8cb21224b51375fe (diff)
Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154 Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58 Reviewed-on: https://skia-review.googlesource.com/60681 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrContextOptions.h')
-rw-r--r--include/gpu/GrContextOptions.h17
1 files changed, 17 insertions, 0 deletions
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.