[cairo] Deprecating CAIRO_FORMAT_RGB16_565 and adding
behdad at behdad.org
Sun Sep 10 15:48:45 PDT 2006
Thanks Carl for doing this. As mentioned on the thread already, we need
to think about what we're going to do next time a new format is added.
Do we want to skip the value for CAIRO_FORMAT_RGB16_565? In that case a
comment in the enum may help.
I also suggest moving the deprecations at the end of cairo.h in
On Sat, 2006-09-09 at 18:41 -0400, Carl Worth wrote:
> We've got our first chance to officially deprecate part of cairo's
> interface. As of cairo 1.2.0 we added a new image format:
> But we made the mistake of not implementing it fully, (compiling
> current cairo with gcc will point to the switch statements that don't
> handle it). Fortunately, we also failed to ever allow anyone to use
> cairo_image_surface_create with this format.
> Meanwhile, the reason we added this format was to allow image
> fallbacks to work properly when the xlib backend was used with an X
> server with an RGB16 565 visual. And as it turns out, the code paths
> involved in that don't ever need to export the new image format.
> So, I'd like to remove this value from the cairo_format_t enum. If,
> later on, someone really wants to draw to an RGB16 565 image surface,
> then we can resurrect this value, (along with a complete
> In order not to introduce any API break, (for example, cairo binding
> code might be using "CAIRO_FORMAT_RGB16_565" in spite of the fact that
> no application can successfully use it now), we still need to have a
> value defined for this token. So I'd like to have a new file,
> cairo-deprecated.h that provides a #define for CAIRO_FORMAT_RGB16_565.
> This new cairo-deprecated.h file will be installed and cairo.h will
> include it.
> The patch below implements this (also available in the
> rgb16-deprecated branch of my personal tree). Please provide any
> feedback you might have.
> cairo mailing list
> cairo at cairographics.org
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
More information about the cairo