cogl_rectangle: avoid redundant copy of geometry
authorRobert Bragg <robert@linux.intel.com>
Thu, 11 Feb 2010 15:33:01 +0000 (15:33 +0000)
committerRobert Bragg <robert@linux.intel.com>
Fri, 12 Feb 2010 14:05:02 +0000 (14:05 +0000)
commit18305cbd98e02ab139beef769cbc90a2121bd1f5
tree03ada1f211269733c318297399969dd8aaebffc3
parent5f18fc928d85499d6ee2ac433dde247286e2de4e
cogl_rectangle: avoid redundant copy of geometry

All the cogl_rectangle* APIs normalize their input into into an array of
_CoglMutiTexturedRect rectangles and pass these on to our work horse;
_cogl_rectangles_with_multitexture_coords. The definition of
_CoglMutiTexturedRect had 4 separate float members, x_1, y_1, x_2 and
y_2 which meant for some common cases we were having to copy out from an
array into these members. We are now able to simply point into the users
array avoiding a copy which seems desirable when submiting lots of
rectangles.
clutter/cogl/cogl/cogl-journal-private.h
clutter/cogl/cogl/cogl-journal.c
clutter/cogl/cogl/cogl-primitives.c