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:
parent
6228082e14
commit
493041c505
@ -526,11 +526,7 @@ clutter_cairo_texture_create_region (ClutterCairoTexture *self,
|
||||
/* Destroy the existing texture so that the GL driver won't have to
|
||||
copy it when we map the PBO */
|
||||
if ((material = clutter_texture_get_cogl_material (CLUTTER_TEXTURE (self))))
|
||||
{
|
||||
const GList *layers = cogl_material_get_layers (material);
|
||||
if (layers)
|
||||
cogl_material_set_layer (layers->data, 0, COGL_INVALID_HANDLE);
|
||||
}
|
||||
cogl_material_set_layer (material, 0, COGL_INVALID_HANDLE);
|
||||
|
||||
/* Create a surface to render directly to the PBO */
|
||||
surface =
|
||||
|
Loading…
Reference in New Issue
Block a user