border-image-repeat: Round is equivalent to Repeat with the pattern size adjusted to fill the area with a whole number of repetitions. This is done by adjusting the segment's stretch_size in the shader so that it fits a whole number of times in the segment's size.
Details
Details
- Reviewers
jrmuizel kvark - Commits
- rMOZILLACENTRAL6b61867f80b1: Bug 1606771 - Implement border-image-repeat: round in WebRender. r=jrmuizel…
- Bugzilla Bug ID
- 1606771
Diff Detail
Diff Detail
- Repository
- rMOZILLACENTRAL mozilla-central
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
| gfx/wr/webrender/res/brush.glsl | ||
|---|---|---|
| 115–117 | do I understand correctly that each axis is basically: enum Repeat {
No,
Yes,
YesRounded,
} | |
| gfx/wr/webrender/res/brush_image.glsl | ||
| 129 | if the stretch size is bigger than the segment rect, the desired behavior is stretching the image to the available size, as opposed to culling it? | |
| gfx/wr/webrender/src/border.rs | ||
| 1354–1356 | now that we allow uv1 == uv0, we need to double-check if the shader isn't going to go crazy with some division by zero | |
| gfx/wr/webrender/res/brush.glsl | ||
|---|---|---|
| 115–117 | Yes for now, and there will be also YesSpaced in the future. | |
| gfx/wr/webrender/res/brush_image.glsl | ||
| 129 | That is my understanding. | |
| gfx/wr/webrender/src/border.rs | ||
| 1354–1356 | As far as I understand, div by zero in a vertex shader effectively discards the triangle which wouldn't be a bad outcome if the uv rect is empty. | |