Add a item about reworking cairo_format_t.

This commit is contained in:
Owen Taylor 2005-04-28 13:41:00 +00:00
parent 2dd5f40bc0
commit 388a8d491d
3 changed files with 42 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2005-04-28 Owen Taylor <otaylor@redhat.com>
* TODO, ROADMAP: Add a item about reworking cairo_format_t.
2005-04-28 Carl Worth <cworth@cworth.org>
* test/.cvsignore:

View file

@ -64,6 +64,12 @@ API Issues (more detail in TODO file)
based on it
Status: cworth has sent API proposal to list
A8. cairo_format_t:
Difficulty: moderate. It's just going through and examining
each use of cairo_format_t, but there are a lot
of them.
Status: not started, there is a rough plan in TODO
Performance work
----------------
✓P1. Make pixel-aligned rectangle compositing fast

32
TODO
View file

@ -47,6 +47,38 @@ Backwards incompatible
((src Op dest) In clip) Add (dest Out clip)
* Split cairo_format_t into two things:
- An enumeration that determines the "capabilities" of a surface -
A vs. ARGB. vs. RGB
- An enumeration that determines a specific in-memory representation
of data. (A1/A8/ARGB32/etc.. Could be extensible to things like
RGBA32_BYTES_NONPREMULTIPLIED. Some consistent naming convention would
be be good.)
One issue here is that some interfaces, like cairo_surface_create_similar()
might be useful with either one. We might want to create an A1 surface
compatible with the backend (are there examples other than A1? Should
bilevel just be another "capability"?), or we might want to just create
an alpha surface without caring about the depth.
If we want to support this, we could do something like:
typedef enum cairo_pixel_format_t {
CAIRO_PIXEL_FORMAT_A8 = CAIRO_FORMAT_ALPHA,
CAIRO_PIXEL_FORMAT_RGB24 = CAIRO_FORMAT_RGB,
CAIRO_PIXEL_FORMAT_A1,
};
To allow passing either in.
(I don't particularly like this idea for create_similar() because then you
aren't really saying ALPHA-dont-care, you are saying ALPHA-8. I think it
would be better to have a separate path for create_similar_with_pixel_format()
if we need that. But it might be useful for cairo_image_surface_create() ...
people are going to screw up and pass CAIRO_FORMAT_RGB into that, and if it
"just worked" that would save people trouble....)
* Clean up the API in preparation for freezing and release.
* Make a more interesting PS backend, (other than the current