mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
[cogl-texture] use the right format when downloading sliced textures from GL
_cogl_texture_download_from_gl needs to create transient CoglBitmaps when downloading sliced textures from GL, and then copies these as subregions into the final target_bitmap. _cogl_texture_download_from_gl also supports target_bitmaps with a different format to the source CoglTexture being downloaded. The problem was that in the case of slice textures we were always looking at the format of the CoglTexture, not of the target_bitmap when setting up the transient slice bitmap.
This commit is contained in:
parent
606fb8f56f
commit
f5a8e693c8
@ -397,7 +397,7 @@ _cogl_texture_download_from_gl (CoglTexture *tex,
|
||||
if (y_span->waste != 0 || x_span->waste != 0)
|
||||
{
|
||||
/* Setup temp bitmap for slice subregion */
|
||||
slice_bmp.format = tex->bitmap.format;
|
||||
slice_bmp.format = target_bmp->format;
|
||||
slice_bmp.width = x_span->size;
|
||||
slice_bmp.height = y_span->size;
|
||||
slice_bmp.rowstride = bpp * slice_bmp.width;
|
||||
|
Loading…
Reference in New Issue
Block a user