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>
This commit is contained in:
parent
3578497990
commit
148c1992ac
@ -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…
x
Reference in New Issue
Block a user