aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn6
-rw-r--r--tools/skqp/gm_runner.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 888c3260c0..cbac744d51 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -51,6 +51,8 @@ declare_args() {
skia_jumper_clang = ""
skia_jumper_objdump = ""
skia_jumper_ccache = ""
+
+ skia_skqp_enable_driver_correctness_workarounds = false
}
declare_args() {
skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
@@ -1790,6 +1792,10 @@ if (skia_enable_tools) {
if (!is_win && skia_enable_gpu) {
test_lib("skqp_lib") {
public_include_dirs = [ "tools/skqp" ]
+ defines = []
+ if (skia_skqp_enable_driver_correctness_workarounds) {
+ defines += [ "SK_SKQP_ENABLE_DRIVER_CORRECTNESS_WORKAROUNDS" ]
+ }
sources = [
"dm/DMFontMgr.cpp",
"dm/DMGpuTestProcs.cpp",
diff --git a/tools/skqp/gm_runner.cpp b/tools/skqp/gm_runner.cpp
index 437e3c10af..ce0586d490 100644
--- a/tools/skqp/gm_runner.cpp
+++ b/tools/skqp/gm_runner.cpp
@@ -141,7 +141,9 @@ static GrContextOptions context_options(skiagm::GM* gm = nullptr) {
GrContextOptions grContextOptions;
grContextOptions.fAllowPathMaskCaching = true;
grContextOptions.fSuppressPathRendering = true;
+ #ifndef SK_SKQP_ENABLE_DRIVER_CORRECTNESS_WORKAROUNDS
grContextOptions.fDisableDriverCorrectnessWorkarounds = true;
+ #endif
if (gm) {
gm->modifyGrContextOptions(&grContextOptions);
}