mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-05 12:30:47 +02:00
drm: Fix hang on zoom
Transforming the scanout damage by the zoom will result in rectangles outside of the display, and some with negative co-ordinates. This makes at least some drivers unhappy (tested on vmware), and the page flip fails, and weston hangs indefinitely. Clip the damage to the output so we don't fall down. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
6338dbd581
commit
db7e85d5f8
1 changed files with 7 additions and 0 deletions
|
|
@ -415,9 +415,16 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
|
|||
pixman_region32_copy(&scanout_damage, damage);
|
||||
|
||||
if (output->base.zoom.active) {
|
||||
pixman_region32_t clip;
|
||||
|
||||
weston_matrix_transform_region(&scanout_damage,
|
||||
&output->base.matrix,
|
||||
&scanout_damage);
|
||||
pixman_region32_init_rect(&clip, 0, 0,
|
||||
output->base.width,
|
||||
output->base.height);
|
||||
pixman_region32_intersect(&scanout_damage, &scanout_damage, &clip);
|
||||
pixman_region32_fini(&clip);
|
||||
} else {
|
||||
pixman_region32_translate(&scanout_damage,
|
||||
-output->base.x, -output->base.y);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue