aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-01-31 11:54:14 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-31 17:18:25 +0000
commit4689b543a2174fa12b4b884458fefa98dd89a573 (patch)
treefd823c50934637deb7eeeb02078147500e5ea50c
parentf3d0f8df2a50c9dc2e2e6760aff82562220c9ff8 (diff)
SkQP: skia_skqp_enable_driver_correctness_workarounds
Change-Id: If61341423ff03efa48814a393f16eaaee02cecbd Reviewed-on: https://skia-review.googlesource.com/102183 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
-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);
}