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:
Emmanuele Bassi 2008-08-27 12:56:54 +00:00
parent c34e17163d
commit 0515ee22c2
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,13 @@
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.
2008-08-27 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1099 - No ClutterScript API to get a list of IDs in a given file

View File

@ -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