mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
2008-08-27 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1082 - Texture bitmap is destroyed in wrong way * clutter/cogl/common/cogl-bitmap-pixbuf.c: (_cogl_bitmap_from_file): Make a copy of the pixbuf data in the internal image loader so that we can keep working under the assumption that we are using the GLib memory allocation and deallocation functions.
This commit is contained in:
parent
ef76d8e5e2
commit
6d07be1179
@ -297,12 +297,14 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
|
||||
if (pixels == NULL) return FALSE;
|
||||
|
||||
/* Store bitmap info */
|
||||
bmp->data = pixels;
|
||||
bmp->data = g_memdup (pixels, height * width * 4);
|
||||
bmp->format = COGL_PIXEL_FORMAT_RGBA_8888;
|
||||
bmp->width = width;
|
||||
bmp->height = height;
|
||||
bmp->rowstride = width * 4;
|
||||
|
||||
free (pixels);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user