mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
Remove bbox guard
It's probably not necessary. This development still work in progress.
This commit is contained in:
parent
7f4a6523a8
commit
e1aa9b2f5d
|
@ -413,22 +413,18 @@ void main() {
|
||||||
// should probably be stored in the annotated element.
|
// should probably be stored in the annotated element.
|
||||||
uint path_ix = element_ix;
|
uint path_ix = element_ix;
|
||||||
Path path = Path_read(PathRef(path_ix * Path_size));
|
Path path = Path_read(PathRef(path_ix * Path_size));
|
||||||
// It may be we have a strong guarantee this will always be `true`, but
|
uint stride = path.bbox.z - path.bbox.x;
|
||||||
// I prefer not to take chances.
|
uint tile_subix = (tile_y - path.bbox.y) * stride + tile_x - path.bbox.x;
|
||||||
if (tile_x >= path.bbox.x && tile_x < path.bbox.z && tile_y >= path.bbox.y && tile_y < path.bbox.w) {
|
Tile tile = Tile_read(Tile_index(path.tiles, tile_subix));
|
||||||
uint stride = path.bbox.z - path.bbox.x;
|
if (tile.tile.offset != 0) {
|
||||||
uint tile_subix = (tile_y - path.bbox.y) * stride + tile_x - path.bbox.x;
|
AnnoStroke stroke = Annotated_Stroke_read(ref);
|
||||||
Tile tile = Tile_read(Tile_index(path.tiles, tile_subix));
|
CmdStroke cmd_stroke;
|
||||||
if (tile.tile.offset != 0) {
|
cmd_stroke.tile_ref = tile.tile.offset;
|
||||||
AnnoStroke stroke = Annotated_Stroke_read(ref);
|
cmd_stroke.half_width = 0.5 * stroke.linewidth;
|
||||||
CmdStroke cmd_stroke;
|
cmd_stroke.rgba_color = stroke.rgba_color;
|
||||||
cmd_stroke.tile_ref = tile.tile.offset;
|
alloc_cmd(cmd_ref, cmd_limit);
|
||||||
cmd_stroke.half_width = 0.5 * stroke.linewidth;
|
Cmd_Stroke_write(cmd_ref, cmd_stroke);
|
||||||
cmd_stroke.rgba_color = stroke.rgba_color;
|
cmd_ref.offset += Cmd_size;
|
||||||
alloc_cmd(cmd_ref, cmd_limit);
|
|
||||||
Cmd_Stroke_write(cmd_ref, cmd_stroke);
|
|
||||||
cmd_ref.offset += Cmd_size;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue