pixman-utils.c, pixman-private.h: Add floating point conversion routines
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 18 Aug 2012 17:02:31 +0000 (13:02 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 1 Oct 2012 16:56:09 +0000 (12:56 -0400)
commit23252393a2dcae4dc5a7d03727dd66cdd81286ba
tree4e3a89e65c0677c3d6127038657ff8ace059a028
parent4760599ff3008ab0f1e36a7d4d362362817fd930
pixman-utils.c, pixman-private.h: Add floating point conversion routines

A new struct argb_t containing a floating point pixel is added to
pixman-private.h and conversion routines are added to pixman-utils.c
to convert normalized integers to and from that struct.

New functions:

  - pixman_expand_to_float()
    Expands a buffer of integer pixels to a buffer of argb_t pixels

  - pixman_contract_from_float()
    Converts a buffer of argb_t pixels to a buffer integer pixels

  - pixman_float_to_unorm()
    Converts a floating point number to an unsigned normalized integer

  - pixman_unorm_to_float()
    Converts an unsigned normalized integer to a floating point number
pixman/pixman-private.h
pixman/pixman-utils.c