forked from joejulian/gio
gpu,op/clip: [compute] get rid of stroke vs fill flags
The fill mode is now controlled by a SetFillMode command, not by flags on each path segment and fill command. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -39,22 +39,21 @@ void main() {
|
||||
|
||||
uint tag = Annotated_Nop;
|
||||
if (element_ix < conf.n_elements) {
|
||||
tag = Annotated_tag(conf.anno_alloc, ref);
|
||||
tag = Annotated_tag(conf.anno_alloc, ref).tag;
|
||||
}
|
||||
int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
|
||||
switch (tag) {
|
||||
case Annotated_Fill:
|
||||
case Annotated_FillImage:
|
||||
case Annotated_Stroke:
|
||||
case Annotated_Color:
|
||||
case Annotated_Image:
|
||||
case Annotated_BeginClip:
|
||||
case Annotated_EndClip:
|
||||
// Note: we take advantage of the fact that fills, strokes, and
|
||||
// clips have compatible layout.
|
||||
AnnoFill fill = Annotated_Fill_read(conf.anno_alloc, ref);
|
||||
x0 = int(floor(fill.bbox.x * SX));
|
||||
y0 = int(floor(fill.bbox.y * SY));
|
||||
x1 = int(ceil(fill.bbox.z * SX));
|
||||
y1 = int(ceil(fill.bbox.w * SY));
|
||||
AnnoEndClip clip = Annotated_EndClip_read(conf.anno_alloc, ref);
|
||||
x0 = int(floor(clip.bbox.x * SX));
|
||||
y0 = int(floor(clip.bbox.y * SY));
|
||||
x1 = int(ceil(clip.bbox.z * SX));
|
||||
y1 = int(ceil(clip.bbox.w * SY));
|
||||
break;
|
||||
}
|
||||
x0 = clamp(x0, 0, int(conf.width_in_tiles));
|
||||
|
||||
Reference in New Issue
Block a user