/src/cairo/subprojects/pixman-0.44.2/pixman/pixman-edge.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright © 2004 Keith Packard |
3 | | * |
4 | | * Permission to use, copy, modify, distribute, and sell this software and its |
5 | | * documentation for any purpose is hereby granted without fee, provided that |
6 | | * the above copyright notice appear in all copies and that both that |
7 | | * copyright notice and this permission notice appear in supporting |
8 | | * documentation, and that the name of Keith Packard not be used in |
9 | | * advertising or publicity pertaining to distribution of the software without |
10 | | * specific, written prior permission. Keith Packard makes no |
11 | | * representations about the suitability of this software for any purpose. It |
12 | | * is provided "as is" without express or implied warranty. |
13 | | * |
14 | | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, |
15 | | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO |
16 | | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
17 | | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
18 | | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
19 | | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
20 | | * PERFORMANCE OF THIS SOFTWARE. |
21 | | */ |
22 | | |
23 | | #ifdef HAVE_CONFIG_H |
24 | | #include <pixman-config.h> |
25 | | #endif |
26 | | |
27 | | #include <string.h> |
28 | | |
29 | | #include "pixman-private.h" |
30 | | #include "pixman-accessor.h" |
31 | | |
32 | | /* |
33 | | * Step across a small sample grid gap |
34 | | */ |
35 | | #define RENDER_EDGE_STEP_SMALL(edge) \ |
36 | 900 | { \ |
37 | 900 | edge->x += edge->stepx_small; \ |
38 | 900 | edge->e += edge->dx_small; \ |
39 | 900 | if (edge->e > 0) \ |
40 | 900 | { \ |
41 | 515 | edge->e -= edge->dy; \ |
42 | 515 | edge->x += edge->signdx; \ |
43 | 515 | } \ |
44 | 900 | } |
45 | | |
46 | | /* |
47 | | * Step across a large sample grid gap |
48 | | */ |
49 | | #define RENDER_EDGE_STEP_BIG(edge) \ |
50 | 66 | { \ |
51 | 66 | edge->x += edge->stepx_big; \ |
52 | 66 | edge->e += edge->dx_big; \ |
53 | 66 | if (edge->e > 0) \ |
54 | 66 | { \ |
55 | 24 | edge->e -= edge->dy; \ |
56 | 24 | edge->x += edge->signdx; \ |
57 | 24 | } \ |
58 | 66 | } |
59 | | |
60 | | #ifdef PIXMAN_FB_ACCESSORS |
61 | | #define PIXMAN_RASTERIZE_EDGES pixman_rasterize_edges_accessors |
62 | | #else |
63 | | #define PIXMAN_RASTERIZE_EDGES pixman_rasterize_edges_no_accessors |
64 | | #endif |
65 | | |
66 | | /* |
67 | | * 4 bit alpha |
68 | | */ |
69 | | |
70 | | #define N_BITS 4 |
71 | | #define RASTERIZE_EDGES rasterize_edges_4 |
72 | | |
73 | | #ifndef WORDS_BIGENDIAN |
74 | 0 | #define SHIFT_4(o) ((o) << 2) |
75 | | #else |
76 | | #define SHIFT_4(o) ((1 - (o)) << 2) |
77 | | #endif |
78 | | |
79 | 0 | #define GET_4(x, o) (((x) >> SHIFT_4 (o)) & 0xf) |
80 | | #define PUT_4(x, o, v) \ |
81 | | (((x) & ~(0xf << SHIFT_4 (o))) | (((v) & 0xf) << SHIFT_4 (o))) |
82 | | |
83 | | #define DEFINE_ALPHA(line, x) \ |
84 | 0 | uint8_t *__ap = (uint8_t *) line + ((x) >> 1); \ |
85 | 0 | int __ao = (x) & 1 |
86 | | |
87 | 0 | #define STEP_ALPHA ((__ap += __ao), (__ao ^= 1)) |
88 | | |
89 | | #define ADD_ALPHA(a) \ |
90 | 0 | { \ |
91 | 0 | uint8_t __o = READ (image, __ap); \ |
92 | 0 | uint8_t __a = (a) + GET_4 (__o, __ao); \ |
93 | 0 | WRITE (image, __ap, PUT_4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \ |
94 | 0 | } |
95 | | |
96 | | #include "pixman-edge-imp.h" |
97 | | |
98 | | #undef ADD_ALPHA |
99 | | #undef STEP_ALPHA |
100 | | #undef DEFINE_ALPHA |
101 | | #undef RASTERIZE_EDGES |
102 | | #undef N_BITS |
103 | | |
104 | | |
105 | | /* |
106 | | * 1 bit alpha |
107 | | */ |
108 | | |
109 | | #define N_BITS 1 |
110 | | #define RASTERIZE_EDGES rasterize_edges_1 |
111 | | |
112 | | #include "pixman-edge-imp.h" |
113 | | |
114 | | #undef RASTERIZE_EDGES |
115 | | #undef N_BITS |
116 | | |
117 | | /* |
118 | | * 8 bit alpha |
119 | | */ |
120 | | |
121 | | static force_inline uint8_t |
122 | | clip255 (int x) |
123 | 1.47k | { |
124 | 1.47k | if (x > 255) |
125 | 0 | return 255; |
126 | | |
127 | 1.47k | return x; |
128 | 1.47k | } Line | Count | Source | 123 | 1.47k | { | 124 | 1.47k | if (x > 255) | 125 | 0 | return 255; | 126 | | | 127 | 1.47k | return x; | 128 | 1.47k | } |
Unexecuted instantiation: pixman-edge-accessors.c:clip255 |
129 | | |
130 | | #define ADD_SATURATE_8(buf, val, length) \ |
131 | 256 | do \ |
132 | 256 | { \ |
133 | 256 | int i__ = (length); \ |
134 | 256 | uint8_t *buf__ = (buf); \ |
135 | 512 | int val__ = (val); \ |
136 | 256 | \ |
137 | 762 | while (i__--) \ |
138 | 506 | { \ |
139 | 506 | WRITE (image, (buf__), clip255 (READ (image, (buf__)) + (val__))); \ |
140 | 506 | (buf__)++; \ |
141 | 506 | } \ |
142 | 256 | } while (0) |
143 | | |
144 | | /* |
145 | | * We want to detect the case where we add the same value to a long |
146 | | * span of pixels. The triangles on the end are filled in while we |
147 | | * count how many sub-pixel scanlines contribute to the middle section. |
148 | | * |
149 | | * +--------------------------+ |
150 | | * fill_height =| \ / |
151 | | * +------------------+ |
152 | | * |================| |
153 | | * fill_start fill_end |
154 | | */ |
155 | | static void |
156 | | rasterize_edges_8 (pixman_image_t *image, |
157 | | pixman_edge_t * l, |
158 | | pixman_edge_t * r, |
159 | | pixman_fixed_t t, |
160 | | pixman_fixed_t b) |
161 | 6 | { |
162 | 6 | pixman_fixed_t y = t; |
163 | 6 | uint32_t *line; |
164 | 6 | int fill_start = -1, fill_end = -1; |
165 | 6 | int fill_size = 0; |
166 | 6 | uint32_t *buf = (image)->bits.bits; |
167 | 6 | int stride = (image)->bits.rowstride; |
168 | 6 | int width = (image)->bits.width; |
169 | | |
170 | 6 | line = buf + pixman_fixed_to_int (y) * stride; |
171 | | |
172 | 6 | for (;;) |
173 | 489 | { |
174 | 489 | uint8_t *ap = (uint8_t *) line; |
175 | 489 | pixman_fixed_t lx, rx; |
176 | 489 | int lxi, rxi; |
177 | | |
178 | | /* clip X */ |
179 | 489 | lx = l->x; |
180 | 489 | if (lx < 0) |
181 | 0 | lx = 0; |
182 | | |
183 | 489 | rx = r->x; |
184 | | |
185 | 489 | if (pixman_fixed_to_int (rx) >= width) |
186 | 0 | { |
187 | | /* Use the last pixel of the scanline, covered 100%. |
188 | | * We can't use the first pixel following the scanline, |
189 | | * because accessing it could result in a buffer overrun. |
190 | | */ |
191 | 0 | rx = pixman_int_to_fixed (width) - 1; |
192 | 0 | } |
193 | | |
194 | | /* Skip empty (or backwards) sections */ |
195 | 489 | if (rx > lx) |
196 | 489 | { |
197 | 489 | int lxs, rxs; |
198 | | |
199 | | /* Find pixel bounds for span. */ |
200 | 489 | lxi = pixman_fixed_to_int (lx); |
201 | 489 | rxi = pixman_fixed_to_int (rx); |
202 | | |
203 | | /* Sample coverage for edge pixels */ |
204 | 489 | lxs = RENDER_SAMPLES_X (lx, 8); |
205 | 489 | rxs = RENDER_SAMPLES_X (rx, 8); |
206 | | |
207 | | /* Add coverage across row */ |
208 | 489 | if (lxi == rxi) |
209 | 10 | { |
210 | 10 | WRITE (image, ap + lxi, |
211 | 10 | clip255 (READ (image, ap + lxi) + rxs - lxs)); |
212 | 10 | } |
213 | 479 | else |
214 | 479 | { |
215 | 479 | WRITE (image, ap + lxi, |
216 | 479 | clip255 (READ (image, ap + lxi) + N_X_FRAC (8) - lxs)); |
217 | | |
218 | | /* Move forward so that lxi/rxi is the pixel span */ |
219 | 479 | lxi++; |
220 | | |
221 | | /* Don't bother trying to optimize the fill unless |
222 | | * the span is longer than 4 pixels. */ |
223 | 479 | if (rxi - lxi > 4) |
224 | 416 | { |
225 | 416 | if (fill_start < 0) |
226 | 34 | { |
227 | 34 | fill_start = lxi; |
228 | 34 | fill_end = rxi; |
229 | 34 | fill_size++; |
230 | 34 | } |
231 | 382 | else |
232 | 382 | { |
233 | 382 | if (lxi >= fill_end || rxi < fill_start) |
234 | 0 | { |
235 | | /* We're beyond what we saved, just fill it */ |
236 | 0 | ADD_SATURATE_8 (ap + fill_start, |
237 | 0 | fill_size * N_X_FRAC (8), |
238 | 0 | fill_end - fill_start); |
239 | 0 | fill_start = lxi; |
240 | 0 | fill_end = rxi; |
241 | 0 | fill_size = 1; |
242 | 0 | } |
243 | 382 | else |
244 | 382 | { |
245 | | /* Update fill_start */ |
246 | 382 | if (lxi > fill_start) |
247 | 25 | { |
248 | 25 | ADD_SATURATE_8 (ap + fill_start, |
249 | 25 | fill_size * N_X_FRAC (8), |
250 | 25 | lxi - fill_start); |
251 | 25 | fill_start = lxi; |
252 | 25 | } |
253 | 357 | else if (lxi < fill_start) |
254 | 22 | { |
255 | 22 | ADD_SATURATE_8 (ap + lxi, N_X_FRAC (8), |
256 | 22 | fill_start - lxi); |
257 | 22 | } |
258 | | |
259 | | /* Update fill_end */ |
260 | 382 | if (rxi < fill_end) |
261 | 2 | { |
262 | 2 | ADD_SATURATE_8 (ap + rxi, |
263 | 2 | fill_size * N_X_FRAC (8), |
264 | 2 | fill_end - rxi); |
265 | 2 | fill_end = rxi; |
266 | 2 | } |
267 | 380 | else if (fill_end < rxi) |
268 | 132 | { |
269 | 132 | ADD_SATURATE_8 (ap + fill_end, |
270 | 132 | N_X_FRAC (8), |
271 | 132 | rxi - fill_end); |
272 | 132 | } |
273 | 382 | fill_size++; |
274 | 382 | } |
275 | 382 | } |
276 | 416 | } |
277 | 63 | else |
278 | 63 | { |
279 | 63 | ADD_SATURATE_8 (ap + lxi, N_X_FRAC (8), rxi - lxi); |
280 | 63 | } |
281 | | |
282 | 479 | WRITE (image, ap + rxi, clip255 (READ (image, ap + rxi) + rxs)); |
283 | 479 | } |
284 | 489 | } |
285 | | |
286 | 489 | if (y == b) |
287 | 6 | { |
288 | | /* We're done, make sure we clean up any remaining fill. */ |
289 | 6 | if (fill_start != fill_end) |
290 | 5 | { |
291 | 5 | if (fill_size == N_Y_FRAC (8)) |
292 | 0 | { |
293 | 0 | MEMSET_WRAPPED (image, ap + fill_start, |
294 | 0 | 0xff, fill_end - fill_start); |
295 | 0 | } |
296 | 5 | else |
297 | 5 | { |
298 | 5 | ADD_SATURATE_8 (ap + fill_start, fill_size * N_X_FRAC (8), |
299 | 5 | fill_end - fill_start); |
300 | 5 | } |
301 | 5 | } |
302 | 6 | break; |
303 | 6 | } |
304 | | |
305 | 483 | if (pixman_fixed_frac (y) != Y_FRAC_LAST (8)) |
306 | 450 | { |
307 | 450 | RENDER_EDGE_STEP_SMALL (l); |
308 | 450 | RENDER_EDGE_STEP_SMALL (r); |
309 | 450 | y += STEP_Y_SMALL (8); |
310 | 450 | } |
311 | 33 | else |
312 | 33 | { |
313 | 33 | RENDER_EDGE_STEP_BIG (l); |
314 | 33 | RENDER_EDGE_STEP_BIG (r); |
315 | 33 | y += STEP_Y_BIG (8); |
316 | 33 | if (fill_start != fill_end) |
317 | 29 | { |
318 | 29 | if (fill_size == N_Y_FRAC (8)) |
319 | 22 | { |
320 | 22 | MEMSET_WRAPPED (image, ap + fill_start, |
321 | 22 | 0xff, fill_end - fill_start); |
322 | 22 | } |
323 | 7 | else |
324 | 7 | { |
325 | 7 | ADD_SATURATE_8 (ap + fill_start, fill_size * N_X_FRAC (8), |
326 | 7 | fill_end - fill_start); |
327 | 7 | } |
328 | | |
329 | 29 | fill_start = fill_end = -1; |
330 | 29 | fill_size = 0; |
331 | 29 | } |
332 | | |
333 | 33 | line += stride; |
334 | 33 | } |
335 | 483 | } |
336 | 6 | } pixman-edge.c:rasterize_edges_8 Line | Count | Source | 161 | 6 | { | 162 | 6 | pixman_fixed_t y = t; | 163 | 6 | uint32_t *line; | 164 | 6 | int fill_start = -1, fill_end = -1; | 165 | 6 | int fill_size = 0; | 166 | 6 | uint32_t *buf = (image)->bits.bits; | 167 | 6 | int stride = (image)->bits.rowstride; | 168 | 6 | int width = (image)->bits.width; | 169 | | | 170 | 6 | line = buf + pixman_fixed_to_int (y) * stride; | 171 | | | 172 | 6 | for (;;) | 173 | 489 | { | 174 | 489 | uint8_t *ap = (uint8_t *) line; | 175 | 489 | pixman_fixed_t lx, rx; | 176 | 489 | int lxi, rxi; | 177 | | | 178 | | /* clip X */ | 179 | 489 | lx = l->x; | 180 | 489 | if (lx < 0) | 181 | 0 | lx = 0; | 182 | | | 183 | 489 | rx = r->x; | 184 | | | 185 | 489 | if (pixman_fixed_to_int (rx) >= width) | 186 | 0 | { | 187 | | /* Use the last pixel of the scanline, covered 100%. | 188 | | * We can't use the first pixel following the scanline, | 189 | | * because accessing it could result in a buffer overrun. | 190 | | */ | 191 | 0 | rx = pixman_int_to_fixed (width) - 1; | 192 | 0 | } | 193 | | | 194 | | /* Skip empty (or backwards) sections */ | 195 | 489 | if (rx > lx) | 196 | 489 | { | 197 | 489 | int lxs, rxs; | 198 | | | 199 | | /* Find pixel bounds for span. */ | 200 | 489 | lxi = pixman_fixed_to_int (lx); | 201 | 489 | rxi = pixman_fixed_to_int (rx); | 202 | | | 203 | | /* Sample coverage for edge pixels */ | 204 | 489 | lxs = RENDER_SAMPLES_X (lx, 8); | 205 | 489 | rxs = RENDER_SAMPLES_X (rx, 8); | 206 | | | 207 | | /* Add coverage across row */ | 208 | 489 | if (lxi == rxi) | 209 | 10 | { | 210 | 10 | WRITE (image, ap + lxi, | 211 | 10 | clip255 (READ (image, ap + lxi) + rxs - lxs)); | 212 | 10 | } | 213 | 479 | else | 214 | 479 | { | 215 | 479 | WRITE (image, ap + lxi, | 216 | 479 | clip255 (READ (image, ap + lxi) + N_X_FRAC (8) - lxs)); | 217 | | | 218 | | /* Move forward so that lxi/rxi is the pixel span */ | 219 | 479 | lxi++; | 220 | | | 221 | | /* Don't bother trying to optimize the fill unless | 222 | | * the span is longer than 4 pixels. */ | 223 | 479 | if (rxi - lxi > 4) | 224 | 416 | { | 225 | 416 | if (fill_start < 0) | 226 | 34 | { | 227 | 34 | fill_start = lxi; | 228 | 34 | fill_end = rxi; | 229 | 34 | fill_size++; | 230 | 34 | } | 231 | 382 | else | 232 | 382 | { | 233 | 382 | if (lxi >= fill_end || rxi < fill_start) | 234 | 0 | { | 235 | | /* We're beyond what we saved, just fill it */ | 236 | 0 | ADD_SATURATE_8 (ap + fill_start, | 237 | 0 | fill_size * N_X_FRAC (8), | 238 | 0 | fill_end - fill_start); | 239 | 0 | fill_start = lxi; | 240 | 0 | fill_end = rxi; | 241 | 0 | fill_size = 1; | 242 | 0 | } | 243 | 382 | else | 244 | 382 | { | 245 | | /* Update fill_start */ | 246 | 382 | if (lxi > fill_start) | 247 | 25 | { | 248 | 25 | ADD_SATURATE_8 (ap + fill_start, | 249 | 25 | fill_size * N_X_FRAC (8), | 250 | 25 | lxi - fill_start); | 251 | 25 | fill_start = lxi; | 252 | 25 | } | 253 | 357 | else if (lxi < fill_start) | 254 | 22 | { | 255 | 22 | ADD_SATURATE_8 (ap + lxi, N_X_FRAC (8), | 256 | 22 | fill_start - lxi); | 257 | 22 | } | 258 | | | 259 | | /* Update fill_end */ | 260 | 382 | if (rxi < fill_end) | 261 | 2 | { | 262 | 2 | ADD_SATURATE_8 (ap + rxi, | 263 | 2 | fill_size * N_X_FRAC (8), | 264 | 2 | fill_end - rxi); | 265 | 2 | fill_end = rxi; | 266 | 2 | } | 267 | 380 | else if (fill_end < rxi) | 268 | 132 | { | 269 | 132 | ADD_SATURATE_8 (ap + fill_end, | 270 | 132 | N_X_FRAC (8), | 271 | 132 | rxi - fill_end); | 272 | 132 | } | 273 | 382 | fill_size++; | 274 | 382 | } | 275 | 382 | } | 276 | 416 | } | 277 | 63 | else | 278 | 63 | { | 279 | 63 | ADD_SATURATE_8 (ap + lxi, N_X_FRAC (8), rxi - lxi); | 280 | 63 | } | 281 | | | 282 | 479 | WRITE (image, ap + rxi, clip255 (READ (image, ap + rxi) + rxs)); | 283 | 479 | } | 284 | 489 | } | 285 | | | 286 | 489 | if (y == b) | 287 | 6 | { | 288 | | /* We're done, make sure we clean up any remaining fill. */ | 289 | 6 | if (fill_start != fill_end) | 290 | 5 | { | 291 | 5 | if (fill_size == N_Y_FRAC (8)) | 292 | 0 | { | 293 | 0 | MEMSET_WRAPPED (image, ap + fill_start, | 294 | 0 | 0xff, fill_end - fill_start); | 295 | 0 | } | 296 | 5 | else | 297 | 5 | { | 298 | 5 | ADD_SATURATE_8 (ap + fill_start, fill_size * N_X_FRAC (8), | 299 | 5 | fill_end - fill_start); | 300 | 5 | } | 301 | 5 | } | 302 | 6 | break; | 303 | 6 | } | 304 | | | 305 | 483 | if (pixman_fixed_frac (y) != Y_FRAC_LAST (8)) | 306 | 450 | { | 307 | 450 | RENDER_EDGE_STEP_SMALL (l); | 308 | 450 | RENDER_EDGE_STEP_SMALL (r); | 309 | 450 | y += STEP_Y_SMALL (8); | 310 | 450 | } | 311 | 33 | else | 312 | 33 | { | 313 | 33 | RENDER_EDGE_STEP_BIG (l); | 314 | 33 | RENDER_EDGE_STEP_BIG (r); | 315 | 33 | y += STEP_Y_BIG (8); | 316 | 33 | if (fill_start != fill_end) | 317 | 29 | { | 318 | 29 | if (fill_size == N_Y_FRAC (8)) | 319 | 22 | { | 320 | 22 | MEMSET_WRAPPED (image, ap + fill_start, | 321 | 22 | 0xff, fill_end - fill_start); | 322 | 22 | } | 323 | 7 | else | 324 | 7 | { | 325 | 7 | ADD_SATURATE_8 (ap + fill_start, fill_size * N_X_FRAC (8), | 326 | 7 | fill_end - fill_start); | 327 | 7 | } | 328 | | | 329 | 29 | fill_start = fill_end = -1; | 330 | 29 | fill_size = 0; | 331 | 29 | } | 332 | | | 333 | 33 | line += stride; | 334 | 33 | } | 335 | 483 | } | 336 | 6 | } |
Unexecuted instantiation: pixman-edge-accessors.c:rasterize_edges_8 |
337 | | |
338 | | #ifndef PIXMAN_FB_ACCESSORS |
339 | | static |
340 | | #endif |
341 | | void |
342 | | PIXMAN_RASTERIZE_EDGES (pixman_image_t *image, |
343 | | pixman_edge_t * l, |
344 | | pixman_edge_t * r, |
345 | | pixman_fixed_t t, |
346 | | pixman_fixed_t b) |
347 | 6 | { |
348 | 6 | switch (PIXMAN_FORMAT_BPP (image->bits.format)) |
349 | 6 | { |
350 | 0 | case 1: |
351 | 0 | rasterize_edges_1 (image, l, r, t, b); |
352 | 0 | break; |
353 | | |
354 | 0 | case 4: |
355 | 0 | rasterize_edges_4 (image, l, r, t, b); |
356 | 0 | break; |
357 | | |
358 | 6 | case 8: |
359 | 6 | rasterize_edges_8 (image, l, r, t, b); |
360 | 6 | break; |
361 | | |
362 | 0 | default: |
363 | 0 | break; |
364 | 6 | } |
365 | 6 | } pixman-edge.c:pixman_rasterize_edges_no_accessors Line | Count | Source | 347 | 6 | { | 348 | 6 | switch (PIXMAN_FORMAT_BPP (image->bits.format)) | 349 | 6 | { | 350 | 0 | case 1: | 351 | 0 | rasterize_edges_1 (image, l, r, t, b); | 352 | 0 | break; | 353 | | | 354 | 0 | case 4: | 355 | 0 | rasterize_edges_4 (image, l, r, t, b); | 356 | 0 | break; | 357 | | | 358 | 6 | case 8: | 359 | 6 | rasterize_edges_8 (image, l, r, t, b); | 360 | 6 | break; | 361 | | | 362 | 0 | default: | 363 | 0 | break; | 364 | 6 | } | 365 | 6 | } |
Unexecuted instantiation: pixman_rasterize_edges_accessors |
366 | | |
367 | | #ifndef PIXMAN_FB_ACCESSORS |
368 | | |
369 | | PIXMAN_EXPORT void |
370 | | pixman_rasterize_edges (pixman_image_t *image, |
371 | | pixman_edge_t * l, |
372 | | pixman_edge_t * r, |
373 | | pixman_fixed_t t, |
374 | | pixman_fixed_t b) |
375 | 6 | { |
376 | 6 | return_if_fail (image->type == BITS); |
377 | 6 | return_if_fail (PIXMAN_FORMAT_TYPE (image->bits.format) == PIXMAN_TYPE_A); |
378 | | |
379 | 6 | if (image->bits.read_func || image->bits.write_func) |
380 | 0 | pixman_rasterize_edges_accessors (image, l, r, t, b); |
381 | 6 | else |
382 | 6 | pixman_rasterize_edges_no_accessors (image, l, r, t, b); |
383 | 6 | } |
384 | | |
385 | | #endif |