Stop rounding rounded rects in layout space
Categories
(Core :: Graphics: WebRender, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: aosmond, Assigned: aosmond)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We round rounded rect's in layout space, which we shouldn't do:
We also snap the bounds and clip for text primitives during scene building. This doesn't make much sense, because it doesn't affect the glyph positions, and these clips are mostly informative (e.g. the text definitely fits in this rect) rather than prescriptive (e.g. please draw the text here). The individual glyph points are what are important, and those are currently unaffected by snapping. To be consistently, we should just not snap text primitives so that it can accurately predict whether or not a primitive is visible.
Assignee | ||
Comment 1•5 years ago
|
||
Initial try with doing the above: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d56540c40a48100a3f8ec6a12928646a507824c7
Assignee | ||
Comment 2•5 years ago
|
||
This is failing one reftest severely, an entire pixel jump, when I would not have expected it. It appears that rounding out instead of snapping fixes these:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=85d62cb4f10c541080273913f89470c2cae29838
Which makes sense, in the vein of the local rect and clip rect of a text run should be conservative.... However, the glyph offset in an absolute sense has not changed with these patches, only the relative position has. In the shader we have:
https://searchfox.org/mozilla-central/source/gfx/wr/webrender/res/ps_text_run.glsl#111-112
https://searchfox.org/mozilla-central/source/gfx/wr/webrender/res/ps_text_run.glsl#128
Which snap the relative position in the text run. This will result in completely different results depending on how the primitive is snapped. This may account for the difference seen (unconfirmed).
Assignee | ||
Comment 3•5 years ago
|
||
Let's repurpose this just for tracking the rounded rect issue given wr-snapperific landed and ran into its own issues with not snapping the primitives.
Assignee | ||
Comment 4•5 years ago
|
||
We already snap the complex clip rects during scene building, taking
into account any necessary transforms and device pixel scaling. Just
like normal clips, we shouldn't round in layout space.
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/08eb2c23eefa Stop rounding complex clip rects in layout space. r=jrmuizel
Comment 6•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•