mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 02:28:08 +02:00
vulkan-renderer: Check pnode valid transform
Instead of a bespoke check for axis aligned boxes, use the pnode valid transform flag. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
ebb3c7c7a5
commit
387bf0af69
1 changed files with 4 additions and 5 deletions
|
|
@ -1554,9 +1554,10 @@ vulkan_pipeline_config_init_for_paint_node(struct vulkan_pipeline_config *pconf,
|
|||
|
||||
static void
|
||||
rect_to_quad(pixman_box32_t *rect,
|
||||
struct weston_view *ev,
|
||||
struct weston_paint_node *pnode,
|
||||
struct clipper_quad *quad)
|
||||
{
|
||||
struct weston_view *ev = pnode->view;
|
||||
struct weston_coord_global rect_g[4] = {
|
||||
{ .c = weston_coord(rect->x1, rect->y1) },
|
||||
{ .c = weston_coord(rect->x2, rect->y1) },
|
||||
|
|
@ -1572,8 +1573,7 @@ rect_to_quad(pixman_box32_t *rect,
|
|||
quad->polygon[i].y = (float)rect_s.y;
|
||||
}
|
||||
|
||||
quad->axis_aligned = !ev->transform.enabled ||
|
||||
(ev->transform.matrix.type < WESTON_MATRIX_TRANSFORM_ROTATE);
|
||||
quad->axis_aligned = pnode->valid_transform;
|
||||
|
||||
// TODO handle !axis_aligned ?
|
||||
assert(quad->axis_aligned);
|
||||
|
|
@ -1586,7 +1586,6 @@ generate_fans(struct weston_paint_node *pnode,
|
|||
struct wl_array *vertices,
|
||||
struct wl_array *vtxcnt)
|
||||
{
|
||||
struct weston_view *ev = pnode->view;
|
||||
struct clipper_vertex *v;
|
||||
uint32_t *cnt;
|
||||
uint32_t nvtx = 0;
|
||||
|
|
@ -1605,7 +1604,7 @@ generate_fans(struct weston_paint_node *pnode,
|
|||
cnt = wl_array_add(vtxcnt, nrects * nsurf * sizeof(uint32_t));
|
||||
|
||||
for (int i = 0; i < nrects; i++) {
|
||||
rect_to_quad(&rects[i], ev, &quad);
|
||||
rect_to_quad(&rects[i], pnode, &quad);
|
||||
for (int j = 0; j < nsurf; j++) {
|
||||
uint32_t n;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue