fc457af0fd5c415f8e57076cdd2fabcc73244974
[profile/ivi/pixman.git] / TODO
1   - Add a general way of dealing with architecture specific
2     fast-paths.  The current idea is to have each operation that can
3     be optimized is called through a function pointer that is
4     initially set to an initialization function that is responsible for
5     setting the function pointer to the appropriate fast-path.
6
7   - Get rid of the switch-of-doom; replace it with a big table
8     describing the various fast paths.
9
10   - Go through things marked FIXME
11
12   - Add calls to prepare and finish access where necessary.  grep for
13     ACCESS_MEM, and make sure they are correctly wrapped in prepare
14     and finish.
15
16   - restore READ/WRITE in the fbcompose combiners since they sometimes
17     store directly to destination drawables.
18
19   - It probably makes sense to move the more strange X region API
20     into pixman as well, but guarded with PIXMAN_XORG_COMPATIBILITY
21
22   - Reinstate the FbBits typedef? At the moment we don't
23     even have the FbBits type; we just use uint32_t everywhere.
24
25     Keith says in bug 2335:
26
27         The 64-bit code in fb (pixman) is probably broken; it hasn't been
28         used in quite some time as PCI (and AGP) is 32-bits wide, so
29         doing things 64-bits at a time is a net loss.  To quickly fix
30         this, I suggest just using 32-bit datatypes by setting
31         IC_SHIFT to 5 for all machines.
32
33   - Consider whether calling regions region16 is really such a great
34     idea Vlad wants 32 bit regions for Cairo. This will break X server
35     ABI, but should otherwise be mostly harmless, though a
36     pixman_region_get_boxes16() may be useful.
37
38   - Consider optimizing the 8/16 bit solid fills in pixman-util.c by
39     storing more than one value at a time.
40
41   - Add an image cache to prevent excessive malloc/free. Note that pixman
42     needs to be thread safe when used from cairo.
43
44   - Review the pixman_format_code_t enum to make sure it will support
45     future formats. Some formats we will probably need:
46
47            ARGB/ABGR with 16/32/64 bit integer/floating channels
48            YUV2,
49            YV12
50
51     Also we may need the ability to distinguish between PICT_c8 and
52     PICT_x4c4. (This could be done by interpreting the A channel as
53     the depth for TYPE_COLOR and TYPE_GRAY formats).
54
55     A possibility may be to reserve the two top bits and make them
56     encode "number of places to shift the channel widths given" Since
57     these bits are 00 at the moment everything will continue to work,
58     but these additional widths will be allowed:
59
60              All even widths between 18-32
61              All multiples of four widths between 33 and 64
62              All multiples of eight between 64 and 128
63
64     This means things like r21g22b21 won't work - is that worth
65     worrying about? I don't think so. And of course the bpp field
66     can't handle a depth of over 256, so > 64 bit channels arent'
67     really all that useful.
68
69     We could reserve one extra bit to indicate floating point, but
70     we may also just add 
71
72            PIXMAN_TYPE_ARGB_FLOAT
73            PIXMAN_TYPE_BGRA_FLOAT
74            PIXMAN_TYPE_A_FLOAT
75     
76     image types. With five bits we can support up to 32 different
77     format types, which should be enough for everybody, even if we
78     decide to support all the various video formats here:
79
80                 http://www.fourcc.org/yuv.php
81
82     It may make sense to have a PIXMAN_TYPE_YUV, and then use the
83     channel bits to specify the exact subtype.
84
85     Another possibility is to add 
86
87           PIXMAN_TYPE_ARGB_W
88           PIXMAN_TYPE_ARGB_WW
89     
90     where the channel widths would get 16 and 32 added to them,
91     respectively.
92
93     What about color spaces such a linear vs. srGB etc.?
94
95 done:
96
97 - Make source clipping optional.
98     - done: source clipping happens through an indirection.
99         still needs to make the indirection settable. (And call it
100         from X)
101
102 - Run cairo test suite; fix bugs
103         - one bug in source-scale-clip
104
105  - Remove the warning suppression in the ACCESS_MEM macro and fix the
106     warnings that are real
107         - irrelevant now.
108
109 - make the wrapper functions global instead of image specific
110         - this won't work since pixman is linked to both fb and wfb
111
112 - Add non-mmx solid fill
113
114 - Make sure the endian-ness macros are defined correctly.
115
116 - The rectangles in a region probably shouldn't be returned const as
117   the X server will be changing them.
118
119 - Right now we _always_ have a clip region, which is empty by default.
120   Why does this work at all? It probably doesn't. The server
121   distinguishes two cases, one where nothing is clipped (CT_NONE), and
122   one where there is a clip region (CT_REGION).
123
124 - Default clip region should be the full image
125
126   - Test if pseudo color still works. It does, but it also shows that
127     copying a pixman_indexed_t on every composite operation is not
128     going to fly. So, for now set_indexed() does not copy the 
129     indexed table. 
130
131     Also just the malloc() to allocate a pixman image shows up pretty
132     high.
133
134     Options include
135
136       - Make all the setters not copy their arguments
137
138       - Possibly combined with going back to the stack allocated 
139         approach that we already use for regions.
140
141       - Keep a cached pixman_image_t around for every picture. It would
142         have to be kept uptodate every time something changes about the
143         picture.
144
145       - Break the X server ABI and simply have the relevant parameter
146         stored in the pixman image. This would have the additional benefits
147         that:
148
149           - We can get rid of the annoying repeat field which is duplicated
150             elsewhere.
151
152           - We can use pixman_color_t and pixman_gradient_stop_t
153             etc. instead of the types that are defined in
154             renderproto.h
155