mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 03:48:02 +02:00
compositor: Update transforms before opacity checks
It makes more sense to update the transform than to bail. These functions are sort of hints - they have to be correct when true, so the previous code isn't really buggy. But they make more sense at a glance this way. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
d67f204388
commit
bec568f002
1 changed files with 4 additions and 6 deletions
|
|
@ -2317,15 +2317,14 @@ weston_view_is_opaque(struct weston_view *ev, pixman_region32_t *region)
|
|||
pixman_region32_t r;
|
||||
bool ret = false;
|
||||
|
||||
weston_view_update_transform(ev);
|
||||
|
||||
if (ev->alpha < 1.0)
|
||||
return false;
|
||||
|
||||
if (ev->surface->is_opaque)
|
||||
return true;
|
||||
|
||||
if (ev->transform.dirty)
|
||||
return false;
|
||||
|
||||
pixman_region32_init(&r);
|
||||
pixman_region32_subtract(&r, region, &ev->transform.opaque);
|
||||
|
||||
|
|
@ -2340,15 +2339,14 @@ weston_view_is_opaque(struct weston_view *ev, pixman_region32_t *region)
|
|||
static bool
|
||||
weston_view_is_fully_blended(struct weston_view *ev, pixman_region32_t *region)
|
||||
{
|
||||
weston_view_update_transform(ev);
|
||||
|
||||
if (ev->alpha < 1.0)
|
||||
return true;
|
||||
|
||||
if (ev->surface->is_opaque)
|
||||
return false;
|
||||
|
||||
if (ev->transform.dirty)
|
||||
return false;
|
||||
|
||||
return !pixman_region32_not_empty(&ev->transform.opaque);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue