mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 09:08:16 +02:00
Set format->depth correctly instead of just using the bpp.
This commit is contained in:
parent
1f5394ffe9
commit
db616356c1
2 changed files with 10 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-03-11 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/icformat.c (pixman_format_init): Set format->depth
|
||||
correctly instead of just using the bpp.
|
||||
|
||||
2005-03-07 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* configure.in: Increment version to 0.1.4-head post-snapshot.
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ pixman_format_init (pixman_format_t *format, int format_code)
|
|||
format->id = FakeClientID (0);
|
||||
*/
|
||||
format->format_code = format_code;
|
||||
format->depth = PICT_FORMAT_BPP(format_code);
|
||||
|
||||
switch (PICT_FORMAT_TYPE(format_code)) {
|
||||
case PICT_TYPE_ARGB:
|
||||
|
|
@ -148,6 +147,11 @@ pixman_format_init (pixman_format_t *format, int format_code)
|
|||
/* remaining fields already set to zero */
|
||||
break;
|
||||
}
|
||||
|
||||
format->depth = _IcOnes ((format->alphaMask << format->alpha) |
|
||||
(format->redMask << format->red) |
|
||||
(format->blueMask << format->blue) |
|
||||
(format->greenMask << format->green));
|
||||
}
|
||||
slim_hidden_def(pixman_format_init);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue