[PATCH 1/2] matrix: track transform type

Pekka Paalanen ppaalanen at gmail.com
Tue Jan 29 02:55:05 PST 2013

On Mon, 28 Jan 2013 16:21:11 -0500
Kristian Høgsberg <hoegsberg at gmail.com> wrote:

> On Mon, Jan 28, 2013 at 10:40:28PM +0300, Vasily Khoruzhick wrote:
> > Introduce several matrix transform types and track type for matrix.
> > Could be usefull for activating some fastpath that depends on some
> > transform type.
> Look good, both committed.  We could simplify the logic in
> weston_surface_update_transform() a bit now, by just always
> multiplying the transformation_list matrices and then setting enabled
> if surface->tranform.matrix.type > TRANSLATE.  And of course

Not precicely, if you refer to weston_surface::transform.enabled. That
flag means that you can use weston_surface::geometry.{x,y} directly. It
is not the same as the total transformation being a translation. Menus
are a good example when they are not equivalent: there is an additional
translation from the parent's transformation. So, we may need to fix
some uses of geometry.{x,y} to make it work.

We could also get rid of the transform.enabled flag altogether, I
think, and just check the total matrix type. It's simpler and more

> weston_matrix_invert() could use the matrix.type now to fast-path
> translation matrices, and then we could just move that call to the
> generic weston_surface_update_transform() as well.


More information about the wayland-devel mailing list