mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05: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
6414adbfeb
commit
9d82995773
@ -1197,6 +1197,8 @@ _cogl_texture_bitmap_prepare (CoglTexture *tex,
|
||||
if ((tex->bitmap.format & COGL_A_BIT) &&
|
||||
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
||||
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
||||
else
|
||||
internal_format = tex->bitmap.format;
|
||||
}
|
||||
|
||||
/* Find closest format accepted by GL */
|
||||
|
@ -1273,6 +1273,8 @@ _cogl_texture_bitmap_prepare (CoglTexture *tex,
|
||||
if ((tex->bitmap.format & COGL_A_BIT) &&
|
||||
tex->bitmap.format != COGL_PIXEL_FORMAT_A_8)
|
||||
internal_format = tex->bitmap.format | COGL_PREMULT_BIT;
|
||||
else
|
||||
internal_format = tex->bitmap.format;
|
||||
}
|
||||
|
||||
/* Find closest format accepted by GL */
|
||||
|
Loading…
Reference in New Issue
Block a user