From 4689b543a2174fa12b4b884458fefa98dd89a573 Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Wed, 31 Jan 2018 11:54:14 -0500 Subject: [PATCH] SkQP: skia_skqp_enable_driver_correctness_workarounds Change-Id: If61341423ff03efa48814a393f16eaaee02cecbd Reviewed-on: https://skia-review.googlesource.com/102183 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- BUILD.gn | 6 ++++++ tools/skqp/gm_runner.cpp | 2 ++ 2 files changed, 8 insertions(+) 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); }