mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -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
c34e17163d
commit
0515ee22c2
10
ChangeLog
10
ChangeLog
@ -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
|
||||
|
@ -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