[cairo] Bringing back the dead... RGB16_565

Carl Worth cworth at cworth.org
Tue Jun 16 09:02:03 PDT 2009

On Tue, 2009-05-05 at 14:54 +0300, Oleg Romashin wrote:
> Here is the patch for cairo and mozilla gfx wrapper with normal
> support for 16bpp cairo image surface:
> https://bugzilla.mozilla.org/show_bug.cgi?id=491357
> Works pretty good, and tested with mozilla.

Hi Oleg,

This patch is a beginning, and as can be seen there's not a lot that
needs to happen here in order to enable a 565 format, (never mind some
more complicated schemes being proposed to support arbitrary

One problem with this patch is the CAIRO_CONTENT_COLOR16 value. That's
really not acceptable and should be removed. If removing that introduces
some undesired behavior, then there's a bug elsewhere that will need to
be fixed.

In addition, however, here is the rationale that led us to removing this
support in the first place:

	Meanwhile, Behdad has been doing some work to enable more compiler
	warnings and chasing down the bugs that are exposed by them. One
	interesting case is that adding -Wswitch-enum shows that the support
	for RGB16_565 was incomplete. For example, cairo_surface_write_to_png
	cannot work with a 16-bit format image, and there is missing support
	in some xlib backend paths with unknown consequences

When I removed the support for CAIRO_FORMAT_RGB16_565 I did expect
someone to just fix those few bugs and then we could re-add it. But I
don't think that's happened yet. So what needs to be done is that
someone just needs to fix and test the various code paths where there is
currently missing support for this image format. It really shouldn't be
too much work.


[*] And the more complicated schemes might still make sense for
supporting floating-point formats, various HDR things, YUV?, etc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.cairographics.org/archives/cairo/attachments/20090616/80bd322e/attachment.pgp 

More information about the cairo mailing list