From 8dca5c73bcdf949d6e11d4adfd5dc93feca71b8e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 28 Jan 2009 11:56:12 +0000 Subject: [PATCH] Reuse the layers list Instead of getting the layers list twice from the Material, we can reuse the list when we need to retrieve the first layer. --- gl/cogl-texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl/cogl-texture.c b/gl/cogl-texture.c index 90680bb3f..4aa2cb3c6 100644 --- a/gl/cogl-texture.c +++ b/gl/cogl-texture.c @@ -2668,7 +2668,7 @@ _cogl_rectangles_with_multitexture_coords ( CoglHandle first_layer, tex_handle; CoglTexture *texture; - first_layer = cogl_material_get_layers (material)->data; + first_layer = layers->data; tex_handle = cogl_material_layer_get_texture (first_layer); texture = _cogl_texture_pointer_from_handle (tex_handle); _cogl_texture_sliced_quad (texture, @@ -2687,7 +2687,7 @@ _cogl_rectangles_with_multitexture_coords ( void cogl_rectangles_with_texture_coords (const float *verts, - guint n_rects) + guint n_rects) { struct _CoglMutiTexturedRect rects[n_rects]; int i;