Neil Roberts 889dcee384 cogl-material: Fix the count of the number of layers
Previously the counter for the number of layers was only updated
whenever the texture handle for a layer changes. However there are
many other ways for a new layer to be created for example by setting a
layer combine constant. Also by default the texture on a layer is
COGL_INVALID_HANDLE so if the application tries to create an explicit
layer with no texture by calling cogl_material_set_layer with
COGL_INVALID_HANDLE then it also wouldn't update the count.

This patch fixes that by incrementing the count in
cogl_material_get_layer instead. This function is called by all
functions that may end up creating a layer so it seems like the most
appropriate place.

http://bugzilla.openedhand.com/show_bug.cgi?id=2132
2010-05-24 16:10:56 +01:00
..
2010-03-01 12:56:10 +00:00
2010-03-01 12:56:10 +00:00
2009-01-20 18:47:50 +00:00
2010-04-22 16:39:18 +01:00
2010-03-03 10:47:42 +00:00
2010-03-02 11:12:32 +00:00
2010-03-02 11:12:32 +00:00
2009-10-14 11:31:26 +01:00
2009-07-10 11:38:42 +01:00
2010-02-04 21:10:02 +00:00
2010-03-02 11:12:32 +00:00
2010-02-03 14:38:13 +00:00
2010-02-01 10:40:34 +00:00
2010-03-02 11:12:32 +00:00
2010-05-24 10:42:03 +01:00