Fix quad nine-patch with non-solid-color patterns
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
The quad nine-patch is hard-coded to emit color/image quads for all segments, I missed that in my initial attempt to support more patterns and weit appears we don't have a test case that covers this (for gradients).
It works only for color primitives since images and solid colors are handled by the same shader, so the broken code paths haven't landed yet.
Instead, the nine-patch path should produce image quads for the masked segments and render the source pattern directly for other segments.
Assignee | ||
Comment 1•8 months ago
|
||
And hoist the create_task condition out. This makes it easier to see what's going on.
Assignee | ||
Comment 2•8 months ago
|
||
The loop was submitting a single command in the command buffer, always using the textured quad shader which worked when the interior is a solid color but not for other patterns.
This patch goes over the nine-patch segments twice, first generating a segmented primitive for the interrior with the appropriate pattern shader, and then the corners with the textured shader.
The patch tries to stay in the spirit of the existing code. I'm not super fond of the result. If the pattern isn't opaque the nine-patch will batch poorly since the both the interrior and corner parts are batched using the same rect. Also I suspect we'll find that we need more flexibility if/when we implement borders using quads. By then we'll probably have a clearer idea of the best way to handle segments in general.
Assignee | ||
Comment 3•8 months ago
|
||
Comment 5•8 months ago
•
|
||
Backed out for causing reftest failures on radial-size-1a.html.
LATER EDIT: some Wrench build bustages appeared later. So far, they only happened on Android 11.0 Samsung A51 Arm7 opt and debug.
Assignee | ||
Updated•8 months ago
|
Comment 7•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3f6f515b10c4
https://hg.mozilla.org/mozilla-central/rev/3fc7d72e1ea3
https://hg.mozilla.org/mozilla-central/rev/9f62b9886f80
Comment 8•8 months ago
|
||
It may be worthwhile to test all the regressions from bug 1823579 (Many of the bugs i have filed are either from those bugs, or show similar symptoms)
Comment 9•8 months ago
|
||
Backed out 6 changesets (bug 1889600, bug 1885571, bug 1888400, bug 1887837) for causing multiple regressions.
Comment 10•8 months ago
|
||
(In reply to Mayank Bansal from comment #8)
It may be worthwhile to test all the regressions from bug 1823579 (Many of the bugs i have filed are either from those bugs, or show similar symptoms)
For when this bug is being landed : Please test bug 1827648 as I could repro that.
Comment 11•8 months ago
|
||
Worth notice:
https://bugzilla.mozilla.org/show_bug.cgi?id=1890082#c3
(regression details)
Comment 12•8 months ago
|
||
Comment 13•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b777570e29b8
https://hg.mozilla.org/mozilla-central/rev/c130f76ff541
https://hg.mozilla.org/mozilla-central/rev/f7d50e650bf1
Assignee | ||
Updated•7 months ago
|
Description
•