diff options
author | Mike Reed <reed@google.com> | 2018-05-18 14:07:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-18 20:14:54 +0000 |
commit | 861b52ea98d703786ce485389db07e58759c1792 (patch) | |
tree | 30b6dad226adb3a1fa56bdef1286386df1d88140 /src/core/SkScan_Path.cpp | |
parent | ee84fe1e6484d8fb7b9b1549d9d68c9dbabe3737 (diff) |
tweak conservative bounds value to save aberrant cubic
Bug: 844457
Change-Id: Ia3c7c0592df59022cf04f6747b1fe30975431ea4
Reviewed-on: https://skia-review.googlesource.com/129200
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkScan_Path.cpp')
-rw-r--r-- | src/core/SkScan_Path.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/SkScan_Path.cpp b/src/core/SkScan_Path.cpp index 2373e62d46..1854a7edd7 100644 --- a/src/core/SkScan_Path.cpp +++ b/src/core/SkScan_Path.cpp @@ -564,7 +564,10 @@ static bool clip_to_limit(const SkRegion& orig, SkRegion* reduced) { // Bias used for conservative rounding of float rects to int rects, to nudge the irects a little // larger, so we don't "think" a path's bounds are inside a clip, when (due to numeric drift in // the scan-converter) we might walk beyond the predicted limits. -static const double kConservativeRoundBias = 0.5 + 0.5 / SK_FDot6One; +// +// This value has been determined trial and error: pick the smallest value (after the 0.5) that +// fixes any problematic cases (e.g. crbug.com/844457) +static const double kConservativeRoundBias = 0.5 + 1.0 / SK_FDot6One; /** * Round the value down. This is used to round the top and left of a rectangle, |