compositor: set the opaque region for some views with transform

If the transform on a view is only a translation we can trivially
set the opaque region for it so to optimize the rendering.
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
dev
Giulio Camuffo 8 years ago committed by Quentin Glidic
parent 3578497990
commit 148c1992ac
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 9
      libweston/compositor.c

@ -1192,6 +1192,15 @@ weston_view_update_transform_enable(struct weston_view *view)
return -1;
}
if (view->alpha == 1.0 &&
matrix->type == WESTON_MATRIX_TRANSFORM_TRANSLATE) {
pixman_region32_copy(&view->transform.opaque,
&view->surface->opaque);
pixman_region32_translate(&view->transform.opaque,
matrix->d[12],
matrix->d[13]);
}
pixman_region32_init_rect(&surfregion, 0, 0,
view->surface->width, view->surface->height);
if (view->geometry.scissor_enabled)

Loading…
Cancel
Save