Open Bug 1678515 Opened 4 years ago Updated 2 years ago

snapping + resolution leads to weird results with webrender

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

People

(Reporter: tnikkel, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch circtest (obsolete) (deleted) — Splinter Review

In writing a test for bug 1662062 I came across some weird behaviour.

The attached patch has a reftest that uses reftest-resolution to add a resolution to the test, and then the reference just draws the test bigger "manually". This matches without wr. With wr the test circle is drawn bigger than the reference.

If I change this line to ScaleToNearestPixels instead of OutsidePixels

https://searchfox.org/mozilla-central/rev/1d34bd022de0b55c81d9db6026f69bda1d4a86d2/gfx/layers/wr/WebRenderCommandBuilder.cpp#1435

then the circle draws at the right size but it is slightly offset. If I change that line to InsidePixels (and create the necessary InsidePixels function) then the circle draws too small.

Another wierdness is that the issue doesn't happen on the built in retina screen on my macbook pro. It does happen if I manually drag the reftest window to my external non-retina display.

If I change the test from a svg circle to an svg polygon then it magically works (which is the test I landed).

Not surprisingly, this doesn't affect regular html content (we have a test for that: layout/reftests/reftest-sanity/reftest-resolution.html).

Attached patch circtest (deleted) — Splinter Review
Attachment #9189062 - Attachment is obsolete: true
Attachment #9189272 - Attachment is patch: true
Attachment #9189272 - Attachment mime type: application/octet-stream → text/plain

:aosmond, can you comment to the bug?

Flags: needinfo?(aosmond)
Severity: -- → S3

Bug 1678867 is another case of a weird svg circle rendering with webrender, in that case no resolution is required to see the problem.

Blocks: wr-snap
Flags: needinfo?(aosmond)
Blocks: 1782834
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: