cogl_texture_get_data() copies using wrong width size.
For sliced 2D textures, _cogl_texture_2d_sliced_get_data() uses the bitmap width, instead of the rowstride, when memcpy()ing into the dest buffer. Signed-off-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
parent
e562ac20df
commit
67812d6649
@ -1710,7 +1710,7 @@ _cogl_texture_2d_sliced_get_data (CoglTexture *tex,
|
|||||||
{
|
{
|
||||||
src = new_bmp.data + y * new_bmp.rowstride;
|
src = new_bmp.data + y * new_bmp.rowstride;
|
||||||
dst = data + y * rowstride;
|
dst = data + y * rowstride;
|
||||||
memcpy (dst, src, new_bmp.width);
|
memcpy (dst, src, new_bmp.rowstride);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free converted data */
|
/* Free converted data */
|
||||||
|
Loading…
Reference in New Issue
Block a user