actor: Add TransformInfo
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 9 Dec 2011 14:38:25 +0000 (14:38 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 16 Jan 2012 23:35:17 +0000 (23:35 +0000)
commit9eed2f58a635bebf9066f188498e095599d0d76d
tree680c916e169b866f57e91c803a67a1a066e43b86
parent193af778663104bca0802821d5033f230eab91c0
actor: Add TransformInfo

ClutterTransformInfo is a (private) ancillary data structure that
contains all the decomposed transformation data, i.e. rotation angles
and centers, scale factors and centers, and anchor point. This data
structure is stored in the GData of the actor instance instead of the
actor's private data. This change gives us:

  • a smaller, cleaner private data structure;
  • no size penalty for untransformed actors;
  • static constant storage for the defaults, shared across all
    instances;
  • cache locality for all the decomposed transformation data,
    given that the structure size is smaller.

At the end of the day, the only authoritative piece of information for
actor transformation is the CoglMatrix that we initialize in
apply_transform() from all the decomposed parameters, and that can stay
inside the private data structure of ClutterActor.
clutter/clutter-actor-private.h
clutter/clutter-actor.c