mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
* clutter/cogl/common/cogl-bitmap-pixbuf.c:
(_cogl_bitmap_from_file): allocate height×rowstride and not duplicate gdkpixbuf's strange optimization saving some bytes at the end of the pixbuf.
This commit is contained in:
parent
3d034ff6aa
commit
7804ce7d1a
@ -1,3 +1,10 @@
|
||||
2008-06-06 Øyvind Kolås <pippin@o-hand.com>
|
||||
|
||||
* clutter/cogl/common/cogl-bitmap-pixbuf.c:
|
||||
(_cogl_bitmap_from_file): allocate height×rowstride and not duplicate
|
||||
gdkpixbuf's strange optimization saving some bytes at the end of the
|
||||
pixbuf.
|
||||
|
||||
2008-06-05 Tommi Komulainen <tommi.komulainen@iki.fi>
|
||||
|
||||
Bug 913 - cogl fails to build on OSX
|
||||
|
@ -134,7 +134,7 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
|
||||
/* FIXME: Any way to destroy pixbuf but retain pixel data? */
|
||||
|
||||
pixels = gdk_pixbuf_get_pixels (pixbuf);
|
||||
out_data = (guchar*) g_malloc ((height - 1) * rowstride + last_row_size);
|
||||
out_data = (guchar*) g_malloc (height * rowstride);
|
||||
out = out_data;
|
||||
|
||||
/* Copy up to last row */
|
||||
@ -152,7 +152,10 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
/* Store bitmap info */
|
||||
bmp->data = out_data;
|
||||
bmp->data = out_data; /* The stored data the same alignment constraints as a
|
||||
* gdkpixbuf but stores a full rowstride in the last
|
||||
* scanline
|
||||
*/
|
||||
bmp->format = pixel_format;
|
||||
bmp->width = width;
|
||||
bmp->height = height;
|
||||
|
Loading…
Reference in New Issue
Block a user