From: Kristian Høgsberg Date: Fri, 17 Jan 2014 22:22:41 +0000 (-0800) Subject: compositor-drm: Make composite bypass work on secondary outputs X-Git-Tag: upstream/0.1.8~501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1be87e3c8155204852509f47f8e239b479da6feb;p=profile%2Fivi%2Fweston-ivi-shell.git compositor-drm: Make composite bypass work on secondary outputs The opaque region is in surface coordinates, which we compare to the output region, which is in compositor coordinates. For non-primary outputs, that means that the output region is not located at 0,0 but something like 1920,0 instead. That means that the output region isn't contained in the surface opaque region and then we decide we can't scan out from it. Instead, compare the surface opaque region to the output region translated to 0,0. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7348i5 --- diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 136d517..454c393 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -431,9 +431,10 @@ drm_output_check_scanout_format(struct drm_output *output, /* We can scanout an ARGB buffer if the surface's * opaque region covers the whole output, but we have * to use XRGB as the KMS format code. */ - pixman_region32_init(&r); - pixman_region32_subtract(&r, &output->base.region, - &es->opaque); + pixman_region32_init_rect(&r, 0, 0, + output->base.width, + output->base.height); + pixman_region32_subtract(&r, &r, &es->opaque); if (!pixman_region32_not_empty(&r)) format = GBM_FORMAT_XRGB8888;