diff --git a/pixman/ChangeLog b/pixman/ChangeLog index 2785c1cab..f4e65fac3 100644 --- a/pixman/ChangeLog +++ b/pixman/ChangeLog @@ -1,3 +1,8 @@ +2005-03-11 Owen Taylor + + * src/icformat.c (pixman_format_init): Set format->depth + correctly instead of just using the bpp. + 2005-03-07 Carl Worth * configure.in: Increment version to 0.1.4-head post-snapshot. diff --git a/pixman/src/icformat.c b/pixman/src/icformat.c index 1aafaf202..8e93ca0b4 100644 --- a/pixman/src/icformat.c +++ b/pixman/src/icformat.c @@ -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);