SkQP: relax six tests

In response to last minute request from vendor.

Change-Id: I304fe2015481433b3558ec77d31123cc382a8dc8
Reviewed-on: https://skia-review.googlesource.com/146647
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
diff --git a/tools/skqp/gm_knowledge.cpp b/tools/skqp/gm_knowledge.cpp
index 9441dad..ccfcd9d 100644
--- a/tools/skqp/gm_knowledge.cpp
+++ b/tools/skqp/gm_knowledge.cpp
@@ -45,6 +45,29 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
+// TODO(halcanary) SkQP version 2 (for Q-release) should have a much cleaner mechanism.
+static bool good_enough(const char* name, int64_t badnessMetric) {
+    static const struct {
+        const char* name;
+        int64_t tolerance;
+    } allowedBadnesses[] = {
+        // These values are rounded up from failing tests reported by vendor.
+        // The failures were perceptually good.
+        { "circular_arcs_stroke_and_fill_round", 110   },
+        { "circular_arcs_weird",                 12000 },
+        { "drawTextRSXform",                     1000  },
+        { "patheffect",                          260   },
+        { "strokes_poly",                        1100  },
+        { "stroketext",                          700   },
+    };
+    for (auto allowedBadness : allowedBadnesses) {
+        if (0 == strcmp(allowedBadness.name, name)) {
+            return badnessMetric < allowedBadness.tolerance;
+        }
+    }
+    return badnessMetric < SK_SKQP_BADNESS_TOLERANCE;
+}
+
 static int get_error(uint32_t value, uint32_t value_max, uint32_t value_min) {
     int error = 0;
     for (int j : {0, 8, 16, 24}) {
@@ -236,7 +259,7 @@
         }
     }
     int64_t badnessMetric = badness * badPixelCount;
-    if (badnessMetric < SK_SKQP_BADNESS_TOLERANCE) {
+    if (good_enough(name, badnessMetric)) {
         std::lock_guard<std::mutex> lock(gMutex);
         gErrors.push_back(Run{SkString(backend), SkString(name), 0, 0});
         if (error_out) {