Open Bug 1609893 Opened 5 years ago Updated 1 year ago

Move the computation of image/border repetition off the shader

Categories

(Core :: Graphics: WebRender, task, P3)

task

Tracking

()

People

(Reporter: nical, Unassigned)

References

(Blocks 3 open bugs)

Details

There is a lot of branchy code in the brush_image vertex shader to compute the repetition behavior. Unfortunately the spec requires even more conditionals to deal with specific cases of border images. At this point it would be simpler and probably faster to compute the stretch size on the CPU, probably during scene building.

This would mean that we either have to emit separate primitivies for the middle area and borders of a nine-patch, or allow passing more data to brush segments (separate stretch_size per segment). If we do the former, we have to be careful about whether it affects batching.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.