mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
[_cogl_texture_bitmap_prepare] use bitmap format for FORMAT_ANY + no alpha
My patch to choose a premultiplied format when the user gives COGL_PIXEL_FORMAT_ANY for the internal_format broke the case where the data in question doesn't have and alpha channel. This was accidentally missed when merging the premultiplication branch since I merged a local version of the branch that missed this commit.
This commit is contained in:
parent
14cef57480
commit
101b88192d
@ -1197,6 +1197,8 @@ _cogl_texture_bitmap_prepare (CoglTexture *tex,
|
|||||||
if ((tex->bitmap.format & COGL_A_BIT) &&
|
if ((tex->bitmap.format & COGL_A_BIT) &&
|
||||||
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
||||||
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
||||||
|
else
|
||||||
|
internal_format = tex->bitmap.format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find closest format accepted by GL */
|
/* Find closest format accepted by GL */
|
||||||
|
@ -1273,6 +1273,8 @@ _cogl_texture_bitmap_prepare (CoglTexture *tex,
|
|||||||
if ((tex->bitmap.format & COGL_A_BIT) &&
|
if ((tex->bitmap.format & COGL_A_BIT) &&
|
||||||
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
||||||
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
||||||
|
else
|
||||||
|
internal_format = tex->bitmap.format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find closest format accepted by GL */
|
/* Find closest format accepted by GL */
|
||||||
|
Loading…
Reference in New Issue
Block a user