[rectangle] Avoid modifying materials mid scene
authorRobert Bragg <robert@linux.intel.com>
Fri, 5 Jun 2009 12:03:14 +0000 (13:03 +0100)
committerRobert Bragg <robert@linux.intel.com>
Tue, 30 Jun 2009 16:13:35 +0000 (17:13 +0100)
commit938452f1b1109e7c8daff8f49c4f0a45a13be25f
tree33e6a2fe13b1d438ca9ced7c253be7c66ce59e63
parentdc1ca79398e343d06918cf1c38b72771f476f0a6
[rectangle] Avoid modifying materials mid scene

To improve batching of geometry in the Cogl journal we need to avoid modifying
materials midscene.

Currently cogl_set_source_color and cogl_set_source_texture simply modify a
single shared material. In the future we can improve this so they use a pool
of materials that gets recycled as the journal is flushed, but for now we
give all ClutterRectangles their own private materials for painting with.
clutter/clutter-rectangle.c