зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241918 - remove workarounds for zero-length dash intervals in HelpersSkia.h, r=jrmuizel
This commit is contained in:
Родитель
393a50d4dc
Коммит
51ee06a33d
|
@ -164,17 +164,6 @@ StrokeOptionsToPaint(SkPaint& aPaint, const StrokeOptions &aOptions)
|
|||
|
||||
for (uint32_t i = 0; i < dashCount; i++) {
|
||||
pattern[i] = SkFloatToScalar(aOptions.mDashPattern[i % aOptions.mDashLength]);
|
||||
// bugs 1002466 & 1214309 - Dash intervals that are (close to) zero
|
||||
// are skipped, ignoring other stroke settings. Nudge the dash interval
|
||||
// to be just large enough that it is not interpreted as degenerate.
|
||||
// Ideally this value would just be SK_ScalarNearlyZero, the smallest
|
||||
// reasonable value that is not zero. But error in FP operations may
|
||||
// cause dash intervals to result in a value less than this and still
|
||||
// be skipped. To give some headroom to allow the value to still come
|
||||
// out greater-than-but-still-close-to SK_ScalarNearlyZero, fudge it
|
||||
// upward by *33/32.
|
||||
if (pattern[i] == 0)
|
||||
pattern[i] = SkScalarMulDiv(SK_ScalarNearlyZero, 33, 32);
|
||||
}
|
||||
|
||||
SkDashPathEffect* dash = SkDashPathEffect::Create(&pattern.front(),
|
||||
|
|
Загрузка…
Ссылка в новой задаче