Closed Bug 1278972 Opened 8 years ago Closed 8 years ago

layout/reftests/svg/as-image/* failing with skia content on windows

Categories

(Core :: Graphics, defect)

x86
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: mchang, Assigned: mchang)

References

Details

(Whiteboard: gfx-noted)

Attachments

(2 files)

Attached file Slimmed down testcase
Many of these reftests are failing on windows try with skia content. By manual inspection, they are also failing on OS X and Linux but aren't failing on try. After some investigation, they aren't failing on try since the pass/fail is resolution dependent. 

The attached slimmed down test case shows the problem. A yellow rect should be filled, but instead we just get a black box. With jwatt and Dholbert's help, we narrowed it down to the stroke being too thick and this was caused by the "shape-rendering=crispEdges" attribute, which disables AA.
Blocks: skia-windows
Whiteboard: gfx-noted
Attached patch Fix typoSplinter Review
This was happening because at [1], Skia checks if the stroke size is greater than the rectangle size, and if so just fill the rect instead of stroking the rect. However, there was a typo that was checking the height against the width of the stroke instead of against the height, causing these test cases to fail. I'll file an upstream bug report on r+.

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/skia/skia/src/core/SkScan_Hairline.cpp?from=SkScan_Hairline.cpp#631
Attachment #8761310 - Flags: review?(lsalzman)
Attachment #8761310 - Flags: review?(lsalzman) → review+
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/85291bc2cc11
Properly compare rect height vs stroke height when filling rect with skia without AA. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/85291bc2cc11
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: