mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[cogl-texture] Don't take ownership of the data in cogl_texture_new_from_bitmap
When creating a Cogl texture from a Cogl bitmap it would steal the data by setting the bitmap_owner flag and clearing the data pointer from the bitmap. The data would be freed by the time the new_from_bitmap is finished. There is no reason to do this because the data will be freed when the Cogl bitmap is unref'd and it is confusing not to be able to reuse the bitmap for creating multiple textures.
This commit is contained in:
parent
d960ce46e5
commit
f4a431a947
@ -1345,8 +1345,7 @@ cogl_texture_new_from_bitmap (CoglHandle bmp_handle,
|
||||
tex->auto_mipmap = ((flags & COGL_TEXTURE_AUTO_MIPMAP) != 0);
|
||||
|
||||
tex->bitmap = *bmp;
|
||||
tex->bitmap_owner = TRUE;
|
||||
bmp->data = NULL;
|
||||
tex->bitmap_owner = FALSE;
|
||||
|
||||
tex->slice_x_spans = NULL;
|
||||
tex->slice_y_spans = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user