Closed Bug 1214309 Opened 6 years ago Closed 6 years ago

layout/reftests/css-visited/column-rule-1.html fails using Skia as content backend on x86

Categories

(Core :: Graphics, defect)

x86
Unspecified
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file, 1 obsolete file)

Due to differences in the interpretation of zero-length line dash intervals with Skia, we added a workaround in bug 1002466 that nudged these to be nearly-but-not-zero.

Due to precision differences between how x86 and x64 code is compiled, math inside Skia that works with SK_ScalarNearlyZero, the result will still sometimes come out as less than that. This can result in dash intervals being considered degenerate and skipped.

This causes us to fail on layout/reftests/css-visited/column-rule-1.html, but only on x86. It was probably missed since it is not reproducible on x64.
The previous nudging of zero values to SK_ScalarNearlyZero wasn't good enough due to different math precision on x86. This nudges the value up some more so that after some additions and subtractions are done using the value, the result can still come out reasonably close to SK_ScalarNearlyZero, but with enough headroom to ensure it doesn't go below it.
Attachment #8673231 - Flags: review?(jmuizelaar)
Status: NEW → ASSIGNED
Comment on attachment 8673231 [details] [diff] [review]
nudge zero dash intervals to be non-zero under Skia

Review of attachment 8673231 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/2d/HelpersSkia.h
@@ +149,2 @@
>        if (!pattern[i])
> +          pattern[i] = SkScalarMulDiv(SK_ScalarNearlyZero, 33, 32);

Can you elaborate this comment a little bit explaining why you're not using NearlyZero and where 33 and 32 came from.
While you're here, I'd prefer if (pattern[i] == 0). I thinking treating floats as bools is weird.
Attachment #8673231 - Flags: review?(jmuizelaar) → review+
As requested by Jeff, expanded comment about where the new fudge value came from and change the comparison to use == 0 instead of !.
Attachment #8673231 - Attachment is obsolete: true
Attachment #8673254 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/46f4d2ac1228
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.