clutter-cairo-texture: Fix destroying the old texture

In clutter_cairo_texture_create_region it tries to destroy the old
texture before mapping the PBO by setting the texture on the first
layer of the material to COGL_INVALID_HANDLE. However it was using the
material API incorrectly so it ended up showing a warning and doing
nothing.
This commit is contained in:
Neil Roberts 2010-05-07 18:03:39 +01:00
parent 6228082e14
commit 493041c505

View File

@ -526,11 +526,7 @@ clutter_cairo_texture_create_region (ClutterCairoTexture *self,
/* Destroy the existing texture so that the GL driver won't have to /* Destroy the existing texture so that the GL driver won't have to
copy it when we map the PBO */ copy it when we map the PBO */
if ((material = clutter_texture_get_cogl_material (CLUTTER_TEXTURE (self)))) if ((material = clutter_texture_get_cogl_material (CLUTTER_TEXTURE (self))))
{ cogl_material_set_layer (material, 0, COGL_INVALID_HANDLE);
const GList *layers = cogl_material_get_layers (material);
if (layers)
cogl_material_set_layer (layers->data, 0, COGL_INVALID_HANDLE);
}
/* Create a surface to render directly to the PBO */ /* Create a surface to render directly to the PBO */
surface = surface =