[PATCH weston 1/2] compositor: set the opaque region for some views with transform
Quentin Glidic
sardemff7+wayland at sardemff7.net
Sat Sep 24 09:45:53 UTC 2016
On 06/09/2016 06:03, Jonas Ådahl wrote:
> On Sun, Sep 04, 2016 at 06:50:46PM +0300, Giulio Camuffo wrote:
>> If the transform on a view is only a translation we can trivially
>> set the opaque region for it so to optimize the rendering.
>
> Makes sense.
>
> Reviewed-by: Jonas Ådahl <jadahl at gmail.com>
Thanks, pushed:
3578497..148c199 master -> master
Cheers,
>> ---
>> libweston/compositor.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/libweston/compositor.c b/libweston/compositor.c
>> index 47907bb..8c3872d 100644
>> --- a/libweston/compositor.c
>> +++ b/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)
>> --
>> 2.9.3
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list