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 <jad...@gmail.com> > --- > 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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel