Re: [spice-common PATCH 2/7 v2] pixman_utils: Changed color order ifdefs to macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 02, 2015 at 04:01:39PM +0200, Lukas Venhoda wrote:
> ---
> Last ifdef was left as is, as I don't know what it could break.

I think the log would be clearer with something like:

"pixman_utils: Use PIXMAN_LE_ constants in spice_bitmap_try_as_pixman()

After the previous commit, spice_bitmap_try_as_pixman() can be
simplified as its #ifdef WORDS_BIGENDIAN exactly match what the
PIXMAN_LE_ constants do.

Last ifdef was left as is, as I don't know what it could break."

> 
> Changes since v1:
>  - New commit
> ---
>  common/pixman_utils.c | 18 +++---------------
>  1 file changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/common/pixman_utils.c b/common/pixman_utils.c
> index 27ab155..c2161ca 100644
> --- a/common/pixman_utils.c
> +++ b/common/pixman_utils.c
> @@ -1003,25 +1003,13 @@ pixman_image_t *spice_bitmap_try_as_pixman(int src_format,
> 
>      switch (src_format) {
>      case SPICE_BITMAP_FMT_32BIT:
> -#ifdef WORDS_BIGENDIAN
> -        pixman_format = PIXMAN_b8g8r8x8;
> -#else
> -        pixman_format = PIXMAN_x8r8g8b8;
> -#endif
> +        pixman_format = PIXMAN_LE_x8r8g8b8;
>          break;
>      case SPICE_BITMAP_FMT_RGBA:
> -#ifdef WORDS_BIGENDIAN
> -        pixman_format = PIXMAN_b8g8r8a8;
> -#else
> -        pixman_format = PIXMAN_a8r8g8b8;
> -#endif
> +        pixman_format = PIXMAN_LE_a8r8g8b8;
>          break;
>      case SPICE_BITMAP_FMT_24BIT:
> -#ifdef WORDS_BIGENDIAN
> -        pixman_format = PIXMAN_b8g8r8;
> -#else
> -        pixman_format = PIXMAN_r8g8b8;
> -#endif
> +        pixman_format = PIXMAN_LE_r8g8b8;
>          break;
>      case SPICE_BITMAP_FMT_16BIT:
>  #ifdef WORDS_BIGENDIAN
> --
> 2.4.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgpJTvy2TANPJ.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]