Closed Bug 1888400 Opened 8 months ago Closed 8 months ago

Fix quad nine-patch with non-solid-color patterns

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
127 Branch
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.

And hoist the create_task condition out. This makes it easier to see what's going on.

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.

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.

Flags: needinfo?(nical.bugzilla)
Flags: needinfo?(nical.bugzilla)
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Regressions: 1889600
Regressions: 1889680
Regressions: 1889690
Regressions: 1889694
Regressions: 1889705
Regressions: 1889712
Regressions: 1889844

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)

Status: RESOLVED → REOPENED
Flags: needinfo?(nical.bugzilla)
Resolution: FIXED → ---
Target Milestone: 126 Branch → ---

(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.

See Also: → 1889964
See Also: → 1890082
No longer regressions: 1889844

    Worth notice:
    https://bugzilla.mozilla.org/show_bug.cgi?id=1890082#c3
    (regression details)

Regressions: 1890082
See Also: → 1890233
Status: REOPENED → RESOLVED
Closed: 8 months ago8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
No longer regressions: 1889712
Flags: needinfo?(nical.bugzilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: