Bug 1241918 - remove workarounds for zero-length dash intervals in HelpersSkia.h, r=jrmuizel

This commit is contained in:
Lee Salzman 2016-01-22 11:12:52 -05:00
Родитель 393a50d4dc
Коммит 51ee06a33d
1 изменённых файлов: 0 добавлений и 11 удалений

Просмотреть файл

@ -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(),