compositor-drm: Determine opaqueness of a surface correctly

We subtract the screen space opaque region from the transformed surface
region.  That's going to fail for when we're scaling up a surface, since
the surface bounding box for the scaled up surface is going to be bigger
than the opaque region.  Instead, subtract the surface-space opaque region
from a 0,0 - width,height region and see if that's empty.
Kristian Høgsberg 12 years ago
parent 82cb505287
commit 63093a35ea
  1. 7
      src/compositor-drm.c

@ -672,9 +672,10 @@ drm_output_check_sprite_format(struct drm_sprite *s,
if (format == GBM_FORMAT_ARGB8888) { if (format == GBM_FORMAT_ARGB8888) {
pixman_region32_t r; pixman_region32_t r;
pixman_region32_init(&r); pixman_region32_init_rect(&r, 0, 0,
pixman_region32_subtract(&r, &es->transform.boundingbox, es->geometry.width,
&es->transform.opaque); es->geometry.height);
pixman_region32_subtract(&r, &r, &es->opaque);
if (!pixman_region32_not_empty(&r)) if (!pixman_region32_not_empty(&r))
format = GBM_FORMAT_XRGB8888; format = GBM_FORMAT_XRGB8888;

Loading…
Cancel
Save