Bug Summary

File:root/firefox-clang/gfx/pixman/pixman/pixman/pixman-fast-path.c
Warning:line 1286, column 7
Division by zero

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -O2 -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name pixman-fast-path.c -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -relaxed-aliasing -ffp-contract=off -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/root/firefox-clang/obj-x86_64-pc-linux-gnu/gfx/pixman/pixman/pixman -fcoverage-compilation-dir=/root/firefox-clang/obj-x86_64-pc-linux-gnu/gfx/pixman/pixman/pixman -resource-dir /usr/lib/llvm-23/lib/clang/23 -include /root/firefox-clang/config/gcc_hidden.h -include /root/firefox-clang/obj-x86_64-pc-linux-gnu/mozilla-config.h -I /root/firefox-clang/obj-x86_64-pc-linux-gnu/dist/system_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D DEBUG=1 -D HAVE_PTHREADS -D PACKAGE=mozpixman -D USE_X86_MMX -D USE_SSE2 -D USE_SSSE3 -D MOZ_HAS_MOZGLUE -D MOZILLA_INTERNAL_API -D IMPL_LIBXUL -D MOZ_SUPPORT_LEAKCHECKING -D STATIC_EXPORTABLE_JS_API -I /root/firefox-clang/gfx/pixman/pixman/pixman -I /root/firefox-clang/obj-x86_64-pc-linux-gnu/gfx/pixman/pixman/pixman -I /root/firefox-clang/gfx/cairo/cairo/src -I /root/firefox-clang/obj-x86_64-pc-linux-gnu/dist/include -I /root/firefox-clang/obj-x86_64-pc-linux-gnu/dist/include/nspr -I /root/firefox-clang/obj-x86_64-pc-linux-gnu/dist/include/nss -D MOZILLA_CLIENT -internal-isystem /usr/lib/llvm-23/lib/clang/23/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/16/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-error=tautological-type-limit-compare -Wno-range-loop-analysis -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -Wno-character-conversion -Wno-address -Wno-braced-scalar-init -Wno-missing-field-initializers -Wno-sign-compare -Wno-incompatible-pointer-types -Wno-unused -Wno-incompatible-pointer-types -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -ferror-limit 19 -fstrict-flex-arrays=1 -stack-protector 2 -fstack-clash-protection -ftrivial-auto-var-init=pattern -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fdiagnostics-absolute-paths -vectorize-loops -vectorize-slp -analyzer-checker optin.performance.Padding -analyzer-output=html -analyzer-config stable-report-filename=true -mllvm -dwarf-linkage-names=Abstract -faddrsig -fdwarf2-cfi-asm -o /tmp/scan-build-2026-09-01-224014-2642839-1 -x c /root/firefox-clang/gfx/pixman/pixman/pixman/pixman-fast-path.c
1/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */
2/*
3 * Copyright © 2000 SuSE, Inc.
4 * Copyright © 2007 Red Hat, Inc.
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of SuSE not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. SuSE makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
15 *
16 * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 *
23 * Author: Keith Packard, SuSE, Inc.
24 */
25
26#ifdef HAVE_CONFIG_H
27#include <pixman-config.h>
28#endif
29#include <string.h>
30#include <stdlib.h>
31#include "pixman-private.h"
32#include "pixman-combine32.h"
33#include "pixman-inlines.h"
34
35static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
36fetch_24 (uint8_t *a)
37{
38 if (((uintptr_t)a) & 1)
39 {
40#ifdef WORDS_BIGENDIAN
41 return (*a << 16) | (*(uint16_t *)(a + 1));
42#else
43 return *a | (*(uint16_t *)(a + 1) << 8);
44#endif
45 }
46 else
47 {
48#ifdef WORDS_BIGENDIAN
49 return (*(uint16_t *)a << 8) | *(a + 2);
50#else
51 return *(uint16_t *)a | (*(a + 2) << 16);
52#endif
53 }
54}
55
56static force_inline__inline__ __attribute__ ((__always_inline__)) void
57store_24 (uint8_t *a,
58 uint32_t v)
59{
60 if (((uintptr_t)a) & 1)
61 {
62#ifdef WORDS_BIGENDIAN
63 *a = (uint8_t) (v >> 16);
64 *(uint16_t *)(a + 1) = (uint16_t) (v);
65#else
66 *a = (uint8_t) (v);
67 *(uint16_t *)(a + 1) = (uint16_t) (v >> 8);
68#endif
69 }
70 else
71 {
72#ifdef WORDS_BIGENDIAN
73 *(uint16_t *)a = (uint16_t)(v >> 8);
74 *(a + 2) = (uint8_t)v;
75#else
76 *(uint16_t *)a = (uint16_t)v;
77 *(a + 2) = (uint8_t)(v >> 16);
78#endif
79 }
80}
81
82static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
83over (uint32_t src,
84 uint32_t dest)
85{
86 uint32_t a = ~src >> 24;
87
88 UN8x4_MUL_UN8_ADD_UN8x4 (dest, a, src)do { uint32_t r1__, r2__, r3__, t__; r1__ = (dest); r2__ = (src
) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff) * ((a));
t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r1__ &= 0xff00ff; } while (0); do { t__ = (
(r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r1__ = (t__ & 0xff00ff); } while (0); r2__ = (dest) >>
8; r3__ = ((src) >> 8) & 0xff00ff; do { t__ = ((r2__
) & 0xff00ff) * ((a)); t__ += 0x800080; r2__ = (t__ + ((t__
>> 8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff
; } while (0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r2__ = (t__ & 0xff00ff
); } while (0); (dest) = r1__ | (r2__ << 8); } while (0
)
;
89
90 return dest;
91}
92
93static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
94in (uint32_t x,
95 uint8_t y)
96{
97 uint16_t a = y;
98
99 UN8x4_MUL_UN8 (x, a)do { uint32_t r1__, r2__, t__; r1__ = (x); do { t__ = ((r1__)
& 0xff00ff) * ((a)); t__ += 0x800080; r1__ = (t__ + ((t__
>> 8) & 0xff00ff)) >> 8; r1__ &= 0xff00ff
; } while (0); r2__ = (x) >> 8; do { t__ = ((r2__) &
0xff00ff) * ((a)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); (x) = r1__ | (r2__ << 8); } while (0)
;
100
101 return x;
102}
103
104/*
105 * Naming convention:
106 *
107 * op_src_mask_dest
108 */
109static void
110fast_composite_over_x888_8_8888 (pixman_implementation_t *imp,
111 pixman_composite_info_t *info)
112{
113 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
114 uint32_t *src, *src_line;
115 uint32_t *dst, *dst_line;
116 uint8_t *mask, *mask_line;
117 int src_stride, mask_stride, dst_stride;
118 uint8_t m;
119 uint32_t s, d;
120 int32_t w;
121
122 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
123 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
124 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
125
126 while (height--)
127 {
128 src = src_line;
129 src_line += src_stride;
130 dst = dst_line;
131 dst_line += dst_stride;
132 mask = mask_line;
133 mask_line += mask_stride;
134
135 w = width;
136 while (w--)
137 {
138 m = *mask++;
139 if (m)
140 {
141 s = *src | 0xff000000;
142
143 if (m == 0xff)
144 {
145 *dst = s;
146 }
147 else
148 {
149 d = in (s, m);
150 *dst = over (d, *dst);
151 }
152 }
153 src++;
154 dst++;
155 }
156 }
157}
158
159static void
160fast_composite_in_n_8_8 (pixman_implementation_t *imp,
161 pixman_composite_info_t *info)
162{
163 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
164 uint32_t src, srca;
165 uint8_t *dst_line, *dst;
166 uint8_t *mask_line, *mask, m;
167 int dst_stride, mask_stride;
168 int32_t w;
169 uint16_t t;
170
171 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
172
173 srca = src >> 24;
174
175 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
176 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
177
178 if (srca == 0xff)
179 {
180 while (height--)
181 {
182 dst = dst_line;
183 dst_line += dst_stride;
184 mask = mask_line;
185 mask_line += mask_stride;
186 w = width;
187
188 while (w--)
189 {
190 m = *mask++;
191
192 if (m == 0)
193 *dst = 0;
194 else if (m != 0xff)
195 *dst = MUL_UN8 (m, *dst, t)((t) = (m) * (uint16_t)(*dst) + 0x80, ((((t) >> 8 ) + (
t) ) >> 8 ))
;
196
197 dst++;
198 }
199 }
200 }
201 else
202 {
203 while (height--)
204 {
205 dst = dst_line;
206 dst_line += dst_stride;
207 mask = mask_line;
208 mask_line += mask_stride;
209 w = width;
210
211 while (w--)
212 {
213 m = *mask++;
214 m = MUL_UN8 (m, srca, t)((t) = (m) * (uint16_t)(srca) + 0x80, ((((t) >> 8 ) + (
t) ) >> 8 ))
;
215
216 if (m == 0)
217 *dst = 0;
218 else if (m != 0xff)
219 *dst = MUL_UN8 (m, *dst, t)((t) = (m) * (uint16_t)(*dst) + 0x80, ((((t) >> 8 ) + (
t) ) >> 8 ))
;
220
221 dst++;
222 }
223 }
224 }
225}
226
227static void
228fast_composite_in_8_8 (pixman_implementation_t *imp,
229 pixman_composite_info_t *info)
230{
231 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
232 uint8_t *dst_line, *dst;
233 uint8_t *src_line, *src;
234 int dst_stride, src_stride;
235 int32_t w;
236 uint8_t s;
237 uint16_t t;
238
239 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line) = ((uint8_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
240 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
241
242 while (height--)
243 {
244 dst = dst_line;
245 dst_line += dst_stride;
246 src = src_line;
247 src_line += src_stride;
248 w = width;
249
250 while (w--)
251 {
252 s = *src++;
253
254 if (s == 0)
255 *dst = 0;
256 else if (s != 0xff)
257 *dst = MUL_UN8 (s, *dst, t)((t) = (s) * (uint16_t)(*dst) + 0x80, ((((t) >> 8 ) + (
t) ) >> 8 ))
;
258
259 dst++;
260 }
261 }
262}
263
264static void
265fast_composite_over_n_8_8888 (pixman_implementation_t *imp,
266 pixman_composite_info_t *info)
267{
268 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
269 uint32_t src, srca;
270 uint32_t *dst_line, *dst, d;
271 uint8_t *mask_line, *mask, m;
272 int dst_stride, mask_stride;
273 int32_t w;
274
275 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
276
277 srca = src >> 24;
278 if (src == 0)
279 return;
280
281 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
282 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
283
284 while (height--)
285 {
286 dst = dst_line;
287 dst_line += dst_stride;
288 mask = mask_line;
289 mask_line += mask_stride;
290 w = width;
291
292 while (w--)
293 {
294 m = *mask++;
295 if (m == 0xff)
296 {
297 if (srca == 0xff)
298 *dst = src;
299 else
300 *dst = over (src, *dst);
301 }
302 else if (m)
303 {
304 d = in (src, m);
305 *dst = over (d, *dst);
306 }
307 dst++;
308 }
309 }
310}
311
312static void
313fast_composite_add_n_8888_8888_ca (pixman_implementation_t *imp,
314 pixman_composite_info_t *info)
315{
316 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
317 uint32_t src, s;
318 uint32_t *dst_line, *dst, d;
319 uint32_t *mask_line, *mask, ma;
320 int dst_stride, mask_stride;
321 int32_t w;
322
323 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
324
325 if (src == 0)
326 return;
327
328 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
329 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
330
331 while (height--)
332 {
333 dst = dst_line;
334 dst_line += dst_stride;
335 mask = mask_line;
336 mask_line += mask_stride;
337 w = width;
338
339 while (w--)
340 {
341 ma = *mask++;
342
343 if (ma)
344 {
345 d = *dst;
346 s = src;
347
348 UN8x4_MUL_UN8x4_ADD_UN8x4 (s, ma, d)do { uint32_t r1__, r2__, r3__, t__; r1__ = (s); r2__ = (ma);
do { t__ = (r1__ & 0xff) * (r2__ & 0xff); t__ |= (r1__
& 0xff0000) * ((r2__ >> 8 * 2) & 0xff); t__ +=
0x800080; t__ = (t__ + ((t__ >> 8) & 0xff00ff)) >>
8; r1__ = t__ & 0xff00ff; } while (0); r2__ = (d) & 0xff00ff
; do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = ((s) >> 8); r3__ = ((ma) >> 8); do { t__
= (r2__ & 0xff) * (r3__ & 0xff); t__ |= (r2__ & 0xff0000
) * ((r3__ >> 8 * 2) & 0xff); t__ += 0x800080; t__ =
(t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r2__ =
t__ & 0xff00ff; } while (0); r3__ = ((d) >> 8) &
0xff00ff; do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - (
(t__ >> 8) & 0xff00ff); r2__ = (t__ & 0xff00ff)
; } while (0); (s) = r1__ | (r2__ << 8); } while (0)
;
349
350 *dst = s;
351 }
352
353 dst++;
354 }
355 }
356}
357
358static void
359fast_composite_over_n_8888_8888_ca (pixman_implementation_t *imp,
360 pixman_composite_info_t *info)
361{
362 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
363 uint32_t src, srca, s;
364 uint32_t *dst_line, *dst, d;
365 uint32_t *mask_line, *mask, ma;
366 int dst_stride, mask_stride;
367 int32_t w;
368
369 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
370
371 srca = src >> 24;
372 if (src == 0)
373 return;
374
375 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
376 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
377
378 while (height--)
379 {
380 dst = dst_line;
381 dst_line += dst_stride;
382 mask = mask_line;
383 mask_line += mask_stride;
384 w = width;
385
386 while (w--)
387 {
388 ma = *mask++;
389 if (ma == 0xffffffff)
390 {
391 if (srca == 0xff)
392 *dst = src;
393 else
394 *dst = over (src, *dst);
395 }
396 else if (ma)
397 {
398 d = *dst;
399 s = src;
400
401 UN8x4_MUL_UN8x4 (s, ma)do { uint32_t r1__, r2__, r3__, t__; r1__ = (s); r2__ = (ma);
do { t__ = (r1__ & 0xff) * (r2__ & 0xff); t__ |= (r1__
& 0xff0000) * ((r2__ >> 8 * 2) & 0xff); t__ +=
0x800080; t__ = (t__ + ((t__ >> 8) & 0xff00ff)) >>
8; r1__ = t__ & 0xff00ff; } while (0); r2__ = (s) >>
8; r3__ = (ma) >> 8; do { t__ = (r2__ & 0xff) * (r3__
& 0xff); t__ |= (r2__ & 0xff0000) * ((r3__ >> 8
* 2) & 0xff); t__ += 0x800080; t__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ = t__ & 0xff00ff; }
while (0); (s) = r1__ | (r2__ << 8); } while (0)
;
402 UN8x4_MUL_UN8 (ma, srca)do { uint32_t r1__, r2__, t__; r1__ = (ma); do { t__ = ((r1__
) & 0xff00ff) * ((srca)); t__ += 0x800080; r1__ = (t__ + (
(t__ >> 8) & 0xff00ff)) >> 8; r1__ &= 0xff00ff
; } while (0); r2__ = (ma) >> 8; do { t__ = ((r2__) &
0xff00ff) * ((srca)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); (ma) = r1__ | (r2__ << 8); } while (0)
;
403 ma = ~ma;
404 UN8x4_MUL_UN8x4_ADD_UN8x4 (d, ma, s)do { uint32_t r1__, r2__, r3__, t__; r1__ = (d); r2__ = (ma);
do { t__ = (r1__ & 0xff) * (r2__ & 0xff); t__ |= (r1__
& 0xff0000) * ((r2__ >> 8 * 2) & 0xff); t__ +=
0x800080; t__ = (t__ + ((t__ >> 8) & 0xff00ff)) >>
8; r1__ = t__ & 0xff00ff; } while (0); r2__ = (s) & 0xff00ff
; do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = ((d) >> 8); r3__ = ((ma) >> 8); do { t__
= (r2__ & 0xff) * (r3__ & 0xff); t__ |= (r2__ & 0xff0000
) * ((r3__ >> 8 * 2) & 0xff); t__ += 0x800080; t__ =
(t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r2__ =
t__ & 0xff00ff; } while (0); r3__ = ((s) >> 8) &
0xff00ff; do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - (
(t__ >> 8) & 0xff00ff); r2__ = (t__ & 0xff00ff)
; } while (0); (d) = r1__ | (r2__ << 8); } while (0)
;
405
406 *dst = d;
407 }
408
409 dst++;
410 }
411 }
412}
413
414static void
415fast_composite_over_n_8_0888 (pixman_implementation_t *imp,
416 pixman_composite_info_t *info)
417{
418 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
419 uint32_t src, srca;
420 uint8_t *dst_line, *dst;
421 uint32_t d;
422 uint8_t *mask_line, *mask, m;
423 int dst_stride, mask_stride;
424 int32_t w;
425
426 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
427
428 srca = src >> 24;
429 if (src == 0)
430 return;
431
432 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 3)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (3) * (dest_x); } while (0)
;
433 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
434
435 while (height--)
436 {
437 dst = dst_line;
438 dst_line += dst_stride;
439 mask = mask_line;
440 mask_line += mask_stride;
441 w = width;
442
443 while (w--)
444 {
445 m = *mask++;
446 if (m == 0xff)
447 {
448 if (srca == 0xff)
449 {
450 d = src;
451 }
452 else
453 {
454 d = fetch_24 (dst);
455 d = over (src, d);
456 }
457 store_24 (dst, d);
458 }
459 else if (m)
460 {
461 d = over (in (src, m), fetch_24 (dst));
462 store_24 (dst, d);
463 }
464 dst += 3;
465 }
466 }
467}
468
469static void
470fast_composite_over_n_8_0565 (pixman_implementation_t *imp,
471 pixman_composite_info_t *info)
472{
473 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
474 uint32_t src, srca;
475 uint16_t *dst_line, *dst;
476 uint32_t d;
477 uint8_t *mask_line, *mask, m;
478 int dst_stride, mask_stride;
479 int32_t w;
480
481 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
482
483 srca = src >> 24;
484 if (src == 0)
485 return;
486
487 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
488 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
489
490 while (height--)
491 {
492 dst = dst_line;
493 dst_line += dst_stride;
494 mask = mask_line;
495 mask_line += mask_stride;
496 w = width;
497
498 while (w--)
499 {
500 m = *mask++;
501 if (m == 0xff)
502 {
503 if (srca == 0xff)
504 {
505 d = src;
506 }
507 else
508 {
509 d = *dst;
510 d = over (src, convert_0565_to_0888 (d));
511 }
512 *dst = convert_8888_to_0565 (d);
513 }
514 else if (m)
515 {
516 d = *dst;
517 d = over (in (src, m), convert_0565_to_0888 (d));
518 *dst = convert_8888_to_0565 (d);
519 }
520 dst++;
521 }
522 }
523}
524
525static void
526fast_composite_over_n_8888_0565_ca (pixman_implementation_t *imp,
527 pixman_composite_info_t *info)
528{
529 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
530 uint32_t src, srca, s;
531 uint16_t src16;
532 uint16_t *dst_line, *dst;
533 uint32_t d;
534 uint32_t *mask_line, *mask, ma;
535 int dst_stride, mask_stride;
536 int32_t w;
537
538 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
539
540 srca = src >> 24;
541 if (src == 0)
542 return;
543
544 src16 = convert_8888_to_0565 (src);
545
546 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
547 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint32_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
548
549 while (height--)
550 {
551 dst = dst_line;
552 dst_line += dst_stride;
553 mask = mask_line;
554 mask_line += mask_stride;
555 w = width;
556
557 while (w--)
558 {
559 ma = *mask++;
560 if (ma == 0xffffffff)
561 {
562 if (srca == 0xff)
563 {
564 *dst = src16;
565 }
566 else
567 {
568 d = *dst;
569 d = over (src, convert_0565_to_0888 (d));
570 *dst = convert_8888_to_0565 (d);
571 }
572 }
573 else if (ma)
574 {
575 d = *dst;
576 d = convert_0565_to_0888 (d);
577
578 s = src;
579
580 UN8x4_MUL_UN8x4 (s, ma)do { uint32_t r1__, r2__, r3__, t__; r1__ = (s); r2__ = (ma);
do { t__ = (r1__ & 0xff) * (r2__ & 0xff); t__ |= (r1__
& 0xff0000) * ((r2__ >> 8 * 2) & 0xff); t__ +=
0x800080; t__ = (t__ + ((t__ >> 8) & 0xff00ff)) >>
8; r1__ = t__ & 0xff00ff; } while (0); r2__ = (s) >>
8; r3__ = (ma) >> 8; do { t__ = (r2__ & 0xff) * (r3__
& 0xff); t__ |= (r2__ & 0xff0000) * ((r3__ >> 8
* 2) & 0xff); t__ += 0x800080; t__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ = t__ & 0xff00ff; }
while (0); (s) = r1__ | (r2__ << 8); } while (0)
;
581 UN8x4_MUL_UN8 (ma, srca)do { uint32_t r1__, r2__, t__; r1__ = (ma); do { t__ = ((r1__
) & 0xff00ff) * ((srca)); t__ += 0x800080; r1__ = (t__ + (
(t__ >> 8) & 0xff00ff)) >> 8; r1__ &= 0xff00ff
; } while (0); r2__ = (ma) >> 8; do { t__ = ((r2__) &
0xff00ff) * ((srca)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); (ma) = r1__ | (r2__ << 8); } while (0)
;
582 ma = ~ma;
583 UN8x4_MUL_UN8x4_ADD_UN8x4 (d, ma, s)do { uint32_t r1__, r2__, r3__, t__; r1__ = (d); r2__ = (ma);
do { t__ = (r1__ & 0xff) * (r2__ & 0xff); t__ |= (r1__
& 0xff0000) * ((r2__ >> 8 * 2) & 0xff); t__ +=
0x800080; t__ = (t__ + ((t__ >> 8) & 0xff00ff)) >>
8; r1__ = t__ & 0xff00ff; } while (0); r2__ = (s) & 0xff00ff
; do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = ((d) >> 8); r3__ = ((ma) >> 8); do { t__
= (r2__ & 0xff) * (r3__ & 0xff); t__ |= (r2__ & 0xff0000
) * ((r3__ >> 8 * 2) & 0xff); t__ += 0x800080; t__ =
(t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r2__ =
t__ & 0xff00ff; } while (0); r3__ = ((s) >> 8) &
0xff00ff; do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - (
(t__ >> 8) & 0xff00ff); r2__ = (t__ & 0xff00ff)
; } while (0); (d) = r1__ | (r2__ << 8); } while (0)
;
584
585 *dst = convert_8888_to_0565 (d);
586 }
587 dst++;
588 }
589 }
590}
591
592static void
593fast_composite_over_8888_8888 (pixman_implementation_t *imp,
594 pixman_composite_info_t *info)
595{
596 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
597 uint32_t *dst_line, *dst;
598 uint32_t *src_line, *src, s;
599 int dst_stride, src_stride;
600 uint8_t a;
601 int32_t w;
602
603 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
604 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
605
606 while (height--)
607 {
608 dst = dst_line;
609 dst_line += dst_stride;
610 src = src_line;
611 src_line += src_stride;
612 w = width;
613
614 while (w--)
615 {
616 s = *src++;
617 a = s >> 24;
618 if (a == 0xff)
619 *dst = s;
620 else if (s)
621 *dst = over (s, *dst);
622 dst++;
623 }
624 }
625}
626
627static void
628fast_composite_src_x888_8888 (pixman_implementation_t *imp,
629 pixman_composite_info_t *info)
630{
631 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
632 uint32_t *dst_line, *dst;
633 uint32_t *src_line, *src;
634 int dst_stride, src_stride;
635 int32_t w;
636
637 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
638 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
639
640 while (height--)
641 {
642 dst = dst_line;
643 dst_line += dst_stride;
644 src = src_line;
645 src_line += src_stride;
646 w = width;
647
648 while (w--)
649 *dst++ = (*src++) | 0xff000000;
650 }
651}
652
653#if 0
654static void
655fast_composite_over_8888_0888 (pixman_implementation_t *imp,
656 pixman_composite_info_t *info)
657{
658 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
659 uint8_t *dst_line, *dst;
660 uint32_t d;
661 uint32_t *src_line, *src, s;
662 uint8_t a;
663 int dst_stride, src_stride;
664 int32_t w;
665
666 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 3)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (3) * (dest_x); } while (0)
;
667 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
668
669 while (height--)
670 {
671 dst = dst_line;
672 dst_line += dst_stride;
673 src = src_line;
674 src_line += src_stride;
675 w = width;
676
677 while (w--)
678 {
679 s = *src++;
680 a = s >> 24;
681 if (a)
682 {
683 if (a == 0xff)
684 d = s;
685 else
686 d = over (s, fetch_24 (dst));
687
688 store_24 (dst, d);
689 }
690 dst += 3;
691 }
692 }
693}
694#endif
695
696static void
697fast_composite_over_8888_0565 (pixman_implementation_t *imp,
698 pixman_composite_info_t *info)
699{
700 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
701 uint16_t *dst_line, *dst;
702 uint32_t d;
703 uint32_t *src_line, *src, s;
704 uint8_t a;
705 int dst_stride, src_stride;
706 int32_t w;
707
708 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
709 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
710
711 while (height--)
712 {
713 dst = dst_line;
714 dst_line += dst_stride;
715 src = src_line;
716 src_line += src_stride;
717 w = width;
718
719 while (w--)
720 {
721 s = *src++;
722 a = s >> 24;
723 if (s)
724 {
725 if (a == 0xff)
726 {
727 d = s;
728 }
729 else
730 {
731 d = *dst;
732 d = over (s, convert_0565_to_0888 (d));
733 }
734 *dst = convert_8888_to_0565 (d);
735 }
736 dst++;
737 }
738 }
739}
740
741static void
742fast_composite_add_8_8 (pixman_implementation_t *imp,
743 pixman_composite_info_t *info)
744{
745 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
746 uint8_t *dst_line, *dst;
747 uint8_t *src_line, *src;
748 int dst_stride, src_stride;
749 int32_t w;
750 uint8_t s, d;
751 uint16_t t;
752
753 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint8_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line) = ((uint8_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
754 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
755
756 while (height--)
757 {
758 dst = dst_line;
759 dst_line += dst_stride;
760 src = src_line;
761 src_line += src_stride;
762 w = width;
763
764 while (w--)
765 {
766 s = *src++;
767 if (s)
768 {
769 if (s != 0xff)
770 {
771 d = *dst;
772 t = d + s;
773 s = t | (0 - (t >> 8));
774 }
775 *dst = s;
776 }
777 dst++;
778 }
779 }
780}
781
782static void
783fast_composite_add_0565_0565 (pixman_implementation_t *imp,
784 pixman_composite_info_t *info)
785{
786 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
787 uint16_t *dst_line, *dst;
788 uint32_t d;
789 uint16_t *src_line, *src;
790 uint32_t s;
791 int dst_stride, src_stride;
792 int32_t w;
793
794 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint16_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_line) = ((uint16_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
795 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint16_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
796
797 while (height--)
798 {
799 dst = dst_line;
800 dst_line += dst_stride;
801 src = src_line;
802 src_line += src_stride;
803 w = width;
804
805 while (w--)
806 {
807 s = *src++;
808 if (s)
809 {
810 d = *dst;
811 s = convert_0565_to_8888 (s);
812 if (d)
813 {
814 d = convert_0565_to_8888 (d);
815 UN8x4_ADD_UN8x4 (s, d)do { uint32_t r1__, r2__, r3__, t__; r1__ = (s) & 0xff00ff
; r2__ = (d) & 0xff00ff; do { t__ = ((r1__) + (r2__)); t__
|= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__ = (t__
& 0xff00ff); } while (0); r2__ = ((s) >> 8) & 0xff00ff
; r3__ = ((d) >> 8) & 0xff00ff; do { t__ = ((r2__) +
(r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); s = r1__ | (r2__
<< 8); } while (0)
;
816 }
817 *dst = convert_8888_to_0565 (s);
818 }
819 dst++;
820 }
821 }
822}
823
824static void
825fast_composite_add_8888_8888 (pixman_implementation_t *imp,
826 pixman_composite_info_t *info)
827{
828 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
829 uint32_t *dst_line, *dst;
830 uint32_t *src_line, *src;
831 int dst_stride, src_stride;
832 int32_t w;
833 uint32_t s, d;
834
835 PIXMAN_IMAGE_GET_LINE (src_image, src_x, src_y, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (src_x); } while (0)
;
836 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
837
838 while (height--)
839 {
840 dst = dst_line;
841 dst_line += dst_stride;
842 src = src_line;
843 src_line += src_stride;
844 w = width;
845
846 while (w--)
847 {
848 s = *src++;
849 if (s)
850 {
851 if (s != 0xffffffff)
852 {
853 d = *dst;
854 if (d)
855 UN8x4_ADD_UN8x4 (s, d)do { uint32_t r1__, r2__, r3__, t__; r1__ = (s) & 0xff00ff
; r2__ = (d) & 0xff00ff; do { t__ = ((r1__) + (r2__)); t__
|= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__ = (t__
& 0xff00ff); } while (0); r2__ = ((s) >> 8) & 0xff00ff
; r3__ = ((d) >> 8) & 0xff00ff; do { t__ = ((r2__) +
(r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); s = r1__ | (r2__
<< 8); } while (0)
;
856 }
857 *dst = s;
858 }
859 dst++;
860 }
861 }
862}
863
864static void
865fast_composite_add_n_8_8 (pixman_implementation_t *imp,
866 pixman_composite_info_t *info)
867{
868 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
869 uint8_t *dst_line, *dst;
870 uint8_t *mask_line, *mask;
871 int dst_stride, mask_stride;
872 int32_t w;
873 uint32_t src;
874 uint8_t sa;
875
876 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint8_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
877 PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, uint8_t, mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (mask_line) = ((uint8_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (mask_x); } while (0)
;
878 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
879 sa = (src >> 24);
880
881 while (height--)
882 {
883 dst = dst_line;
884 dst_line += dst_stride;
885 mask = mask_line;
886 mask_line += mask_stride;
887 w = width;
888
889 while (w--)
890 {
891 uint16_t tmp;
892 uint16_t a;
893 uint32_t m, d;
894 uint32_t r;
895
896 a = *mask++;
897 d = *dst;
898
899 m = MUL_UN8 (sa, a, tmp)((tmp) = (sa) * (uint16_t)(a) + 0x80, ((((tmp) >> 8 ) +
(tmp) ) >> 8 ))
;
900 r = ADD_UN8 (m, d, tmp)((tmp) = (m) + (d), (uint32_t) (uint8_t) ((tmp) | (0 - ((tmp)
>> 8))))
;
901
902 *dst++ = r;
903 }
904 }
905}
906
907#ifdef WORDS_BIGENDIAN
908#define CREATE_BITMASK(n)(1U << (n)) (0x80000000 >> (n))
909#define UPDATE_BITMASK(n)((n) << 1) ((n) >> 1)
910#else
911#define CREATE_BITMASK(n)(1U << (n)) (1U << (n))
912#define UPDATE_BITMASK(n)((n) << 1) ((n) << 1)
913#endif
914
915#define TEST_BIT(p, n)(*((p) + ((n) >> 5)) & (1U << ((n) & 31))
)
\
916 (*((p) + ((n) >> 5)) & CREATE_BITMASK ((n) & 31)(1U << ((n) & 31)))
917#define SET_BIT(p, n)do { *((p) + ((n) >> 5)) |= (1U << ((n) & 31)
); } while (0);
\
918 do { *((p) + ((n) >> 5)) |= CREATE_BITMASK ((n) & 31)(1U << ((n) & 31)); } while (0);
919
920static void
921fast_composite_add_1_1 (pixman_implementation_t *imp,
922 pixman_composite_info_t *info)
923{
924 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
925 uint32_t *dst_line, *dst;
926 uint32_t *src_line, *src;
927 int dst_stride, src_stride;
928 int32_t w;
929
930 PIXMAN_IMAGE_GET_LINE (src_image, 0, src_y, uint32_t,do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (0); } while (0)
931 src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y
) + (1) * (0); } while (0)
;
932 PIXMAN_IMAGE_GET_LINE (dest_image, 0, dest_y, uint32_t,do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (0); } while (0)
933 dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (0); } while (0)
;
934
935 while (height--)
936 {
937 dst = dst_line;
938 dst_line += dst_stride;
939 src = src_line;
940 src_line += src_stride;
941 w = width;
942
943 while (w--)
944 {
945 /*
946 * TODO: improve performance by processing uint32_t data instead
947 * of individual bits
948 */
949 if (TEST_BIT (src, src_x + w)(*((src) + ((src_x + w) >> 5)) & (1U << ((src_x
+ w) & 31)))
)
950 SET_BIT (dst, dest_x + w)do { *((dst) + ((dest_x + w) >> 5)) |= (1U << ((dest_x
+ w) & 31)); } while (0);
;
951 }
952 }
953}
954
955static void
956fast_composite_over_n_1_8888 (pixman_implementation_t *imp,
957 pixman_composite_info_t *info)
958{
959 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
960 uint32_t src, srca;
961 uint32_t *dst, *dst_line;
962 uint32_t *mask, *mask_line;
963 int mask_stride, dst_stride;
964 uint32_t bitcache, bitmask;
965 int32_t w;
966
967 if (width <= 0)
968 return;
969
970 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
971 srca = src >> 24;
972 if (src == 0)
973 return;
974
975 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t,do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
976 dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
977 PIXMAN_IMAGE_GET_LINE (mask_image, 0, mask_y, uint32_t,do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (0); } while (0)
978 mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (0); } while (0)
;
979 mask_line += mask_x >> 5;
980
981 if (srca == 0xff)
982 {
983 while (height--)
984 {
985 dst = dst_line;
986 dst_line += dst_stride;
987 mask = mask_line;
988 mask_line += mask_stride;
989 w = width;
990
991 bitcache = *mask++;
992 bitmask = CREATE_BITMASK (mask_x & 31)(1U << (mask_x & 31));
993
994 while (w--)
995 {
996 if (bitmask == 0)
997 {
998 bitcache = *mask++;
999 bitmask = CREATE_BITMASK (0)(1U << (0));
1000 }
1001 if (bitcache & bitmask)
1002 *dst = src;
1003 bitmask = UPDATE_BITMASK (bitmask)((bitmask) << 1);
1004 dst++;
1005 }
1006 }
1007 }
1008 else
1009 {
1010 while (height--)
1011 {
1012 dst = dst_line;
1013 dst_line += dst_stride;
1014 mask = mask_line;
1015 mask_line += mask_stride;
1016 w = width;
1017
1018 bitcache = *mask++;
1019 bitmask = CREATE_BITMASK (mask_x & 31)(1U << (mask_x & 31));
1020
1021 while (w--)
1022 {
1023 if (bitmask == 0)
1024 {
1025 bitcache = *mask++;
1026 bitmask = CREATE_BITMASK (0)(1U << (0));
1027 }
1028 if (bitcache & bitmask)
1029 *dst = over (src, *dst);
1030 bitmask = UPDATE_BITMASK (bitmask)((bitmask) << 1);
1031 dst++;
1032 }
1033 }
1034 }
1035}
1036
1037static void
1038fast_composite_over_n_1_0565 (pixman_implementation_t *imp,
1039 pixman_composite_info_t *info)
1040{
1041 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
1042 uint32_t src, srca;
1043 uint16_t *dst, *dst_line;
1044 uint32_t *mask, *mask_line;
1045 int mask_stride, dst_stride;
1046 uint32_t bitcache, bitmask;
1047 int32_t w;
1048 uint32_t d;
1049 uint16_t src565;
1050
1051 if (width <= 0)
1052 return;
1053
1054 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
1055 srca = src >> 24;
1056 if (src == 0)
1057 return;
1058
1059 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint16_t,do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
1060 dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
1061 PIXMAN_IMAGE_GET_LINE (mask_image, 0, mask_y, uint32_t,do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (0); } while (0)
1062 mask_stride, mask_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = mask_image
->bits.bits; __stride__ = mask_image->bits.rowstride; (
mask_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (mask_line) = ((uint32_t *) __bits__) + (mask_stride
) * (mask_y) + (1) * (0); } while (0)
;
1063 mask_line += mask_x >> 5;
1064
1065 if (srca == 0xff)
1066 {
1067 src565 = convert_8888_to_0565 (src);
1068 while (height--)
1069 {
1070 dst = dst_line;
1071 dst_line += dst_stride;
1072 mask = mask_line;
1073 mask_line += mask_stride;
1074 w = width;
1075
1076 bitcache = *mask++;
1077 bitmask = CREATE_BITMASK (mask_x & 31)(1U << (mask_x & 31));
1078
1079 while (w--)
1080 {
1081 if (bitmask == 0)
1082 {
1083 bitcache = *mask++;
1084 bitmask = CREATE_BITMASK (0)(1U << (0));
1085 }
1086 if (bitcache & bitmask)
1087 *dst = src565;
1088 bitmask = UPDATE_BITMASK (bitmask)((bitmask) << 1);
1089 dst++;
1090 }
1091 }
1092 }
1093 else
1094 {
1095 while (height--)
1096 {
1097 dst = dst_line;
1098 dst_line += dst_stride;
1099 mask = mask_line;
1100 mask_line += mask_stride;
1101 w = width;
1102
1103 bitcache = *mask++;
1104 bitmask = CREATE_BITMASK (mask_x & 31)(1U << (mask_x & 31));
1105
1106 while (w--)
1107 {
1108 if (bitmask == 0)
1109 {
1110 bitcache = *mask++;
1111 bitmask = CREATE_BITMASK (0)(1U << (0));
1112 }
1113 if (bitcache & bitmask)
1114 {
1115 d = over (src, convert_0565_to_0888 (*dst));
1116 *dst = convert_8888_to_0565 (d);
1117 }
1118 bitmask = UPDATE_BITMASK (bitmask)((bitmask) << 1);
1119 dst++;
1120 }
1121 }
1122 }
1123}
1124
1125/*
1126 * Simple bitblt
1127 */
1128
1129static void
1130fast_composite_solid_fill (pixman_implementation_t *imp,
1131 pixman_composite_info_t *info)
1132{
1133 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
1134 uint32_t src;
1135
1136 src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format);
1137
1138 if (dest_image->bits.format == PIXMAN_a1)
1139 {
1140 src = src >> 31;
1141 }
1142 else if (dest_image->bits.format == PIXMAN_a8)
1143 {
1144 src = src >> 24;
1145 }
1146 else if (dest_image->bits.format == PIXMAN_r5g6b5 ||
1147 dest_image->bits.format == PIXMAN_b5g6r5)
1148 {
1149 src = convert_8888_to_0565 (src);
1150 }
1151
1152 pixman_fill_moz_pixman_fill (dest_image->bits.bits, dest_image->bits.rowstride,
1153 PIXMAN_FORMAT_BPP (dest_image->bits.format)(((dest_image->bits.format >> (24)) & ((1 <<
(8)) - 1)) << ((dest_image->bits.format >> 22
) & 3))
,
1154 dest_x, dest_y,
1155 width, height,
1156 src);
1157}
1158
1159static void
1160fast_composite_src_memcpy (pixman_implementation_t *imp,
1161 pixman_composite_info_t *info)
1162{
1163 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
1164 int bpp = PIXMAN_FORMAT_BPP (dest_image->bits.format)(((dest_image->bits.format >> (24)) & ((1 <<
(8)) - 1)) << ((dest_image->bits.format >> 22
) & 3))
/ 8;
1165 uint32_t n_bytes = width * bpp;
1166 int dst_stride, src_stride;
1167 uint8_t *dst;
1168 uint8_t *src;
1169
1170 src_stride = src_image->bits.rowstride * 4;
1171 dst_stride = dest_image->bits.rowstride * 4;
1172
1173 src = (uint8_t *)src_image->bits.bits + src_y * src_stride + src_x * bpp;
1174 dst = (uint8_t *)dest_image->bits.bits + dest_y * dst_stride + dest_x * bpp;
1175
1176 while (height--)
1177 {
1178 memcpy (dst, src, n_bytes);
1179
1180 dst += dst_stride;
1181 src += src_stride;
1182 }
1183}
1184
1185FAST_NEAREST (8888_8888_cover, 8888, 8888, uint32_t, uint32_t, SRC, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_cover_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s1 = *(src + x1); x2 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_cover_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_cover_SRC_8888_8888_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1186FAST_NEAREST (8888_8888_none, 8888, 8888, uint32_t, uint32_t, SRC, NONE)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_none_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { while (vx
>= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int
) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NONE ==
PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_none_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_none_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_none_SRC_8888_8888_none_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1187FAST_NEAREST (8888_8888_pad, 8888, 8888, uint32_t, uint32_t, SRC, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_pad_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { while (vx >=
0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int) ((
vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL
) { while (vx >= 0) vx -= src_width_fixed; } s2 = *(src + x2
); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = ((s1) >>
24); a2 = ((s2) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (s2); }
else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_pad_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_pad_SRC_8888_8888_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1188FAST_NEAREST (8888_8888_normal, 8888, 8888, uint32_t, uint32_t, SRC, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_normal_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_normal_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_normal_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint32_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_normal_SRC_8888_8888_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1189FAST_NEAREST (x888_8888_cover, x888, 8888, uint32_t, uint32_t, SRC, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_cover_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s1 = *(src + x1); x2 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= 0xff; a2 = 0xff; if (a1 == 0xff) { *dst = convert_x888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_x888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; if (a2 == 0xff) { *dst = convert_x888_to_8888 (s2); }
else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_x888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); *dst++ = convert_x888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = 0xff
; if (a1 == 0xff) { *dst = convert_x888_to_8888 (s1); } else if
(s1) { d = convert_8888_to_8888 (*dst); s1 = convert_x888_to_8888
(s1); a1 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s1) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a1)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s1) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); } } } static __inline__
__attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_x888_8888_cover_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_x888_8888_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_x888_8888_cover_SRC_x888_8888_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1190FAST_NEAREST (x888_8888_pad, x888, 8888, uint32_t, uint32_t, SRC, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_pad_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { while (vx >=
0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int) ((
vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL
) { while (vx >= 0) vx -= src_width_fixed; } s2 = *(src + x2
); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = 0xff; a2 = 0xff
; if (a1 == 0xff) { *dst = convert_x888_to_8888 (s1); } else if
(s1) { d = convert_8888_to_8888 (*dst); s1 = convert_x888_to_8888
(s1); a1 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s1) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a1)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s1) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; if
(a2 == 0xff) { *dst = convert_x888_to_8888 (s2); } else if (
s2) { d = convert_8888_to_8888 (*dst); s2 = convert_x888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); *dst++ = convert_x888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = 0xff
; if (a1 == 0xff) { *dst = convert_x888_to_8888 (s1); } else if
(s1) { d = convert_8888_to_8888 (*dst); s1 = convert_x888_to_8888
(s1); a1 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s1) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a1)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s1) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); } } } static __inline__
__attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_x888_8888_pad_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_x888_8888_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_x888_8888_pad_SRC_x888_8888_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1191FAST_NEAREST (x888_8888_normal, x888, 8888, uint32_t, uint32_t, SRC, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_normal_SRC
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= 0xff; a2 = 0xff; if (a1 == 0xff) { *dst = convert_x888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_x888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; if (a2 == 0xff) { *dst = convert_x888_to_8888 (s2); }
else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_x888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); *dst++ = convert_x888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = 0xff
; if (a1 == 0xff) { *dst = convert_x888_to_8888 (s1); } else if
(s1) { d = convert_8888_to_8888 (*dst); s1 = convert_x888_to_8888
(s1); a1 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s1) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a1)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s1) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_x888_to_8888 (s1); } } } static __inline__
__attribute__ ((__always_inline__)) void scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_x888_8888_normal_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_x888_8888_normal_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint32_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_x888_8888_normal_SRC_x888_8888_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1192FAST_NEAREST (8888_8888_cover, 8888, 8888, uint32_t, uint32_t, OVER, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_cover_OVER
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s1 = *(src + x1); x2 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_cover_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_cover_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_cover_OVER_8888_8888_cover_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1193FAST_NEAREST (8888_8888_none, 8888, 8888, uint32_t, uint32_t, OVER, NONE)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_none_OVER
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { while (vx
>= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int
) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NONE ==
PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_none_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_none_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_none_OVER_8888_8888_none_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1194FAST_NEAREST (8888_8888_pad, 8888, 8888, uint32_t, uint32_t, OVER, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_pad_OVER
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { while (vx >=
0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int) ((
vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL
) { while (vx >= 0) vx -= src_width_fixed; } s2 = *(src + x2
); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = ((s1) >>
24); a2 = ((s2) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (s2); }
else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_pad_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_pad_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_pad_OVER_8888_8888_pad_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1195FAST_NEAREST (8888_8888_normal, 8888, 8888, uint32_t, uint32_t, OVER, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_normal_OVER
(uint32_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_8888 (s1); } else if (s1) { d = convert_8888_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_8888
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_8888 (
s2); } else if (s2) { d = convert_8888_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_8888 (d); } dst++; }
else { *dst++ = convert_8888_to_8888 (s1); *dst++ = convert_8888_to_8888
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_8888
(s1); } else if (s1) { d = convert_8888_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_8888 (d); }
dst++; } else { *dst++ = convert_8888_to_8888 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
( const uint8_t *mask, uint32_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_8888_normal_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_8888_normal_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint32_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint32_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_8888_normal_OVER_8888_8888_normal_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1196FAST_NEAREST (8888_565_cover, 8888, 0565, uint32_t, uint16_t, SRC, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_cover_SRC
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s1 = *(src + x1); x2 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_cover_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_cover_SRC_8888_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1197FAST_NEAREST (8888_565_none, 8888, 0565, uint32_t, uint16_t, SRC, NONE)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_none_SRC
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { while (vx
>= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int
) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NONE ==
PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_none_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_none_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_none_SRC_8888_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1198FAST_NEAREST (8888_565_pad, 8888, 0565, uint32_t, uint16_t, SRC, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_pad_SRC
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { while (vx >=
0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int) ((
vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL
) { while (vx >= 0) vx -= src_width_fixed; } s2 = *(src + x2
); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = ((s1) >>
24); a2 = ((s2) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (s2); }
else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_pad_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_pad_SRC_8888_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1199FAST_NEAREST (8888_565_normal, 8888, 0565, uint32_t, uint16_t, SRC, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_normal_SRC
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_normal_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_normal_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint32_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_normal_SRC_8888_565_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1200FAST_NEAREST (565_565_normal, 0565, 0565, uint16_t, uint16_t, SRC, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_normal_SRC
(uint16_t *dst, const uint16_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint16_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_SRC == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_SRC != PIXMAN_OP_SRC
&& PIXMAN_OP_SRC != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1
= 0xff; a2 = 0xff; if (a1 == 0xff) { *dst = convert_0565_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_0565_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; if (a2 == 0xff) { *dst = convert_0565_to_0565 (s2); }
else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_0565_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_0565_to_0565 (s1); *dst++ = convert_0565_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_SRC == PIXMAN_OP_OVER) { a1 = 0xff
; if (a1 == 0xff) { *dst = convert_0565_to_0565 (s1); } else if
(s1) { d = convert_0565_to_8888 (*dst); s1 = convert_0565_to_8888
(s1); a1 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s1) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a1)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s1) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_0565_to_0565 (s1); } } } static __inline__
__attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_normal_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_normal_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint16_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_normal_SRC_565_565_normal_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1201FAST_NEAREST (8888_565_cover, 8888, 0565, uint32_t, uint16_t, OVER, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_cover_OVER
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s1 = *(src + x1); x2 = ((int) ((vx) >> 16)); vx += unit_x
; if (-1 == PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_cover_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_cover_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_cover_OVER_8888_565_cover_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1202FAST_NEAREST (8888_565_none, 8888, 0565, uint32_t, uint16_t, OVER, NONE)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_none_OVER
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { while (vx
>= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int
) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NONE ==
PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_none_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_none_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_none_OVER_8888_565_none_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1203FAST_NEAREST (8888_565_pad, 8888, 0565, uint32_t, uint16_t, OVER, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_pad_OVER
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { while (vx >=
0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = ((int) ((
vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL
) { while (vx >= 0) vx -= src_width_fixed; } s2 = *(src + x2
); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = ((s1) >>
24); a2 = ((s2) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (s2); }
else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_pad_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_pad_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint32_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_pad_OVER_8888_565_pad_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1204FAST_NEAREST (8888_565_normal, 8888, 0565, uint32_t, uint16_t, OVER, NORMAL)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_normal_OVER
(uint16_t *dst, const uint32_t *src, int32_t w, pixman_fixed_t
vx, pixman_fixed_t unit_x, pixman_fixed_t src_width_fixed, pixman_bool_t
fully_transparent_src) { uint32_t d; uint32_t s1, s2; uint8_t
a1, a2; int x1, x2; if (PIXMAN_OP_OVER == PIXMAN_OP_OVER &&
fully_transparent_src) return; if (PIXMAN_OP_OVER != PIXMAN_OP_SRC
&& PIXMAN_OP_OVER != PIXMAN_OP_OVER) abort(); while (
(w -= 2) >= 0) { x1 = ((int) ((vx) >> 16)); vx += unit_x
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { while (
vx >= 0) vx -= src_width_fixed; } s1 = *(src + x1); x2 = (
(int) ((vx) >> 16)); vx += unit_x; if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_NORMAL) { while (vx >= 0) vx -= src_width_fixed
; } s2 = *(src + x2); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) {
a1 = ((s1) >> 24); a2 = ((s2) >> 24); if (a1 == 0xff
) { *dst = convert_8888_to_0565 (s1); } else if (s1) { d = convert_0565_to_8888
(*dst); s1 = convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t
r1__, r2__, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff
; do { t__ = ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080
; r1__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r1__ &= 0xff00ff; } while (0); do { t__ = ((r1__) + (r2__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r1__
= (t__ & 0xff00ff); } while (0); r2__ = (d) >> 8; r3__
= ((s1) >> 8) & 0xff00ff; do { t__ = ((r2__) &
0xff00ff) * ((a1)); t__ += 0x800080; r2__ = (t__ + ((t__ >>
8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff; } while
(0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r2__ = (t__ & 0xff00ff); } while (0)
; (d) = r1__ | (r2__ << 8); } while (0); *dst = convert_8888_to_0565
(d); } dst++; if (a2 == 0xff) { *dst = convert_8888_to_0565 (
s2); } else if (s2) { d = convert_0565_to_8888 (*dst); s2 = convert_8888_to_8888
(s2); a2 ^= 0xff; do { uint32_t r1__, r2__, r3__, t__; r1__ =
(d); r2__ = (s2) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff
) * ((a2)); t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) &
0xff00ff)) >> 8; r1__ &= 0xff00ff; } while (0); do
{ t__ = ((r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >>
8) & 0xff00ff); r1__ = (t__ & 0xff00ff); } while (0)
; r2__ = (d) >> 8; r3__ = ((s2) >> 8) & 0xff00ff
; do { t__ = ((r2__) & 0xff00ff) * ((a2)); t__ += 0x800080
; r2__ = (t__ + ((t__ >> 8) & 0xff00ff)) >> 8
; r2__ &= 0xff00ff; } while (0); do { t__ = ((r2__) + (r3__
)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff); r2__
= (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__ <<
8); } while (0); *dst = convert_8888_to_0565 (d); } dst++; }
else { *dst++ = convert_8888_to_0565 (s1); *dst++ = convert_8888_to_0565
(s2); } } if (w & 1) { x1 = ((int) ((vx) >> 16)); s1
= *(src + x1); if (PIXMAN_OP_OVER == PIXMAN_OP_OVER) { a1 = (
(s1) >> 24); if (a1 == 0xff) { *dst = convert_8888_to_0565
(s1); } else if (s1) { d = convert_0565_to_8888 (*dst); s1 =
convert_8888_to_8888 (s1); a1 ^= 0xff; do { uint32_t r1__, r2__
, r3__, t__; r1__ = (d); r2__ = (s1) & 0xff00ff; do { t__
= ((r1__) & 0xff00ff) * ((a1)); t__ += 0x800080; r1__ = (
t__ + ((t__ >> 8) & 0xff00ff)) >> 8; r1__ &=
0xff00ff; } while (0); do { t__ = ((r1__) + (r2__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r1__ = (t__ & 0xff00ff
); } while (0); r2__ = (d) >> 8; r3__ = ((s1) >> 8
) & 0xff00ff; do { t__ = ((r2__) & 0xff00ff) * ((a1))
; t__ += 0x800080; r2__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r2__ &= 0xff00ff; } while (0); do { t__ = (
(r2__) + (r3__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r2__ = (t__ & 0xff00ff); } while (0); (d) = r1__ | (r2__
<< 8); } while (0); *dst = convert_8888_to_0565 (d); }
dst++; } else { *dst++ = convert_8888_to_0565 (s1); } } } static
__inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
( const uint8_t *mask, uint16_t *dst, const uint32_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_8888_565_normal_OVER
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_8888_565_normal_OVER (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint32_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint32_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_first_line) = ((uint32_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL) { max_vy =
((pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NORMAL == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NORMAL
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NORMAL ==
PIXMAN_REPEAT_NONE) { static const uint32_t zero[1] = { 0 };
if (y < 0 || y >= src_image->bits.height) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_8888_565_normal_OVER_8888_565_normal_OVER_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1205
1206#define REPEAT_MIN_WIDTH32 32
1207
1208static void
1209fast_composite_tiled_repeat (pixman_implementation_t *imp,
1210 pixman_composite_info_t *info)
1211{
1212 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
1213 pixman_composite_func_t func;
1214 pixman_format_code_t mask_format;
1215 uint32_t src_flags, mask_flags;
1216 int32_t sx, sy;
1217 int32_t width_remain;
1218 int32_t num_pixels;
1219 int32_t src_width;
1220 int32_t i, j;
1221 pixman_image_t extended_src_image;
1222 uint32_t extended_src[REPEAT_MIN_WIDTH32 * 2];
1223 pixman_bool_t need_src_extension;
1224 uint32_t *src_line;
1225 int32_t src_stride;
1226 int32_t src_bpp;
1227 pixman_composite_info_t info2 = *info;
1228
1229 src_flags = (info->src_flags & ~FAST_PATH_NORMAL_REPEAT((1 << 15) | (1 << 3) | (1 << 4))) |
1230 FAST_PATH_SAMPLES_COVER_CLIP_NEAREST(1 << 23);
1231
1232 if (mask_image)
1
Assuming 'mask_image' is null
2
Taking false branch
1233 {
1234 mask_format = mask_image->common.extended_format_code;
1235 mask_flags = info->mask_flags;
1236 }
1237 else
1238 {
1239 mask_format = PIXMAN_null(((0) << 24) | ((0) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
;
1240 mask_flags = FAST_PATH_IS_OPAQUE(1 << 13);
1241 }
1242
1243 _pixman_implementation_lookup_composite (
1244 imp->toplevel, info->op,
1245 src_image->common.extended_format_code, src_flags,
1246 mask_format, mask_flags,
1247 dest_image->common.extended_format_code, info->dest_flags,
1248 &imp, &func);
1249
1250 src_bpp = PIXMAN_FORMAT_BPP (src_image->bits.format)(((src_image->bits.format >> (24)) & ((1 <<
(8)) - 1)) << ((src_image->bits.format >> 22)
& 3))
;
1251
1252 if (src_image->bits.width < REPEAT_MIN_WIDTH32 &&
3
Assuming field 'width' is < REPEAT_MIN_WIDTH
6
Taking true branch
1253 (src_bpp == 32 || src_bpp == 16 || src_bpp == 8) &&
4
Assuming 'src_bpp' is equal to 32
1254 !src_image->bits.indexed)
5
Assuming field 'indexed' is null
1255 {
1256 sx = src_x;
1257 sx = MOD (sx, src_image->bits.width)((sx) < 0 ? ((src_image->bits.width) - ((-(sx) - 1) % (
src_image->bits.width))) - 1 : (sx) % (src_image->bits.
width))
;
7
Assuming 'sx' is < 0
8
'?' condition is true
1258 sx += width;
1259 src_width = 0;
9
The value 0 is assigned to 'src_width'
1260
1261 while (src_width
9.1
'src_width' is < REPEAT_MIN_WIDTH
< REPEAT_MIN_WIDTH32 && src_width <= sx)
10
Assuming 'src_width' is > 'sx'
11
Loop condition is false. Execution continues on line 1264
1262 src_width += src_image->bits.width;
1263
1264 src_stride = (src_width * (src_bpp >> 3) + 3) / (int) sizeof (uint32_t);
1265
1266 /* Initialize/validate stack-allocated temporary image */
1267 _pixman_bits_image_init (&extended_src_image, src_image->bits.format,
1268 src_width, 1, &extended_src[0], src_stride,
1269 FALSE0);
1270 _pixman_image_validate (&extended_src_image);
1271
1272 info2.src_image = &extended_src_image;
1273 need_src_extension = TRUE1;
1274 }
1275 else
1276 {
1277 src_width = src_image->bits.width;
1278 need_src_extension = FALSE0;
1279 }
1280
1281 sx = src_x;
1282 sy = src_y;
1283
1284 while (--height >= 0)
12
Assuming the condition is true
1285 {
1286 sx = MOD (sx, src_width)((sx) < 0 ? ((src_width) - ((-(sx) - 1) % (src_width))) - 1
: (sx) % (src_width))
;
13
Loop condition is true. Entering loop body
14
'?' condition is true
15
Division by zero
1287 sy = MOD (sy, src_image->bits.height)((sy) < 0 ? ((src_image->bits.height) - ((-(sy) - 1) % (
src_image->bits.height))) - 1 : (sy) % (src_image->bits
.height))
;
1288
1289 if (need_src_extension)
1290 {
1291 if (src_bpp == 32)
1292 {
1293 PIXMAN_IMAGE_GET_LINE (src_image, 0, sy, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (sy)
+ (1) * (0); } while (0)
;
1294
1295 for (i = 0; i < src_width; )
1296 {
1297 for (j = 0; j < src_image->bits.width; j++, i++)
1298 extended_src[i] = src_line[j];
1299 }
1300 }
1301 else if (src_bpp == 16)
1302 {
1303 uint16_t *src_line_16;
1304
1305 PIXMAN_IMAGE_GET_LINE (src_image, 0, sy, uint16_t, src_stride,do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_line_16) = ((uint16_t *) __bits__) + (src_stride) * (
sy) + (1) * (0); } while (0)
1306 src_line_16, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_line_16) = ((uint16_t *) __bits__) + (src_stride) * (
sy) + (1) * (0); } while (0)
;
1307 src_line = (uint32_t*)src_line_16;
1308
1309 for (i = 0; i < src_width; )
1310 {
1311 for (j = 0; j < src_image->bits.width; j++, i++)
1312 ((uint16_t*)extended_src)[i] = ((uint16_t*)src_line)[j];
1313 }
1314 }
1315 else if (src_bpp == 8)
1316 {
1317 uint8_t *src_line_8;
1318
1319 PIXMAN_IMAGE_GET_LINE (src_image, 0, sy, uint8_t, src_stride,do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line_8) = ((uint8_t *) __bits__) + (src_stride) * (sy
) + (1) * (0); } while (0)
1320 src_line_8, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line_8) = ((uint8_t *) __bits__) + (src_stride) * (sy
) + (1) * (0); } while (0)
;
1321 src_line = (uint32_t*)src_line_8;
1322
1323 for (i = 0; i < src_width; )
1324 {
1325 for (j = 0; j < src_image->bits.width; j++, i++)
1326 ((uint8_t*)extended_src)[i] = ((uint8_t*)src_line)[j];
1327 }
1328 }
1329
1330 info2.src_y = 0;
1331 }
1332 else
1333 {
1334 info2.src_y = sy;
1335 }
1336
1337 width_remain = width;
1338
1339 while (width_remain > 0)
1340 {
1341 num_pixels = src_width - sx;
1342
1343 if (num_pixels > width_remain)
1344 num_pixels = width_remain;
1345
1346 info2.src_x = sx;
1347 info2.width = num_pixels;
1348 info2.height = 1;
1349
1350 func (imp, &info2);
1351
1352 width_remain -= num_pixels;
1353 info2.mask_x += num_pixels;
1354 info2.dest_x += num_pixels;
1355 sx = 0;
1356 }
1357
1358 sx = src_x;
1359 sy++;
1360 info2.mask_x = info->mask_x;
1361 info2.mask_y++;
1362 info2.dest_x = info->dest_x;
1363 info2.dest_y++;
1364 }
1365
1366 if (need_src_extension)
1367 _pixman_image_fini (&extended_src_image);
1368}
1369
1370/* Use more unrolling for src_0565_0565 because it is typically CPU bound */
1371static force_inline__inline__ __attribute__ ((__always_inline__)) void
1372scaled_nearest_scanline_565_565_SRC (uint16_t * dst,
1373 const uint16_t * src,
1374 int32_t w,
1375 pixman_fixed_t vx,
1376 pixman_fixed_t unit_x,
1377 pixman_fixed_t max_vx,
1378 pixman_bool_t fully_transparent_src)
1379{
1380 uint16_t tmp1, tmp2, tmp3, tmp4;
1381 while ((w -= 4) >= 0)
1382 {
1383 tmp1 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1384 vx += unit_x;
1385 tmp2 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1386 vx += unit_x;
1387 tmp3 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1388 vx += unit_x;
1389 tmp4 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1390 vx += unit_x;
1391 *dst++ = tmp1;
1392 *dst++ = tmp2;
1393 *dst++ = tmp3;
1394 *dst++ = tmp4;
1395 }
1396 if (w & 2)
1397 {
1398 tmp1 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1399 vx += unit_x;
1400 tmp2 = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1401 vx += unit_x;
1402 *dst++ = tmp1;
1403 *dst++ = tmp2;
1404 }
1405 if (w & 1)
1406 *dst = *(src + pixman_fixed_to_int (vx)((int) ((vx) >> 16)));
1407}
1408
1409FAST_NEAREST_MAINLOOP (565_565_cover_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1410 scaled_nearest_scanline_565_565_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1411 uint16_t, uint16_t, COVER)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_cover_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (-1 == PIXMAN_REPEAT_NORMAL) { max_vy = ((pixman_fixed_t
) ((uint32_t) (src_image->bits.height) << 16)); repeat
(PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed); repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); } if (-1 == PIXMAN_REPEAT_PAD || -1 == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (-1 == PIXMAN_REPEAT_NORMAL) repeat (PIXMAN_REPEAT_NORMAL
, &vy, max_vy); if (-1 == PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD
, &y, src_image->bits.height); src = src_first_line + src_stride
* y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (-1 == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_cover_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1412FAST_NEAREST_MAINLOOP (565_565_none_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_none_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1413 scaled_nearest_scanline_565_565_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_none_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1414 uint16_t, uint16_t, NONE)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_none_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NORMAL
) repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_NONE
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_NONE == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_none_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1415FAST_NEAREST_MAINLOOP (565_565_pad_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1416 scaled_nearest_scanline_565_565_SRC,static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1417 uint16_t, uint16_t, PAD)static __inline__ __attribute__ ((__always_inline__)) void scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
( const uint8_t *mask, uint16_t *dst, const uint16_t *src, int32_t
w, pixman_fixed_t vx, pixman_fixed_t unit_x, pixman_fixed_t max_vx
, pixman_bool_t fully_transparent_src) { scaled_nearest_scanline_565_565_SRC
(dst, src, w, vx, unit_x, max_vx, fully_transparent_src); } static
void fast_composite_scaled_nearest_565_565_pad_SRC (pixman_implementation_t
*imp, pixman_composite_info_t *info) { __attribute__((unused
)) pixman_op_t op = info->op; __attribute__((unused)) pixman_image_t
* src_image = info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint8_t
*mask_line; uint16_t *src_first_line; int y; pixman_fixed_t src_width_fixed
= ((pixman_fixed_t) ((uint32_t) (src_image->bits.width) <<
16)); pixman_fixed_t max_vy; pixman_vector_t v; pixman_fixed_t
vx, vy; pixman_fixed_t unit_x, unit_y; int32_t left_pad, right_pad
; uint16_t *src; uint16_t *dst; uint8_t solid_mask; const uint8_t
*mask = &solid_mask; int src_stride, mask_stride, dst_stride
; do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); if (0) { if (0) solid_mask
= _pixman_image_get_solid (imp, mask_image, dest_image->bits
.format); else do { uint32_t *__bits__; int __stride__; __bits__
= mask_image->bits.bits; __stride__ = mask_image->bits
.rowstride; (mask_stride) = __stride__ * (int) sizeof (uint32_t
) / (int) sizeof (uint8_t); (mask_line) = ((uint8_t *) __bits__
) + (mask_stride) * (mask_y) + (1) * (mask_x); } while (0); }
do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_first_line) = ((uint16_t *) __bits__) + (src_stride) *
(0) + (1) * (0); } while (0); v.vector[0] = ((pixman_fixed_t
) ((uint32_t) (src_x) << 16)) + (((pixman_fixed_t) ((uint32_t
) (1) << 16))) / 2; v.vector[1] = ((pixman_fixed_t) ((uint32_t
) (src_y) << 16)) + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2; v.vector[2] = (((pixman_fixed_t) ((uint32_t) (1) <<
16))); if (!_moz_pixman_transform_point_3d (src_image->common
.transform, &v)) return; unit_x = src_image->common.transform
->matrix[0][0]; unit_y = src_image->common.transform->
matrix[1][1]; v.vector[0] -= ((pixman_fixed_t) 1); v.vector[1
] -= ((pixman_fixed_t) 1); vx = v.vector[0]; vy = v.vector[1]
; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL) { max_vy = (
(pixman_fixed_t) ((uint32_t) (src_image->bits.height) <<
16)); repeat (PIXMAN_REPEAT_NORMAL, &vx, src_width_fixed
); repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); } if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD || PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { pad_repeat_get_scanline_bounds (src_image->bits.width,
vx, unit_x, &width, &left_pad, &right_pad); vx +=
left_pad * unit_x; } while (--height >= 0) { dst = dst_line
; dst_line += dst_stride; if (0 && !0) { mask = mask_line
; mask_line += mask_stride; } y = ((int) ((vy) >> 16));
vy += unit_y; if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NORMAL)
repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); if (PIXMAN_REPEAT_PAD
== PIXMAN_REPEAT_PAD) { repeat (PIXMAN_REPEAT_PAD, &y, src_image
->bits.height); src = src_first_line + src_stride * y; if (
left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width - src_image->bits
.width + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 0); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, src
+ src_image->bits.width, right_pad, -((pixman_fixed_t) 1)
, 0, src_width_fixed, 0); } } else if (PIXMAN_REPEAT_PAD == PIXMAN_REPEAT_NONE
) { static const uint16_t zero[1] = { 0 }; if (y < 0 || y >=
src_image->bits.height) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad + width + right_pad, -((pixman_fixed_t
) 1), 0, src_width_fixed, 1); continue; } src = src_first_line
+ src_stride * y; if (left_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, zero + 1, left_pad, -((pixman_fixed_t) 1), 0, src_width_fixed
, 1); } if (width > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad), dst + left_pad, src + src_image->
bits.width, width, vx - src_width_fixed, unit_x, src_width_fixed
, 0); } if (right_pad > 0) { scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask + (0 ? 0 : left_pad + width), dst + left_pad + width, zero
+ 1, right_pad, -((pixman_fixed_t) 1), 0, src_width_fixed, 1
); } } else { src = src_first_line + src_stride * y; scaled_nearest_scanline_565_565_SRC_565_565_pad_SRC_wrapper
(mask, dst, src + src_image->bits.width, width, vx - src_width_fixed
, unit_x, src_width_fixed, 0); } } }
1418
1419static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
1420fetch_nearest (pixman_repeat_t src_repeat,
1421 pixman_format_code_t format,
1422 uint32_t *src, int x, int src_width)
1423{
1424 if (repeat (src_repeat, &x, src_width))
1425 {
1426 if (format == PIXMAN_x8r8g8b8 || format == PIXMAN_x8b8g8r8)
1427 return *(src + x) | 0xff000000;
1428 else
1429 return *(src + x);
1430 }
1431 else
1432 {
1433 return 0;
1434 }
1435}
1436
1437static force_inline__inline__ __attribute__ ((__always_inline__)) void
1438combine_over (uint32_t s, uint32_t *dst)
1439{
1440 if (s)
1441 {
1442 uint8_t ia = 0xff - (s >> 24);
1443
1444 if (ia)
1445 UN8x4_MUL_UN8_ADD_UN8x4 (*dst, ia, s)do { uint32_t r1__, r2__, r3__, t__; r1__ = (*dst); r2__ = (s
) & 0xff00ff; do { t__ = ((r1__) & 0xff00ff) * ((ia))
; t__ += 0x800080; r1__ = (t__ + ((t__ >> 8) & 0xff00ff
)) >> 8; r1__ &= 0xff00ff; } while (0); do { t__ = (
(r1__) + (r2__)); t__ |= 0x1000100 - ((t__ >> 8) & 0xff00ff
); r1__ = (t__ & 0xff00ff); } while (0); r2__ = (*dst) >>
8; r3__ = ((s) >> 8) & 0xff00ff; do { t__ = ((r2__
) & 0xff00ff) * ((ia)); t__ += 0x800080; r2__ = (t__ + ((
t__ >> 8) & 0xff00ff)) >> 8; r2__ &= 0xff00ff
; } while (0); do { t__ = ((r2__) + (r3__)); t__ |= 0x1000100
- ((t__ >> 8) & 0xff00ff); r2__ = (t__ & 0xff00ff
); } while (0); (*dst) = r1__ | (r2__ << 8); } while (0
)
;
1446 else
1447 *dst = s;
1448 }
1449}
1450
1451static force_inline__inline__ __attribute__ ((__always_inline__)) void
1452combine_src (uint32_t s, uint32_t *dst)
1453{
1454 *dst = s;
1455}
1456
1457static void
1458fast_composite_scaled_nearest (pixman_implementation_t *imp,
1459 pixman_composite_info_t *info)
1460{
1461 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
;
1462 uint32_t *dst_line;
1463 uint32_t *src_line;
1464 int dst_stride, src_stride;
1465 int src_width, src_height;
1466 pixman_repeat_t src_repeat;
1467 pixman_fixed_t unit_x, unit_y;
1468 pixman_format_code_t src_format;
1469 pixman_vector_t v;
1470 pixman_fixed_t vy;
1471
1472 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
;
1473 /* pass in 0 instead of src_x and src_y because src_x and src_y need to be
1474 * transformed from destination space to source space
1475 */
1476 PIXMAN_IMAGE_GET_LINE (src_image, 0, 0, uint32_t, src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (0) +
(1) * (0); } while (0)
;
1477
1478 /* reference point is the center of the pixel */
1479 v.vector[0] = pixman_int_to_fixed (src_x)((pixman_fixed_t) ((uint32_t) (src_x) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
1480 v.vector[1] = pixman_int_to_fixed (src_y)((pixman_fixed_t) ((uint32_t) (src_y) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
1481 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
1482
1483 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (src_image->common.transform, &v))
1484 return;
1485
1486 unit_x = src_image->common.transform->matrix[0][0];
1487 unit_y = src_image->common.transform->matrix[1][1];
1488
1489 /* Round down to closest integer, ensuring that 0.5 rounds to 0, not 1 */
1490 v.vector[0] -= pixman_fixed_e((pixman_fixed_t) 1);
1491 v.vector[1] -= pixman_fixed_e((pixman_fixed_t) 1);
1492
1493 src_height = src_image->bits.height;
1494 src_width = src_image->bits.width;
1495 src_repeat = src_image->common.repeat;
1496 src_format = src_image->bits.format;
1497
1498 vy = v.vector[1];
1499 while (height--)
1500 {
1501 pixman_fixed_t vx = v.vector[0];
1502 int y = pixman_fixed_to_int (vy)((int) ((vy) >> 16));
1503 uint32_t *dst = dst_line;
1504
1505 dst_line += dst_stride;
1506
1507 /* adjust the y location by a unit vector in the y direction
1508 * this is equivalent to transforming y+1 of the destination point to source space */
1509 vy += unit_y;
1510
1511 if (!repeat (src_repeat, &y, src_height))
1512 {
1513 if (op == PIXMAN_OP_SRC)
1514 memset (dst, 0, sizeof (*dst) * width);
1515 }
1516 else
1517 {
1518 int w = width;
1519
1520 uint32_t *src = src_line + y * src_stride;
1521
1522 while (w >= 2)
1523 {
1524 uint32_t s1, s2;
1525 int x1, x2;
1526
1527 x1 = pixman_fixed_to_int (vx)((int) ((vx) >> 16));
1528 vx += unit_x;
1529
1530 x2 = pixman_fixed_to_int (vx)((int) ((vx) >> 16));
1531 vx += unit_x;
1532
1533 w -= 2;
1534
1535 s1 = fetch_nearest (src_repeat, src_format, src, x1, src_width);
1536 s2 = fetch_nearest (src_repeat, src_format, src, x2, src_width);
1537
1538 if (op == PIXMAN_OP_OVER)
1539 {
1540 combine_over (s1, dst++);
1541 combine_over (s2, dst++);
1542 }
1543 else
1544 {
1545 combine_src (s1, dst++);
1546 combine_src (s2, dst++);
1547 }
1548 }
1549
1550 while (w--)
1551 {
1552 uint32_t s;
1553 int x;
1554
1555 x = pixman_fixed_to_int (vx)((int) ((vx) >> 16));
1556 vx += unit_x;
1557
1558 s = fetch_nearest (src_repeat, src_format, src, x, src_width);
1559
1560 if (op == PIXMAN_OP_OVER)
1561 combine_over (s, dst++);
1562 else
1563 combine_src (s, dst++);
1564 }
1565 }
1566 }
1567}
1568
1569#define CACHE_LINE_SIZE64 64
1570
1571#define FAST_SIMPLE_ROTATE(suffix, pix_type)static void blt_rotated_90_trivial_suffix (pix_type *dst, int
dst_stride, const pix_type *src, int src_stride, int w, int h
) { int x, y; for (y = 0; y < h; y++) { const pix_type *s =
src + (h - y - 1); pix_type *d = dst + dst_stride * y; for (
x = 0; x < w; x++) { *d++ = *s; s += src_stride; } } } static
void blt_rotated_270_trivial_suffix (pix_type *dst, int dst_stride
, const pix_type *src, int src_stride, int w, int h) { int x,
y; for (y = 0; y < h; y++) { const pix_type *s = src + src_stride
* (w - 1) + y; pix_type *d = dst + dst_stride * y; for (x = 0
; x < w; x++) { *d++ = *s; s -= src_stride; } } } static void
blt_rotated_90_suffix (pix_type *dst, int dst_stride, const pix_type
*src, int src_stride, int W, int H) { int x; int leading_pixels
= 0, trailing_pixels = 0; const int TILE_SIZE = 64 / sizeof(
pix_type); if ((uintptr_t)dst & (64 - 1)) { leading_pixels
= TILE_SIZE - (((uintptr_t)dst & (64 - 1)) / sizeof(pix_type
)); if (leading_pixels > W) leading_pixels = W; blt_rotated_90_trivial_suffix
( dst, dst_stride, src, src_stride, leading_pixels, H); dst +=
leading_pixels; src += leading_pixels * src_stride; W -= leading_pixels
; } if ((uintptr_t)(dst + W) & (64 - 1)) { trailing_pixels
= (((uintptr_t)(dst + W) & (64 - 1)) / sizeof(pix_type))
; if (trailing_pixels > W) trailing_pixels = W; W -= trailing_pixels
; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_90_trivial_suffix
( dst + x, dst_stride, src + src_stride * x, src_stride, TILE_SIZE
, H); } if (trailing_pixels) { blt_rotated_90_trivial_suffix (
dst + W, dst_stride, src + W * src_stride, src_stride, trailing_pixels
, H); } } static void blt_rotated_270_suffix (pix_type *dst, int
dst_stride, const pix_type *src, int src_stride, int W, int H
) { int x; int leading_pixels = 0, trailing_pixels = 0; const
int TILE_SIZE = 64 / sizeof(pix_type); if ((uintptr_t)dst &
(64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t)dst &
(64 - 1)) / sizeof(pix_type)); if (leading_pixels > W) leading_pixels
= W; blt_rotated_270_trivial_suffix ( dst, dst_stride, src +
src_stride * (W - leading_pixels), src_stride, leading_pixels
, H); dst += leading_pixels; W -= leading_pixels; } if ((uintptr_t
)(dst + W) & (64 - 1)) { trailing_pixels = (((uintptr_t)(
dst + W) & (64 - 1)) / sizeof(pix_type)); if (trailing_pixels
> W) trailing_pixels = W; W -= trailing_pixels; src += trailing_pixels
* src_stride; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_270_trivial_suffix
( dst + x, dst_stride, src + src_stride * (W - x - TILE_SIZE
), src_stride, TILE_SIZE, H); } if (trailing_pixels) { blt_rotated_270_trivial_suffix
( dst + W, dst_stride, src - trailing_pixels * src_stride, src_stride
, trailing_pixels, H); } } static void fast_composite_rotate_90_suffix
(pixman_implementation_t *imp, pixman_composite_info_t *info
) { __attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height; pix_type *dst_line; pix_type *src_line; int dst_stride
, src_stride; int src_x_t, src_y_t; do { uint32_t *__bits__; int
__stride__; __bits__ = dest_image->bits.bits; __stride__ =
dest_image->bits.rowstride; (dst_stride) = __stride__ * (
int) sizeof (uint32_t) / (int) sizeof (pix_type); (dst_line) =
((pix_type *) __bits__) + (dst_stride) * (dest_y) + (1) * (dest_x
); } while (0); src_x_t = -src_y + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[0][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)) - height; src_y_t = src_x + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[1][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)); do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_90_suffix (dst_line
, dst_stride, src_line, src_stride, width, height); } static void
fast_composite_rotate_270_suffix (pixman_implementation_t *imp
, pixman_composite_info_t *info) { __attribute__((unused)) pixman_op_t
op = info->op; __attribute__((unused)) pixman_image_t * src_image
= info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; pix_type *dst_line; pix_type
*src_line; int dst_stride, src_stride; int src_x_t, src_y_t;
do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(pix_type); (dst_line) = ((pix_type *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); src_x_t = src_y +
((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16)); src_y_t = -
src_x + ((int) (((pixman_fixed_48_16_t) src_image->common.
transform->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (
1) << 16))) / 2 - ((pixman_fixed_t) 1)) >> 16)) -
width; do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_270_suffix (dst_line
, dst_stride, src_line, src_stride, width, height); }
\
1572 \
1573static void \
1574blt_rotated_90_trivial_##suffix (pix_type *dst, \
1575 int dst_stride, \
1576 const pix_type *src, \
1577 int src_stride, \
1578 int w, \
1579 int h) \
1580{ \
1581 int x, y; \
1582 for (y = 0; y < h; y++) \
1583 { \
1584 const pix_type *s = src + (h - y - 1); \
1585 pix_type *d = dst + dst_stride * y; \
1586 for (x = 0; x < w; x++) \
1587 { \
1588 *d++ = *s; \
1589 s += src_stride; \
1590 } \
1591 } \
1592} \
1593 \
1594static void \
1595blt_rotated_270_trivial_##suffix (pix_type *dst, \
1596 int dst_stride, \
1597 const pix_type *src, \
1598 int src_stride, \
1599 int w, \
1600 int h) \
1601{ \
1602 int x, y; \
1603 for (y = 0; y < h; y++) \
1604 { \
1605 const pix_type *s = src + src_stride * (w - 1) + y; \
1606 pix_type *d = dst + dst_stride * y; \
1607 for (x = 0; x < w; x++) \
1608 { \
1609 *d++ = *s; \
1610 s -= src_stride; \
1611 } \
1612 } \
1613} \
1614 \
1615static void \
1616blt_rotated_90_##suffix (pix_type *dst, \
1617 int dst_stride, \
1618 const pix_type *src, \
1619 int src_stride, \
1620 int W, \
1621 int H) \
1622{ \
1623 int x; \
1624 int leading_pixels = 0, trailing_pixels = 0; \
1625 const int TILE_SIZE = CACHE_LINE_SIZE64 / sizeof(pix_type); \
1626 \
1627 /* \
1628 * split processing into handling destination as TILE_SIZExH cache line \
1629 * aligned vertical stripes (optimistically assuming that destination \
1630 * stride is a multiple of cache line, if not - it will be just a bit \
1631 * slower) \
1632 */ \
1633 \
1634 if ((uintptr_t)dst & (CACHE_LINE_SIZE64 - 1)) \
1635 { \
1636 leading_pixels = TILE_SIZE - (((uintptr_t)dst & \
1637 (CACHE_LINE_SIZE64 - 1)) / sizeof(pix_type)); \
1638 if (leading_pixels > W) \
1639 leading_pixels = W; \
1640 \
1641 /* unaligned leading part NxH (where N < TILE_SIZE) */ \
1642 blt_rotated_90_trivial_##suffix ( \
1643 dst, \
1644 dst_stride, \
1645 src, \
1646 src_stride, \
1647 leading_pixels, \
1648 H); \
1649 \
1650 dst += leading_pixels; \
1651 src += leading_pixels * src_stride; \
1652 W -= leading_pixels; \
1653 } \
1654 \
1655 if ((uintptr_t)(dst + W) & (CACHE_LINE_SIZE64 - 1)) \
1656 { \
1657 trailing_pixels = (((uintptr_t)(dst + W) & \
1658 (CACHE_LINE_SIZE64 - 1)) / sizeof(pix_type)); \
1659 if (trailing_pixels > W) \
1660 trailing_pixels = W; \
1661 W -= trailing_pixels; \
1662 } \
1663 \
1664 for (x = 0; x < W; x += TILE_SIZE) \
1665 { \
1666 /* aligned middle part TILE_SIZExH */ \
1667 blt_rotated_90_trivial_##suffix ( \
1668 dst + x, \
1669 dst_stride, \
1670 src + src_stride * x, \
1671 src_stride, \
1672 TILE_SIZE, \
1673 H); \
1674 } \
1675 \
1676 if (trailing_pixels) \
1677 { \
1678 /* unaligned trailing part NxH (where N < TILE_SIZE) */ \
1679 blt_rotated_90_trivial_##suffix ( \
1680 dst + W, \
1681 dst_stride, \
1682 src + W * src_stride, \
1683 src_stride, \
1684 trailing_pixels, \
1685 H); \
1686 } \
1687} \
1688 \
1689static void \
1690blt_rotated_270_##suffix (pix_type *dst, \
1691 int dst_stride, \
1692 const pix_type *src, \
1693 int src_stride, \
1694 int W, \
1695 int H) \
1696{ \
1697 int x; \
1698 int leading_pixels = 0, trailing_pixels = 0; \
1699 const int TILE_SIZE = CACHE_LINE_SIZE64 / sizeof(pix_type); \
1700 \
1701 /* \
1702 * split processing into handling destination as TILE_SIZExH cache line \
1703 * aligned vertical stripes (optimistically assuming that destination \
1704 * stride is a multiple of cache line, if not - it will be just a bit \
1705 * slower) \
1706 */ \
1707 \
1708 if ((uintptr_t)dst & (CACHE_LINE_SIZE64 - 1)) \
1709 { \
1710 leading_pixels = TILE_SIZE - (((uintptr_t)dst & \
1711 (CACHE_LINE_SIZE64 - 1)) / sizeof(pix_type)); \
1712 if (leading_pixels > W) \
1713 leading_pixels = W; \
1714 \
1715 /* unaligned leading part NxH (where N < TILE_SIZE) */ \
1716 blt_rotated_270_trivial_##suffix ( \
1717 dst, \
1718 dst_stride, \
1719 src + src_stride * (W - leading_pixels), \
1720 src_stride, \
1721 leading_pixels, \
1722 H); \
1723 \
1724 dst += leading_pixels; \
1725 W -= leading_pixels; \
1726 } \
1727 \
1728 if ((uintptr_t)(dst + W) & (CACHE_LINE_SIZE64 - 1)) \
1729 { \
1730 trailing_pixels = (((uintptr_t)(dst + W) & \
1731 (CACHE_LINE_SIZE64 - 1)) / sizeof(pix_type)); \
1732 if (trailing_pixels > W) \
1733 trailing_pixels = W; \
1734 W -= trailing_pixels; \
1735 src += trailing_pixels * src_stride; \
1736 } \
1737 \
1738 for (x = 0; x < W; x += TILE_SIZE) \
1739 { \
1740 /* aligned middle part TILE_SIZExH */ \
1741 blt_rotated_270_trivial_##suffix ( \
1742 dst + x, \
1743 dst_stride, \
1744 src + src_stride * (W - x - TILE_SIZE), \
1745 src_stride, \
1746 TILE_SIZE, \
1747 H); \
1748 } \
1749 \
1750 if (trailing_pixels) \
1751 { \
1752 /* unaligned trailing part NxH (where N < TILE_SIZE) */ \
1753 blt_rotated_270_trivial_##suffix ( \
1754 dst + W, \
1755 dst_stride, \
1756 src - trailing_pixels * src_stride, \
1757 src_stride, \
1758 trailing_pixels, \
1759 H); \
1760 } \
1761} \
1762 \
1763static void \
1764fast_composite_rotate_90_##suffix (pixman_implementation_t *imp, \
1765 pixman_composite_info_t *info) \
1766{ \
1767 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
; \
1768 pix_type *dst_line; \
1769 pix_type *src_line; \
1770 int dst_stride, src_stride; \
1771 int src_x_t, src_y_t; \
1772 \
1773 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, pix_type, \do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(pix_type); (dst_line) = ((pix_type *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
1774 dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(pix_type); (dst_line) = ((pix_type *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
; \
1775 /* Round in pixman_fixed_48_16_t, to avoid overflows. Since \
1776 * matrix values are pixman_fixed_16_16_t, even if the value rounds \
1777 * up, it will still represent a value < 65537, and fit in an int. */ \
1778 src_x_t = -src_y + pixman_fixed_to_int ( \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1779 (pixman_fixed_48_16_t) \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1780 src_image->common.transform->matrix[0][2] + \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1781 pixman_fixed_1 / 2 - pixman_fixed_e)((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
- height;\
1782 src_y_t = src_x + pixman_fixed_to_int ( \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1783 (pixman_fixed_48_16_t) \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1784 src_image->common.transform->matrix[1][2] + \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1785 pixman_fixed_1 / 2 - pixman_fixed_e)((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
; \
1786 PIXMAN_IMAGE_GET_LINE (src_image, src_x_t, src_y_t, pix_type, \do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0)
1787 src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0)
; \
1788 blt_rotated_90_##suffix (dst_line, dst_stride, src_line, src_stride, \
1789 width, height); \
1790} \
1791 \
1792static void \
1793fast_composite_rotate_270_##suffix (pixman_implementation_t *imp, \
1794 pixman_composite_info_t *info) \
1795{ \
1796 PIXMAN_COMPOSITE_ARGS (info)__attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height
; \
1797 pix_type *dst_line; \
1798 pix_type *src_line; \
1799 int dst_stride, src_stride; \
1800 int src_x_t, src_y_t; \
1801 \
1802 PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, pix_type, \do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(pix_type); (dst_line) = ((pix_type *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
1803 dst_stride, dst_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(pix_type); (dst_line) = ((pix_type *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0)
; \
1804 /* Round in pixman_fixed_48_16_t, to avoid overflows. Since \
1805 * matrix values are pixman_fixed_16_16_t, even if the value rounds \
1806 * up, it will still represent a value < 65537, and fit in an int. */ \
1807 src_x_t = src_y + pixman_fixed_to_int ( \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1808 (pixman_fixed_48_16_t) \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1809 src_image->common.transform->matrix[0][2] + \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1810 pixman_fixed_1 / 2 - pixman_fixed_e)((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
; \
1811 src_y_t = -src_x + pixman_fixed_to_int ( \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1812 (pixman_fixed_48_16_t) \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1813 src_image->common.transform->matrix[1][2] + \((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
1814 pixman_fixed_1 / 2 - pixman_fixed_e)((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16))
- width; \
1815 PIXMAN_IMAGE_GET_LINE (src_image, src_x_t, src_y_t, pix_type, \do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0)
1816 src_stride, src_line, 1)do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (pix_type
); (src_line) = ((pix_type *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0)
; \
1817 blt_rotated_270_##suffix (dst_line, dst_stride, src_line, src_stride, \
1818 width, height); \
1819}
1820
1821FAST_SIMPLE_ROTATE (8, uint8_t)static void blt_rotated_90_trivial_8 (uint8_t *dst, int dst_stride
, const uint8_t *src, int src_stride, int w, int h) { int x, y
; for (y = 0; y < h; y++) { const uint8_t *s = src + (h - y
- 1); uint8_t *d = dst + dst_stride * y; for (x = 0; x < w
; x++) { *d++ = *s; s += src_stride; } } } static void blt_rotated_270_trivial_8
(uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride
, int w, int h) { int x, y; for (y = 0; y < h; y++) { const
uint8_t *s = src + src_stride * (w - 1) + y; uint8_t *d = dst
+ dst_stride * y; for (x = 0; x < w; x++) { *d++ = *s; s -=
src_stride; } } } static void blt_rotated_90_8 (uint8_t *dst
, int dst_stride, const uint8_t *src, int src_stride, int W, int
H) { int x; int leading_pixels = 0, trailing_pixels = 0; const
int TILE_SIZE = 64 / sizeof(uint8_t); if ((uintptr_t)dst &
(64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t)dst &
(64 - 1)) / sizeof(uint8_t)); if (leading_pixels > W) leading_pixels
= W; blt_rotated_90_trivial_8 ( dst, dst_stride, src, src_stride
, leading_pixels, H); dst += leading_pixels; src += leading_pixels
* src_stride; W -= leading_pixels; } if ((uintptr_t)(dst + W
) & (64 - 1)) { trailing_pixels = (((uintptr_t)(dst + W) &
(64 - 1)) / sizeof(uint8_t)); if (trailing_pixels > W) trailing_pixels
= W; W -= trailing_pixels; } for (x = 0; x < W; x += TILE_SIZE
) { blt_rotated_90_trivial_8 ( dst + x, dst_stride, src + src_stride
* x, src_stride, TILE_SIZE, H); } if (trailing_pixels) { blt_rotated_90_trivial_8
( dst + W, dst_stride, src + W * src_stride, src_stride, trailing_pixels
, H); } } static void blt_rotated_270_8 (uint8_t *dst, int dst_stride
, const uint8_t *src, int src_stride, int W, int H) { int x; int
leading_pixels = 0, trailing_pixels = 0; const int TILE_SIZE
= 64 / sizeof(uint8_t); if ((uintptr_t)dst & (64 - 1)) {
leading_pixels = TILE_SIZE - (((uintptr_t)dst & (64 - 1)
) / sizeof(uint8_t)); if (leading_pixels > W) leading_pixels
= W; blt_rotated_270_trivial_8 ( dst, dst_stride, src + src_stride
* (W - leading_pixels), src_stride, leading_pixels, H); dst +=
leading_pixels; W -= leading_pixels; } if ((uintptr_t)(dst +
W) & (64 - 1)) { trailing_pixels = (((uintptr_t)(dst + W
) & (64 - 1)) / sizeof(uint8_t)); if (trailing_pixels >
W) trailing_pixels = W; W -= trailing_pixels; src += trailing_pixels
* src_stride; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_270_trivial_8
( dst + x, dst_stride, src + src_stride * (W - x - TILE_SIZE
), src_stride, TILE_SIZE, H); } if (trailing_pixels) { blt_rotated_270_trivial_8
( dst + W, dst_stride, src - trailing_pixels * src_stride, src_stride
, trailing_pixels, H); } } static void fast_composite_rotate_90_8
(pixman_implementation_t *imp, pixman_composite_info_t *info
) { __attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height; uint8_t *dst_line; uint8_t *src_line; int dst_stride
, src_stride; int src_x_t, src_y_t; do { uint32_t *__bits__; int
__stride__; __bits__ = dest_image->bits.bits; __stride__ =
dest_image->bits.rowstride; (dst_stride) = __stride__ * (
int) sizeof (uint32_t) / (int) sizeof (uint8_t); (dst_line) =
((uint8_t *) __bits__) + (dst_stride) * (dest_y) + (1) * (dest_x
); } while (0); src_x_t = -src_y + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[0][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)) - height; src_y_t = src_x + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[1][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)); do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line) = ((uint8_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_90_8 (dst_line,
dst_stride, src_line, src_stride, width, height); } static void
fast_composite_rotate_270_8 (pixman_implementation_t *imp, pixman_composite_info_t
*info) { __attribute__((unused)) pixman_op_t op = info->op
; __attribute__((unused)) pixman_image_t * src_image = info->
src_image; __attribute__((unused)) pixman_image_t * mask_image
= info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint8_t *dst_line; uint8_t
*src_line; int dst_stride, src_stride; int src_x_t, src_y_t;
do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint8_t); (dst_line) = ((uint8_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); src_x_t = src_y +
((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16)); src_y_t = -
src_x + ((int) (((pixman_fixed_48_16_t) src_image->common.
transform->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (
1) << 16))) / 2 - ((pixman_fixed_t) 1)) >> 16)) -
width; do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint8_t
); (src_line) = ((uint8_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_270_8 (dst_line
, dst_stride, src_line, src_stride, width, height); }
1822FAST_SIMPLE_ROTATE (565, uint16_t)static void blt_rotated_90_trivial_565 (uint16_t *dst, int dst_stride
, const uint16_t *src, int src_stride, int w, int h) { int x,
y; for (y = 0; y < h; y++) { const uint16_t *s = src + (h
- y - 1); uint16_t *d = dst + dst_stride * y; for (x = 0; x <
w; x++) { *d++ = *s; s += src_stride; } } } static void blt_rotated_270_trivial_565
(uint16_t *dst, int dst_stride, const uint16_t *src, int src_stride
, int w, int h) { int x, y; for (y = 0; y < h; y++) { const
uint16_t *s = src + src_stride * (w - 1) + y; uint16_t *d = dst
+ dst_stride * y; for (x = 0; x < w; x++) { *d++ = *s; s -=
src_stride; } } } static void blt_rotated_90_565 (uint16_t *
dst, int dst_stride, const uint16_t *src, int src_stride, int
W, int H) { int x; int leading_pixels = 0, trailing_pixels =
0; const int TILE_SIZE = 64 / sizeof(uint16_t); if ((uintptr_t
)dst & (64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t
)dst & (64 - 1)) / sizeof(uint16_t)); if (leading_pixels >
W) leading_pixels = W; blt_rotated_90_trivial_565 ( dst, dst_stride
, src, src_stride, leading_pixels, H); dst += leading_pixels;
src += leading_pixels * src_stride; W -= leading_pixels; } if
((uintptr_t)(dst + W) & (64 - 1)) { trailing_pixels = ((
(uintptr_t)(dst + W) & (64 - 1)) / sizeof(uint16_t)); if (
trailing_pixels > W) trailing_pixels = W; W -= trailing_pixels
; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_90_trivial_565
( dst + x, dst_stride, src + src_stride * x, src_stride, TILE_SIZE
, H); } if (trailing_pixels) { blt_rotated_90_trivial_565 ( dst
+ W, dst_stride, src + W * src_stride, src_stride, trailing_pixels
, H); } } static void blt_rotated_270_565 (uint16_t *dst, int
dst_stride, const uint16_t *src, int src_stride, int W, int H
) { int x; int leading_pixels = 0, trailing_pixels = 0; const
int TILE_SIZE = 64 / sizeof(uint16_t); if ((uintptr_t)dst &
(64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t)dst &
(64 - 1)) / sizeof(uint16_t)); if (leading_pixels > W) leading_pixels
= W; blt_rotated_270_trivial_565 ( dst, dst_stride, src + src_stride
* (W - leading_pixels), src_stride, leading_pixels, H); dst +=
leading_pixels; W -= leading_pixels; } if ((uintptr_t)(dst +
W) & (64 - 1)) { trailing_pixels = (((uintptr_t)(dst + W
) & (64 - 1)) / sizeof(uint16_t)); if (trailing_pixels >
W) trailing_pixels = W; W -= trailing_pixels; src += trailing_pixels
* src_stride; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_270_trivial_565
( dst + x, dst_stride, src + src_stride * (W - x - TILE_SIZE
), src_stride, TILE_SIZE, H); } if (trailing_pixels) { blt_rotated_270_trivial_565
( dst + W, dst_stride, src - trailing_pixels * src_stride, src_stride
, trailing_pixels, H); } } static void fast_composite_rotate_90_565
(pixman_implementation_t *imp, pixman_composite_info_t *info
) { __attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height; uint16_t *dst_line; uint16_t *src_line; int dst_stride
, src_stride; int src_x_t, src_y_t; do { uint32_t *__bits__; int
__stride__; __bits__ = dest_image->bits.bits; __stride__ =
dest_image->bits.rowstride; (dst_stride) = __stride__ * (
int) sizeof (uint32_t) / (int) sizeof (uint16_t); (dst_line) =
((uint16_t *) __bits__) + (dst_stride) * (dest_y) + (1) * (dest_x
); } while (0); src_x_t = -src_y + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[0][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)) - height; src_y_t = src_x + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[1][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)); do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_line) = ((uint16_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_90_565 (dst_line
, dst_stride, src_line, src_stride, width, height); } static void
fast_composite_rotate_270_565 (pixman_implementation_t *imp,
pixman_composite_info_t *info) { __attribute__((unused)) pixman_op_t
op = info->op; __attribute__((unused)) pixman_image_t * src_image
= info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint16_t *dst_line; uint16_t
*src_line; int dst_stride, src_stride; int src_x_t, src_y_t;
do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint16_t); (dst_line) = ((uint16_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); src_x_t = src_y +
((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16)); src_y_t = -
src_x + ((int) (((pixman_fixed_48_16_t) src_image->common.
transform->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (
1) << 16))) / 2 - ((pixman_fixed_t) 1)) >> 16)) -
width; do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint16_t
); (src_line) = ((uint16_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_270_565 (dst_line
, dst_stride, src_line, src_stride, width, height); }
1823FAST_SIMPLE_ROTATE (8888, uint32_t)static void blt_rotated_90_trivial_8888 (uint32_t *dst, int dst_stride
, const uint32_t *src, int src_stride, int w, int h) { int x,
y; for (y = 0; y < h; y++) { const uint32_t *s = src + (h
- y - 1); uint32_t *d = dst + dst_stride * y; for (x = 0; x <
w; x++) { *d++ = *s; s += src_stride; } } } static void blt_rotated_270_trivial_8888
(uint32_t *dst, int dst_stride, const uint32_t *src, int src_stride
, int w, int h) { int x, y; for (y = 0; y < h; y++) { const
uint32_t *s = src + src_stride * (w - 1) + y; uint32_t *d = dst
+ dst_stride * y; for (x = 0; x < w; x++) { *d++ = *s; s -=
src_stride; } } } static void blt_rotated_90_8888 (uint32_t *
dst, int dst_stride, const uint32_t *src, int src_stride, int
W, int H) { int x; int leading_pixels = 0, trailing_pixels =
0; const int TILE_SIZE = 64 / sizeof(uint32_t); if ((uintptr_t
)dst & (64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t
)dst & (64 - 1)) / sizeof(uint32_t)); if (leading_pixels >
W) leading_pixels = W; blt_rotated_90_trivial_8888 ( dst, dst_stride
, src, src_stride, leading_pixels, H); dst += leading_pixels;
src += leading_pixels * src_stride; W -= leading_pixels; } if
((uintptr_t)(dst + W) & (64 - 1)) { trailing_pixels = ((
(uintptr_t)(dst + W) & (64 - 1)) / sizeof(uint32_t)); if (
trailing_pixels > W) trailing_pixels = W; W -= trailing_pixels
; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_90_trivial_8888
( dst + x, dst_stride, src + src_stride * x, src_stride, TILE_SIZE
, H); } if (trailing_pixels) { blt_rotated_90_trivial_8888 ( dst
+ W, dst_stride, src + W * src_stride, src_stride, trailing_pixels
, H); } } static void blt_rotated_270_8888 (uint32_t *dst, int
dst_stride, const uint32_t *src, int src_stride, int W, int H
) { int x; int leading_pixels = 0, trailing_pixels = 0; const
int TILE_SIZE = 64 / sizeof(uint32_t); if ((uintptr_t)dst &
(64 - 1)) { leading_pixels = TILE_SIZE - (((uintptr_t)dst &
(64 - 1)) / sizeof(uint32_t)); if (leading_pixels > W) leading_pixels
= W; blt_rotated_270_trivial_8888 ( dst, dst_stride, src + src_stride
* (W - leading_pixels), src_stride, leading_pixels, H); dst +=
leading_pixels; W -= leading_pixels; } if ((uintptr_t)(dst +
W) & (64 - 1)) { trailing_pixels = (((uintptr_t)(dst + W
) & (64 - 1)) / sizeof(uint32_t)); if (trailing_pixels >
W) trailing_pixels = W; W -= trailing_pixels; src += trailing_pixels
* src_stride; } for (x = 0; x < W; x += TILE_SIZE) { blt_rotated_270_trivial_8888
( dst + x, dst_stride, src + src_stride * (W - x - TILE_SIZE
), src_stride, TILE_SIZE, H); } if (trailing_pixels) { blt_rotated_270_trivial_8888
( dst + W, dst_stride, src - trailing_pixels * src_stride, src_stride
, trailing_pixels, H); } } static void fast_composite_rotate_90_8888
(pixman_implementation_t *imp, pixman_composite_info_t *info
) { __attribute__((unused)) pixman_op_t op = info->op; __attribute__
((unused)) pixman_image_t * src_image = info->src_image; __attribute__
((unused)) pixman_image_t * mask_image = info->mask_image;
__attribute__((unused)) pixman_image_t * dest_image = info->
dest_image; __attribute__((unused)) int32_t src_x = info->
src_x; __attribute__((unused)) int32_t src_y = info->src_y
; __attribute__((unused)) int32_t mask_x = info->mask_x; __attribute__
((unused)) int32_t mask_y = info->mask_y; __attribute__((unused
)) int32_t dest_x = info->dest_x; __attribute__((unused)) int32_t
dest_y = info->dest_y; __attribute__((unused)) int32_t width
= info->width; __attribute__((unused)) int32_t height = info
->height; uint32_t *dst_line; uint32_t *src_line; int dst_stride
, src_stride; int src_x_t, src_y_t; do { uint32_t *__bits__; int
__stride__; __bits__ = dest_image->bits.bits; __stride__ =
dest_image->bits.rowstride; (dst_stride) = __stride__ * (
int) sizeof (uint32_t) / (int) sizeof (uint32_t); (dst_line) =
((uint32_t *) __bits__) + (dst_stride) * (dest_y) + (1) * (dest_x
); } while (0); src_x_t = -src_y + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[0][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)) - height; src_y_t = src_x + ((int) (((pixman_fixed_48_16_t
) src_image->common.transform->matrix[1][2] + (((pixman_fixed_t
) ((uint32_t) (1) << 16))) / 2 - ((pixman_fixed_t) 1)) >>
16)); do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_90_8888 (dst_line
, dst_stride, src_line, src_stride, width, height); } static void
fast_composite_rotate_270_8888 (pixman_implementation_t *imp
, pixman_composite_info_t *info) { __attribute__((unused)) pixman_op_t
op = info->op; __attribute__((unused)) pixman_image_t * src_image
= info->src_image; __attribute__((unused)) pixman_image_t
* mask_image = info->mask_image; __attribute__((unused)) pixman_image_t
* dest_image = info->dest_image; __attribute__((unused)) int32_t
src_x = info->src_x; __attribute__((unused)) int32_t src_y
= info->src_y; __attribute__((unused)) int32_t mask_x = info
->mask_x; __attribute__((unused)) int32_t mask_y = info->
mask_y; __attribute__((unused)) int32_t dest_x = info->dest_x
; __attribute__((unused)) int32_t dest_y = info->dest_y; __attribute__
((unused)) int32_t width = info->width; __attribute__((unused
)) int32_t height = info->height; uint32_t *dst_line; uint32_t
*src_line; int dst_stride, src_stride; int src_x_t, src_y_t;
do { uint32_t *__bits__; int __stride__; __bits__ = dest_image
->bits.bits; __stride__ = dest_image->bits.rowstride; (
dst_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof
(uint32_t); (dst_line) = ((uint32_t *) __bits__) + (dst_stride
) * (dest_y) + (1) * (dest_x); } while (0); src_x_t = src_y +
((int) (((pixman_fixed_48_16_t) src_image->common.transform
->matrix[0][2] + (((pixman_fixed_t) ((uint32_t) (1) <<
16))) / 2 - ((pixman_fixed_t) 1)) >> 16)); src_y_t = -
src_x + ((int) (((pixman_fixed_48_16_t) src_image->common.
transform->matrix[1][2] + (((pixman_fixed_t) ((uint32_t) (
1) << 16))) / 2 - ((pixman_fixed_t) 1)) >> 16)) -
width; do { uint32_t *__bits__; int __stride__; __bits__ = src_image
->bits.bits; __stride__ = src_image->bits.rowstride; (src_stride
) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (uint32_t
); (src_line) = ((uint32_t *) __bits__) + (src_stride) * (src_y_t
) + (1) * (src_x_t); } while (0); blt_rotated_270_8888 (dst_line
, dst_stride, src_line, src_stride, width, height); }
1824
1825static const pixman_fast_path_t c_fast_paths[] =
1826{
1827 PIXMAN_STD_FAST_PATH (OVER, solid, a8, r5g6b5, fast_composite_over_n_8_0565){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r5g6b5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_0565
}
,
1828 PIXMAN_STD_FAST_PATH (OVER, solid, a8, b5g6r5, fast_composite_over_n_8_0565){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b5g6r5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_0565
}
,
1829 PIXMAN_STD_FAST_PATH (OVER, solid, a8, r8g8b8, fast_composite_over_n_8_0888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r8g8b8, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_0888
}
,
1830 PIXMAN_STD_FAST_PATH (OVER, solid, a8, b8g8r8, fast_composite_over_n_8_0888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b8g8r8, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_0888
}
,
1831 PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8r8g8b8, fast_composite_over_n_8_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_8888
}
,
1832 PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8r8g8b8, fast_composite_over_n_8_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_8888
}
,
1833 PIXMAN_STD_FAST_PATH (OVER, solid, a8, a8b8g8r8, fast_composite_over_n_8_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_8888
}
,
1834 PIXMAN_STD_FAST_PATH (OVER, solid, a8, x8b8g8r8, fast_composite_over_n_8_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_8_8888
}
,
1835 PIXMAN_STD_FAST_PATH (OVER, solid, a1, a8r8g8b8, fast_composite_over_n_1_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_8888
}
,
1836 PIXMAN_STD_FAST_PATH (OVER, solid, a1, x8r8g8b8, fast_composite_over_n_1_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_8888
}
,
1837 PIXMAN_STD_FAST_PATH (OVER, solid, a1, a8b8g8r8, fast_composite_over_n_1_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_8888
}
,
1838 PIXMAN_STD_FAST_PATH (OVER, solid, a1, x8b8g8r8, fast_composite_over_n_1_8888){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_8888
}
,
1839 PIXMAN_STD_FAST_PATH (OVER, solid, a1, r5g6b5, fast_composite_over_n_1_0565){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r5g6b5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_0565
}
,
1840 PIXMAN_STD_FAST_PATH (OVER, solid, a1, b5g6r5, fast_composite_over_n_1_0565){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a1, ((PIXMAN_a1 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b5g6r5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_n_1_0565
}
,
1841 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, a8r8g8b8, fast_composite_over_n_8888_8888_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8r8g8b8, ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_8888_ca }
,
1842 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, x8r8g8b8, fast_composite_over_n_8888_8888_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8r8g8b8, ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_8888_ca }
,
1843 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8r8g8b8, r5g6b5, fast_composite_over_n_8888_0565_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8r8g8b8, ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_0565_ca }
,
1844 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, a8b8g8r8, fast_composite_over_n_8888_8888_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8b8g8r8, ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_a8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_8888_ca }
,
1845 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, x8b8g8r8, fast_composite_over_n_8888_8888_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8b8g8r8, ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_8888_ca }
,
1846 PIXMAN_STD_FAST_PATH_CA (OVER, solid, a8b8g8r8, b5g6r5, fast_composite_over_n_8888_0565_ca){ PIXMAN_OP_OVER, (((0) << 24) | ((1) << 16) | ((
0) << 12) | ((0) << 8) | ((0) << 4) | ((0))
), (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8b8g8r8, ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_b5g6r5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_over_n_8888_0565_ca }
,
1847 PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, x8r8g8b8, fast_composite_over_x888_8_8888){ PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8
== (((0) << 24) | ((0) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1
<< 2) | (1 << 5) | (1 << 1) | (1 << 6
)) | ((PIXMAN_a8 == (((0) << 24) | ((1) << 16) | (
(0) << 12) | ((0) << 8) | ((0) << 4) | ((0)
))) ? 0 : ((1 << 23) | (1 << 11) | (1 << 0)
))) | (1 << 9))), PIXMAN_x8r8g8b8, ((1 << 5) | (1
<< 1) | (1 << 6)), fast_composite_over_x888_8_8888
}
,
1848 PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, a8r8g8b8, fast_composite_over_x888_8_8888){ PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8
== (((0) << 24) | ((0) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1
<< 2) | (1 << 5) | (1 << 1) | (1 << 6
)) | ((PIXMAN_a8 == (((0) << 24) | ((1) << 16) | (
(0) << 12) | ((0) << 8) | ((0) << 4) | ((0)
))) ? 0 : ((1 << 23) | (1 << 11) | (1 << 0)
))) | (1 << 9))), PIXMAN_a8r8g8b8, ((1 << 5) | (1
<< 1) | (1 << 6)), fast_composite_over_x888_8_8888
}
,
1849 PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, x8b8g8r8, fast_composite_over_x888_8_8888){ PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8
== (((0) << 24) | ((0) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1
<< 2) | (1 << 5) | (1 << 1) | (1 << 6
)) | ((PIXMAN_a8 == (((0) << 24) | ((1) << 16) | (
(0) << 12) | ((0) << 8) | ((0) << 4) | ((0)
))) ? 0 : ((1 << 23) | (1 << 11) | (1 << 0)
))) | (1 << 9))), PIXMAN_x8b8g8r8, ((1 << 5) | (1
<< 1) | (1 << 6)), fast_composite_over_x888_8_8888
}
,
1850 PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, a8b8g8r8, fast_composite_over_x888_8_8888){ PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8
== (((0) << 24) | ((0) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1
<< 2) | (1 << 5) | (1 << 1) | (1 << 6
)) | ((PIXMAN_a8 == (((0) << 24) | ((1) << 16) | (
(0) << 12) | ((0) << 8) | ((0) << 4) | ((0)
))) ? 0 : ((1 << 23) | (1 << 11) | (1 << 0)
))) | (1 << 9))), PIXMAN_a8b8g8r8, ((1 << 5) | (1
<< 1) | (1 << 6)), fast_composite_over_x888_8_8888
}
,
1851 PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, fast_composite_over_8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_8888
}
,
1852 PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, fast_composite_over_8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_8888
}
,
1853 PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, r5g6b5, fast_composite_over_8888_0565){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r5g6b5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_0565
}
,
1854 PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, fast_composite_over_8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_8888
}
,
1855 PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, fast_composite_over_8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_8888
}
,
1856 PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, b5g6r5, fast_composite_over_8888_0565){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b5g6r5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_over_8888_0565
}
,
1857 PIXMAN_STD_FAST_PATH (ADD, r5g6b5, null, r5g6b5, fast_composite_add_0565_0565){ PIXMAN_OP_ADD, PIXMAN_r5g6b5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_r5g6b5 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r5g6b5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_add_0565_0565
}
,
1858 PIXMAN_STD_FAST_PATH (ADD, b5g6r5, null, b5g6r5, fast_composite_add_0565_0565){ PIXMAN_OP_ADD, PIXMAN_b5g6r5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b5g6r5 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b5g6r5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_add_0565_0565
}
,
1859 PIXMAN_STD_FAST_PATH (ADD, a8r8g8b8, null, a8r8g8b8, fast_composite_add_8888_8888){ PIXMAN_OP_ADD, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_add_8888_8888
}
,
1860 PIXMAN_STD_FAST_PATH (ADD, a8b8g8r8, null, a8b8g8r8, fast_composite_add_8888_8888){ PIXMAN_OP_ADD, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_add_8888_8888
}
,
1861 PIXMAN_STD_FAST_PATH (ADD, a8, null, a8, fast_composite_add_8_8){ PIXMAN_OP_ADD, PIXMAN_a8, (((1 << 2) | (1 << 5)
| (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_add_8_8 }
,
1862 PIXMAN_STD_FAST_PATH (ADD, a1, null, a1, fast_composite_add_1_1){ PIXMAN_OP_ADD, PIXMAN_a1, (((1 << 2) | (1 << 5)
| (1 << 1) | (1 << 6)) | ((PIXMAN_a1 == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a1, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_add_1_1 }
,
1863 PIXMAN_STD_FAST_PATH_CA (ADD, solid, a8r8g8b8, a8r8g8b8, fast_composite_add_n_8888_8888_ca){ PIXMAN_OP_ADD, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8r8g8b8, ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((0) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8
== (((0) << 24) | ((1) << 16) | ((0) << 12
) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))) | (1 << 8)))
, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_add_n_8888_8888_ca }
,
1864 PIXMAN_STD_FAST_PATH (ADD, solid, a8, a8, fast_composite_add_n_8_8){ PIXMAN_OP_ADD, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_add_n_8_8
}
,
1865 PIXMAN_STD_FAST_PATH (SRC, solid, null, a8r8g8b8, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8r8g8b8, ((1 << 5) |
(1 << 1) | (1 << 6)), fast_composite_solid_fill }
,
1866 PIXMAN_STD_FAST_PATH (SRC, solid, null, x8r8g8b8, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_x8r8g8b8, ((1 << 5) |
(1 << 1) | (1 << 6)), fast_composite_solid_fill }
,
1867 PIXMAN_STD_FAST_PATH (SRC, solid, null, a8b8g8r8, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8b8g8r8, ((1 << 5) |
(1 << 1) | (1 << 6)), fast_composite_solid_fill }
,
1868 PIXMAN_STD_FAST_PATH (SRC, solid, null, x8b8g8r8, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_x8b8g8r8, ((1 << 5) |
(1 << 1) | (1 << 6)), fast_composite_solid_fill }
,
1869 PIXMAN_STD_FAST_PATH (SRC, solid, null, a1, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a1, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_solid_fill }
,
1870 PIXMAN_STD_FAST_PATH (SRC, solid, null, a8, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_solid_fill }
,
1871 PIXMAN_STD_FAST_PATH (SRC, solid, null, r5g6b5, fast_composite_solid_fill){ PIXMAN_OP_SRC, (((0) << 24) | ((1) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, (((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_r5g6b5, ((1 << 5) | (
1 << 1) | (1 << 6)), fast_composite_solid_fill }
,
1872 PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, a8r8g8b8, fast_composite_src_x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_x888_8888
}
,
1873 PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, a8b8g8r8, fast_composite_src_x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_x888_8888
}
,
1874 PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, x8r8g8b8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1875 PIXMAN_STD_FAST_PATH (SRC, a8r8g8b8, null, a8r8g8b8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1876 PIXMAN_STD_FAST_PATH (SRC, x8r8g8b8, null, x8r8g8b8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8r8g8b8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8r8g8b8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1877 PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, x8b8g8r8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1878 PIXMAN_STD_FAST_PATH (SRC, a8b8g8r8, null, a8b8g8r8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1879 PIXMAN_STD_FAST_PATH (SRC, x8b8g8r8, null, x8b8g8r8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x8b8g8r8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x8b8g8r8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1880 PIXMAN_STD_FAST_PATH (SRC, b8g8r8a8, null, b8g8r8x8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_b8g8r8a8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b8g8r8a8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b8g8r8x8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1881 PIXMAN_STD_FAST_PATH (SRC, b8g8r8a8, null, b8g8r8a8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_b8g8r8a8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b8g8r8a8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b8g8r8a8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1882 PIXMAN_STD_FAST_PATH (SRC, b8g8r8x8, null, b8g8r8x8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_b8g8r8x8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b8g8r8x8 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b8g8r8x8,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1883 PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_r5g6b5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_r5g6b5 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r5g6b5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1884 PIXMAN_STD_FAST_PATH (SRC, b5g6r5, null, b5g6r5, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_b5g6r5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b5g6r5 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b5g6r5, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1885 PIXMAN_STD_FAST_PATH (SRC, r8g8b8, null, r8g8b8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_r8g8b8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_r8g8b8 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_r8g8b8, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1886 PIXMAN_STD_FAST_PATH (SRC, b8g8r8, null, b8g8r8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_b8g8r8, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_b8g8r8 == (
((0) << 24) | ((1) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_b8g8r8, (
(1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1887 PIXMAN_STD_FAST_PATH (SRC, x1r5g5b5, null, x1r5g5b5, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_x1r5g5b5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_x1r5g5b5 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x1r5g5b5,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1888 PIXMAN_STD_FAST_PATH (SRC, a1r5g5b5, null, x1r5g5b5, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a1r5g5b5, (((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a1r5g5b5 ==
(((0) << 24) | ((1) << 16) | ((0) << 12) |
((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((1 <<
23) | (1 << 11) | (1 << 0)))), (((0) << 24
) | ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))), (((((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))) == (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0)))) ? 0 : ((
((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_x1r5g5b5,
((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_src_memcpy
}
,
1889 PIXMAN_STD_FAST_PATH (SRC, a8, null, a8, fast_composite_src_memcpy){ PIXMAN_OP_SRC, PIXMAN_a8, (((1 << 2) | (1 << 5)
| (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_src_memcpy }
,
1890 PIXMAN_STD_FAST_PATH (IN, a8, null, a8, fast_composite_in_8_8){ PIXMAN_OP_IN, PIXMAN_a8, (((1 << 2) | (1 << 5) |
(1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), (((((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | (((((0) << 24)
| ((0) << 16) | ((0) << 12) | ((0) << 8) |
((0) << 4) | ((0))) == (((0) << 24) | ((1) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0)))) ? 0 : ((1 << 23) | (1 << 11) | (1 <<
0)))) | (1 << 9))), PIXMAN_a8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_in_8_8 }
,
1891 PIXMAN_STD_FAST_PATH (IN, solid, a8, a8, fast_composite_in_n_8_8){ PIXMAN_OP_IN, (((0) << 24) | ((1) << 16) | ((0)
<< 12) | ((0) << 8) | ((0) << 4) | ((0))),
(((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (((((0) << 24) | ((1) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))) == (((0) <<
24) | ((1) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))), PIXMAN_a8, ((PIXMAN_a8 == (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0)))) ? 0 : ((((1 << 2) | (1 <<
5) | (1 << 1) | (1 << 6)) | ((PIXMAN_a8 == (((0)
<< 24) | ((1) << 16) | ((0) << 12) | ((0) <<
8) | ((0) << 4) | ((0)))) ? 0 : ((1 << 23) | (1 <<
11) | (1 << 0)))) | (1 << 9))), PIXMAN_a8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_in_n_8_8
}
,
1892
1893 SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_x8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1894 SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_a8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1895 SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_x8b8g8r8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1896 SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_a8b8g8r8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1897
1898 SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_a8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1899 SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8, 8888_8888){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_a8b8g8r8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_SRC, }
,
1900
1901 SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, r5g6b5, 8888_565){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_x8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_normal_SRC, }
,
1902 SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, r5g6b5, 8888_565){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_none_SRC, }, { PIXMAN_OP_SRC
, PIXMAN_a8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, (((1 << 10) | (1
<< 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_normal_SRC, }
,
1903
1904 SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, r5g6b5, 565_565){ PIXMAN_OP_SRC, PIXMAN_r5g6b5, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_565_565_cover_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_r5g6b5, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 14) | (1 << 3) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_565_565_none_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_r5g6b5, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_565_565_pad_SRC
, }, { PIXMAN_OP_SRC, PIXMAN_r5g6b5, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 3) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_565_565_normal_SRC
, }
,
1905
1906 SIMPLE_NEAREST_FAST_PATH_COVER (SRC, x8r8g8b8, a8r8g8b8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_cover_SRC
, }
,
1907 SIMPLE_NEAREST_FAST_PATH_COVER (SRC, x8b8g8r8, a8b8g8r8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_cover_SRC
, }
,
1908 SIMPLE_NEAREST_FAST_PATH_PAD (SRC, x8r8g8b8, a8r8g8b8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_pad_SRC
, }
,
1909 SIMPLE_NEAREST_FAST_PATH_PAD (SRC, x8b8g8r8, a8b8g8r8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_pad_SRC
, }
,
1910 SIMPLE_NEAREST_FAST_PATH_NORMAL (SRC, x8r8g8b8, a8r8g8b8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 3) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_normal_SRC
, }
,
1911 SIMPLE_NEAREST_FAST_PATH_NORMAL (SRC, x8b8g8r8, a8b8g8r8, x888_8888){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 3) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_x888_8888_normal_SRC
, }
,
1912
1913 SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, 8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_OVER, }, {
PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_OVER, }
,
1914 SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, 8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_OVER, }, {
PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_x8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_OVER, }
,
1915 SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, 8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_OVER, }, {
PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_OVER, }
,
1916 SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, 8888_8888){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_cover_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_none_OVER, }, {
PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | ((
1 << 15) | (1 << 14) | (1 << 4)) | (1 <<
16)), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_8888_pad_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_a8b8g8r8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_8888_normal_OVER, }
,
1917
1918 SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, r5g6b5, 8888_565){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)) | (1
<< 23), (((0) << 24) | ((0) << 16) | ((0) <<
12) | ((0) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_cover_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 14) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_none_OVER, }, { PIXMAN_OP_OVER
, PIXMAN_a8r8g8b8, (((1 << 10) | (1 << 1) | (1 <<
11) | (1 << 5) | (1 << 6)) | ((1 << 15) | (
1 << 14) | (1 << 4)) | (1 << 16)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_r5g6b5, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest_8888_565_pad_OVER
, }, { PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, (((1 << 10) | (
1 << 1) | (1 << 11) | (1 << 5) | (1 <<
6)) | ((1 << 15) | (1 << 3) | (1 << 4)) | (
1 << 16)), (((0) << 24) | ((0) << 16) | ((0
) << 12) | ((0) << 8) | ((0) << 4) | ((0)))
, 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_scaled_nearest_8888_565_normal_OVER, }
,
1919
1920#define NEAREST_FAST_PATH(op,s,d){ PIXMAN_OP_op, PIXMAN_s, ((1 << 10) | (1 << 1) |
(1 << 11) | (1 << 5) | (1 << 6)), (((0) <<
24) | ((0) << 16) | ((0) << 12) | ((0) << 8
) | ((0) << 4) | ((0))), 0, PIXMAN_d, ((1 << 5) |
(1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
\
1921 { PIXMAN_OP_ ## op, \
1922 PIXMAN_ ## s, SCALED_NEAREST_FLAGS((1 << 10) | (1 << 1) | (1 << 11) | (1 <<
5) | (1 << 6))
, \
1923 PIXMAN_null(((0) << 24) | ((0) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
, 0, \
1924 PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)), \
1925 fast_composite_scaled_nearest, \
1926 }
1927
1928 NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1929 NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1930 NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1931 NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1932
1933 NEAREST_FAST_PATH (SRC, x8r8g8b8, a8r8g8b8){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1934 NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1935 NEAREST_FAST_PATH (SRC, x8b8g8r8, a8b8g8r8){ PIXMAN_OP_SRC, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1936 NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8){ PIXMAN_OP_SRC, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1937
1938 NEAREST_FAST_PATH (OVER, x8r8g8b8, x8r8g8b8){ PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1939 NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1940 NEAREST_FAST_PATH (OVER, x8b8g8r8, x8b8g8r8){ PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1941 NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_x8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1942
1943 NEAREST_FAST_PATH (OVER, x8r8g8b8, a8r8g8b8){ PIXMAN_OP_OVER, PIXMAN_x8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1944 NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8){ PIXMAN_OP_OVER, PIXMAN_a8r8g8b8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8r8g8b8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1945 NEAREST_FAST_PATH (OVER, x8b8g8r8, a8b8g8r8){ PIXMAN_OP_OVER, PIXMAN_x8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1946 NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8){ PIXMAN_OP_OVER, PIXMAN_a8b8g8r8, ((1 << 10) | (1 <<
1) | (1 << 11) | (1 << 5) | (1 << 6)), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8b8g8r8
, ((1 << 5) | (1 << 1) | (1 << 6)), fast_composite_scaled_nearest
, }
,
1947
1948#define SIMPLE_ROTATE_FLAGS(angle)(FAST_PATH_ROTATE_angle_TRANSFORM | (1 << 11) | (1 <<
23) | ((1 << 2) | (1 << 5) | (1 << 1) | (1
<< 6)))
\
1949 (FAST_PATH_ROTATE_ ## angle ## _TRANSFORM | \
1950 FAST_PATH_NEAREST_FILTER(1 << 11) | \
1951 FAST_PATH_SAMPLES_COVER_CLIP_NEAREST(1 << 23) | \
1952 FAST_PATH_STANDARD_FLAGS((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6))
)
1953
1954#define SIMPLE_ROTATE_FAST_PATH(op,s,d,suffix){ PIXMAN_OP_op, PIXMAN_s, ((1 << 20) | (1 << 11) |
(1 << 23) | ((1 << 2) | (1 << 5) | (1 <<
1) | (1 << 6))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), 0, PIXMAN_d, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_90_suffix, }, { PIXMAN_OP_op, PIXMAN_s
, ((1 << 22) | (1 << 11) | (1 << 23) | ((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6))), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_d, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_rotate_270_suffix
, }
\
1955 { PIXMAN_OP_ ## op, \
1956 PIXMAN_ ## s, SIMPLE_ROTATE_FLAGS (90)((1 << 20) | (1 << 11) | (1 << 23) | ((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)))
, \
1957 PIXMAN_null(((0) << 24) | ((0) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
, 0, \
1958 PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)), \
1959 fast_composite_rotate_90_##suffix, \
1960 }, \
1961 { PIXMAN_OP_ ## op, \
1962 PIXMAN_ ## s, SIMPLE_ROTATE_FLAGS (270)((1 << 22) | (1 << 11) | (1 << 23) | ((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6)))
, \
1963 PIXMAN_null(((0) << 24) | ((0) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
, 0, \
1964 PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)), \
1965 fast_composite_rotate_270_##suffix, \
1966 }
1967
1968 SIMPLE_ROTATE_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, 8888){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 20) | (1 <<
11) | (1 << 23) | ((1 << 2) | (1 << 5) | (
1 << 1) | (1 << 6))), (((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))), 0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_rotate_90_8888, }, { PIXMAN_OP_SRC
, PIXMAN_a8r8g8b8, ((1 << 22) | (1 << 11) | (1 <<
23) | ((1 << 2) | (1 << 5) | (1 << 1) | (1
<< 6))), (((0) << 24) | ((0) << 16) | ((0)
<< 12) | ((0) << 8) | ((0) << 4) | ((0))),
0, PIXMAN_a8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_270_8888, }
,
1969 SIMPLE_ROTATE_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, 8888){ PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, ((1 << 20) | (1 <<
11) | (1 << 23) | ((1 << 2) | (1 << 5) | (
1 << 1) | (1 << 6))), (((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))), 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_rotate_90_8888, }, { PIXMAN_OP_SRC
, PIXMAN_a8r8g8b8, ((1 << 22) | (1 << 11) | (1 <<
23) | ((1 << 2) | (1 << 5) | (1 << 1) | (1
<< 6))), (((0) << 24) | ((0) << 16) | ((0)
<< 12) | ((0) << 8) | ((0) << 4) | ((0))),
0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_270_8888, }
,
1970 SIMPLE_ROTATE_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, 8888){ PIXMAN_OP_SRC, PIXMAN_x8r8g8b8, ((1 << 20) | (1 <<
11) | (1 << 23) | ((1 << 2) | (1 << 5) | (
1 << 1) | (1 << 6))), (((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))), 0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 <<
1) | (1 << 6)), fast_composite_rotate_90_8888, }, { PIXMAN_OP_SRC
, PIXMAN_x8r8g8b8, ((1 << 22) | (1 << 11) | (1 <<
23) | ((1 << 2) | (1 << 5) | (1 << 1) | (1
<< 6))), (((0) << 24) | ((0) << 16) | ((0)
<< 12) | ((0) << 8) | ((0) << 4) | ((0))),
0, PIXMAN_x8r8g8b8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_270_8888, }
,
1971 SIMPLE_ROTATE_FAST_PATH (SRC, r5g6b5, r5g6b5, 565){ PIXMAN_OP_SRC, PIXMAN_r5g6b5, ((1 << 20) | (1 <<
11) | (1 << 23) | ((1 << 2) | (1 << 5) | (
1 << 1) | (1 << 6))), (((0) << 24) | ((0) <<
16) | ((0) << 12) | ((0) << 8) | ((0) << 4
) | ((0))), 0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1
) | (1 << 6)), fast_composite_rotate_90_565, }, { PIXMAN_OP_SRC
, PIXMAN_r5g6b5, ((1 << 22) | (1 << 11) | (1 <<
23) | ((1 << 2) | (1 << 5) | (1 << 1) | (1
<< 6))), (((0) << 24) | ((0) << 16) | ((0)
<< 12) | ((0) << 8) | ((0) << 4) | ((0))),
0, PIXMAN_r5g6b5, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_270_565, }
,
1972 SIMPLE_ROTATE_FAST_PATH (SRC, a8, a8, 8){ PIXMAN_OP_SRC, PIXMAN_a8, ((1 << 20) | (1 << 11
) | (1 << 23) | ((1 << 2) | (1 << 5) | (1 <<
1) | (1 << 6))), (((0) << 24) | ((0) << 16
) | ((0) << 12) | ((0) << 8) | ((0) << 4) |
((0))), 0, PIXMAN_a8, ((1 << 5) | (1 << 1) | (1 <<
6)), fast_composite_rotate_90_8, }, { PIXMAN_OP_SRC, PIXMAN_a8
, ((1 << 22) | (1 << 11) | (1 << 23) | ((1 <<
2) | (1 << 5) | (1 << 1) | (1 << 6))), (((
0) << 24) | ((0) << 16) | ((0) << 12) | ((0
) << 8) | ((0) << 4) | ((0))), 0, PIXMAN_a8, ((1 <<
5) | (1 << 1) | (1 << 6)), fast_composite_rotate_270_8
, }
,
1973
1974 /* Simple repeat fast path entry. */
1975 { PIXMAN_OP_any(PIXMAN_N_OPERATORS + 1),
1976 PIXMAN_any(((0) << 24) | ((5) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
,
1977 (FAST_PATH_STANDARD_FLAGS((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6))
| FAST_PATH_ID_TRANSFORM(1 << 0) | FAST_PATH_BITS_IMAGE(1 << 25) |
1978 FAST_PATH_NORMAL_REPEAT((1 << 15) | (1 << 3) | (1 << 4))),
1979 PIXMAN_any(((0) << 24) | ((5) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
, 0,
1980 PIXMAN_any(((0) << 24) | ((5) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)),
1981 fast_composite_tiled_repeat
1982 },
1983
1984 { PIXMAN_OP_NONE },
1985};
1986
1987#ifdef WORDS_BIGENDIAN
1988#define A1_FILL_MASK(n, offs)(((1U << (n)) - 1) << (offs)) (((1U << (n)) - 1) << (32 - (offs) - (n)))
1989#else
1990#define A1_FILL_MASK(n, offs)(((1U << (n)) - 1) << (offs)) (((1U << (n)) - 1) << (offs))
1991#endif
1992
1993static force_inline__inline__ __attribute__ ((__always_inline__)) void
1994pixman_fill1_line (uint32_t *dst, int offs, int width, int v)
1995{
1996 if (offs)
1997 {
1998 int leading_pixels = 32 - offs;
1999 if (leading_pixels >= width)
2000 {
2001 if (v)
2002 *dst |= A1_FILL_MASK (width, offs)(((1U << (width)) - 1) << (offs));
2003 else
2004 *dst &= ~A1_FILL_MASK (width, offs)(((1U << (width)) - 1) << (offs));
2005 return;
2006 }
2007 else
2008 {
2009 if (v)
2010 *dst++ |= A1_FILL_MASK (leading_pixels, offs)(((1U << (leading_pixels)) - 1) << (offs));
2011 else
2012 *dst++ &= ~A1_FILL_MASK (leading_pixels, offs)(((1U << (leading_pixels)) - 1) << (offs));
2013 width -= leading_pixels;
2014 }
2015 }
2016 while (width >= 32)
2017 {
2018 if (v)
2019 *dst++ = 0xFFFFFFFF;
2020 else
2021 *dst++ = 0;
2022 width -= 32;
2023 }
2024 if (width > 0)
2025 {
2026 if (v)
2027 *dst |= A1_FILL_MASK (width, 0)(((1U << (width)) - 1) << (0));
2028 else
2029 *dst &= ~A1_FILL_MASK (width, 0)(((1U << (width)) - 1) << (0));
2030 }
2031}
2032
2033static void
2034pixman_fill1 (uint32_t *bits,
2035 int stride,
2036 int x,
2037 int y,
2038 int width,
2039 int height,
2040 uint32_t filler)
2041{
2042 uint32_t *dst = bits + y * stride + (x >> 5);
2043 int offs = x & 31;
2044
2045 if (filler & 1)
2046 {
2047 while (height--)
2048 {
2049 pixman_fill1_line (dst, offs, width, 1);
2050 dst += stride;
2051 }
2052 }
2053 else
2054 {
2055 while (height--)
2056 {
2057 pixman_fill1_line (dst, offs, width, 0);
2058 dst += stride;
2059 }
2060 }
2061}
2062
2063static void
2064pixman_fill8 (uint32_t *bits,
2065 int stride,
2066 int x,
2067 int y,
2068 int width,
2069 int height,
2070 uint32_t filler)
2071{
2072 int byte_stride = stride * (int) sizeof (uint32_t);
2073 uint8_t *dst = (uint8_t *) bits;
2074 uint8_t v = filler & 0xff;
2075 int i;
2076
2077 dst = dst + y * byte_stride + x;
2078
2079 while (height--)
2080 {
2081 for (i = 0; i < width; ++i)
2082 dst[i] = v;
2083
2084 dst += byte_stride;
2085 }
2086}
2087
2088static void
2089pixman_fill16 (uint32_t *bits,
2090 int stride,
2091 int x,
2092 int y,
2093 int width,
2094 int height,
2095 uint32_t filler)
2096{
2097 int short_stride =
2098 (stride * (int)sizeof (uint32_t)) / (int)sizeof (uint16_t);
2099 uint16_t *dst = (uint16_t *)bits;
2100 uint16_t v = filler & 0xffff;
2101 int i;
2102
2103 dst = dst + y * short_stride + x;
2104
2105 while (height--)
2106 {
2107 for (i = 0; i < width; ++i)
2108 dst[i] = v;
2109
2110 dst += short_stride;
2111 }
2112}
2113
2114static void
2115pixman_fill32 (uint32_t *bits,
2116 int stride,
2117 int x,
2118 int y,
2119 int width,
2120 int height,
2121 uint32_t filler)
2122{
2123 int i;
2124
2125 bits = bits + y * stride + x;
2126
2127 while (height--)
2128 {
2129 for (i = 0; i < width; ++i)
2130 bits[i] = filler;
2131
2132 bits += stride;
2133 }
2134}
2135
2136static pixman_bool_t
2137fast_path_fill (pixman_implementation_t *imp,
2138 uint32_t * bits,
2139 int stride,
2140 int bpp,
2141 int x,
2142 int y,
2143 int width,
2144 int height,
2145 uint32_t filler)
2146{
2147 switch (bpp)
2148 {
2149 case 1:
2150 pixman_fill1 (bits, stride, x, y, width, height, filler);
2151 break;
2152
2153 case 8:
2154 pixman_fill8 (bits, stride, x, y, width, height, filler);
2155 break;
2156
2157 case 16:
2158 pixman_fill16 (bits, stride, x, y, width, height, filler);
2159 break;
2160
2161 case 32:
2162 pixman_fill32 (bits, stride, x, y, width, height, filler);
2163 break;
2164
2165 default:
2166 return FALSE0;
2167 }
2168
2169 return TRUE1;
2170}
2171
2172/*****************************************************************************/
2173
2174static uint32_t *
2175fast_fetch_r5g6b5 (pixman_iter_t *iter, const uint32_t *mask)
2176{
2177 int32_t w = iter->width;
2178 uint32_t *dst = iter->buffer;
2179 const uint16_t *src = (const uint16_t *)iter->bits;
2180
2181 iter->bits += iter->stride;
2182
2183 /* Align the source buffer at 4 bytes boundary */
2184 if (w > 0 && ((uintptr_t)src & 3))
2185 {
2186 *dst++ = convert_0565_to_8888 (*src++);
2187 w--;
2188 }
2189 /* Process two pixels per iteration */
2190 while ((w -= 2) >= 0)
2191 {
2192 uint32_t sr, sb, sg, t0, t1;
2193 uint32_t s = *(const uint32_t *)src;
2194 src += 2;
2195 sr = (s >> 8) & 0x00F800F8;
2196 sb = (s << 3) & 0x00F800F8;
2197 sg = (s >> 3) & 0x00FC00FC;
2198 sr |= sr >> 5;
2199 sb |= sb >> 5;
2200 sg |= sg >> 6;
2201 t0 = ((sr << 16) & 0x00FF0000) | ((sg << 8) & 0x0000FF00) |
2202 (sb & 0xFF) | 0xFF000000;
2203 t1 = (sr & 0x00FF0000) | ((sg >> 8) & 0x0000FF00) |
2204 (sb >> 16) | 0xFF000000;
2205#ifdef WORDS_BIGENDIAN
2206 *dst++ = t1;
2207 *dst++ = t0;
2208#else
2209 *dst++ = t0;
2210 *dst++ = t1;
2211#endif
2212 }
2213 if (w & 1)
2214 {
2215 *dst = convert_0565_to_8888 (*src);
2216 }
2217
2218 return iter->buffer;
2219}
2220
2221static uint32_t *
2222fast_dest_fetch_noop (pixman_iter_t *iter, const uint32_t *mask)
2223{
2224 iter->bits += iter->stride;
2225 return iter->buffer;
2226}
2227
2228/* Helper function for a workaround, which tries to ensure that 0x1F001F
2229 * constant is always allocated in a register on RISC architectures.
2230 */
2231static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
2232convert_8888_to_0565_workaround (uint32_t s, uint32_t x1F001F)
2233{
2234 uint32_t a, b;
2235 a = (s >> 3) & x1F001F;
2236 b = s & 0xFC00;
2237 a |= a >> 5;
2238 a |= b >> 5;
2239 return a;
2240}
2241
2242static void
2243fast_write_back_r5g6b5 (pixman_iter_t *iter)
2244{
2245 int32_t w = iter->width;
2246 uint16_t *dst = (uint16_t *)(iter->bits - iter->stride);
2247 const uint32_t *src = iter->buffer;
2248 /* Workaround to ensure that x1F001F variable is allocated in a register */
2249 static volatile uint32_t volatile_x1F001F = 0x1F001F;
2250 uint32_t x1F001F = volatile_x1F001F;
2251
2252 while ((w -= 4) >= 0)
2253 {
2254 uint32_t s1 = *src++;
2255 uint32_t s2 = *src++;
2256 uint32_t s3 = *src++;
2257 uint32_t s4 = *src++;
2258 *dst++ = convert_8888_to_0565_workaround (s1, x1F001F);
2259 *dst++ = convert_8888_to_0565_workaround (s2, x1F001F);
2260 *dst++ = convert_8888_to_0565_workaround (s3, x1F001F);
2261 *dst++ = convert_8888_to_0565_workaround (s4, x1F001F);
2262 }
2263 if (w & 2)
2264 {
2265 *dst++ = convert_8888_to_0565_workaround (*src++, x1F001F);
2266 *dst++ = convert_8888_to_0565_workaround (*src++, x1F001F);
2267 }
2268 if (w & 1)
2269 {
2270 *dst = convert_8888_to_0565_workaround (*src, x1F001F);
2271 }
2272}
2273
2274typedef struct
2275{
2276 int y;
2277 uint64_t * buffer;
2278} line_t;
2279
2280typedef struct
2281{
2282 line_t lines[2];
2283 pixman_fixed_t y;
2284 pixman_fixed_t x;
2285 uint64_t data[1];
2286} bilinear_info_t;
2287
2288static void
2289fetch_horizontal (bits_image_t *image, line_t *line,
2290 int y, pixman_fixed_t x, pixman_fixed_t ux, int n)
2291{
2292 uint32_t *bits = image->bits + y * image->rowstride;
2293 int i;
2294
2295 for (i = 0; i < n; ++i)
2296 {
2297 int x0 = pixman_fixed_to_int (x)((int) ((x) >> 16));
2298 int x1 = x0 + 1;
2299 int32_t dist_x;
2300
2301 uint32_t left = *(bits + x0);
2302 uint32_t right = *(bits + x1);
2303
2304 dist_x = pixman_fixed_to_bilinear_weight (x);
2305 dist_x <<= (8 - BILINEAR_INTERPOLATION_BITS7);
2306
2307#if SIZEOF_LONG <= 4
2308 {
2309 uint32_t lag, rag, ag;
2310 uint32_t lrb, rrb, rb;
2311
2312 lag = (left & 0xff00ff00) >> 8;
2313 rag = (right & 0xff00ff00) >> 8;
2314 ag = (lag << 8) + dist_x * (rag - lag);
2315
2316 lrb = (left & 0x00ff00ff);
2317 rrb = (right & 0x00ff00ff);
2318 rb = (lrb << 8) + dist_x * (rrb - lrb);
2319
2320 *((uint32_t *)(line->buffer + i)) = ag;
2321 *((uint32_t *)(line->buffer + i) + 1) = rb;
2322 }
2323#else
2324 {
2325 uint64_t lagrb, ragrb;
2326 uint32_t lag, rag;
2327 uint32_t lrb, rrb;
2328
2329 lag = (left & 0xff00ff00);
2330 lrb = (left & 0x00ff00ff);
2331 rag = (right & 0xff00ff00);
2332 rrb = (right & 0x00ff00ff);
2333 lagrb = (((uint64_t)lag) << 24) | lrb;
2334 ragrb = (((uint64_t)rag) << 24) | rrb;
2335
2336 line->buffer[i] = (lagrb << 8) + dist_x * (ragrb - lagrb);
2337 }
2338#endif
2339
2340 x += ux;
2341 }
2342
2343 line->y = y;
2344}
2345
2346static uint32_t *
2347fast_fetch_bilinear_cover (pixman_iter_t *iter, const uint32_t *mask)
2348{
2349 pixman_fixed_t fx, ux;
2350 bilinear_info_t *info = iter->data;
2351 line_t *line0, *line1;
2352 int y0, y1;
2353 int32_t dist_y;
2354 int i;
2355
2356 COMPILE_TIME_ASSERT (BILINEAR_INTERPOLATION_BITS < 8)do { typedef int compile_time_assertion [(7 < 8)?1:-1]; } while
(0)
;
2357
2358 fx = info->x;
2359 ux = iter->image->common.transform->matrix[0][0];
2360
2361 y0 = pixman_fixed_to_int (info->y)((int) ((info->y) >> 16));
2362 y1 = y0 + 1;
2363 dist_y = pixman_fixed_to_bilinear_weight (info->y);
2364 dist_y <<= (8 - BILINEAR_INTERPOLATION_BITS7);
2365
2366 line0 = &info->lines[y0 & 0x01];
2367 line1 = &info->lines[y1 & 0x01];
2368
2369 if (line0->y != y0)
2370 {
2371 fetch_horizontal (
2372 &iter->image->bits, line0, y0, fx, ux, iter->width);
2373 }
2374
2375 if (line1->y != y1)
2376 {
2377 fetch_horizontal (
2378 &iter->image->bits, line1, y1, fx, ux, iter->width);
2379 }
2380
2381 for (i = 0; i < iter->width; ++i)
2382 {
2383#if SIZEOF_LONG <= 4
2384 uint32_t ta, tr, tg, tb;
2385 uint32_t ba, br, bg, bb;
2386 uint32_t tag, trb;
2387 uint32_t bag, brb;
2388 uint32_t a, r, g, b;
2389
2390 tag = *((uint32_t *)(line0->buffer + i));
2391 trb = *((uint32_t *)(line0->buffer + i) + 1);
2392 bag = *((uint32_t *)(line1->buffer + i));
2393 brb = *((uint32_t *)(line1->buffer + i) + 1);
2394
2395 ta = tag >> 16;
2396 ba = bag >> 16;
2397 a = (ta << 8) + dist_y * (ba - ta);
2398
2399 tr = trb >> 16;
2400 br = brb >> 16;
2401 r = (tr << 8) + dist_y * (br - tr);
2402
2403 tg = tag & 0xffff;
2404 bg = bag & 0xffff;
2405 g = (tg << 8) + dist_y * (bg - tg);
2406
2407 tb = trb & 0xffff;
2408 bb = brb & 0xffff;
2409 b = (tb << 8) + dist_y * (bb - tb);
2410
2411 a = (a << 8) & 0xff000000;
2412 r = (r << 0) & 0x00ff0000;
2413 g = (g >> 8) & 0x0000ff00;
2414 b = (b >> 16) & 0x000000ff;
2415#else
2416 uint64_t top = line0->buffer[i];
2417 uint64_t bot = line1->buffer[i];
2418 uint64_t tar = (top & 0xffff0000ffff0000ULL) >> 16;
2419 uint64_t bar = (bot & 0xffff0000ffff0000ULL) >> 16;
2420 uint64_t tgb = (top & 0x0000ffff0000ffffULL);
2421 uint64_t bgb = (bot & 0x0000ffff0000ffffULL);
2422 uint64_t ar, gb;
2423 uint32_t a, r, g, b;
2424
2425 ar = (tar << 8) + dist_y * (bar - tar);
2426 gb = (tgb << 8) + dist_y * (bgb - tgb);
2427
2428 a = ((ar >> 24) & 0xff000000);
2429 r = ((ar >> 0) & 0x00ff0000);
2430 g = ((gb >> 40) & 0x0000ff00);
2431 b = ((gb >> 16) & 0x000000ff);
2432#endif
2433
2434 iter->buffer[i] = a | r | g | b;
2435 }
2436
2437 info->y += iter->image->common.transform->matrix[1][1];
2438
2439 return iter->buffer;
2440}
2441
2442static void
2443bilinear_cover_iter_fini (pixman_iter_t *iter)
2444{
2445 free (iter->data);
2446}
2447
2448static void
2449fast_bilinear_cover_iter_init (pixman_iter_t *iter, const pixman_iter_info_t *iter_info)
2450{
2451 int width = iter->width;
2452 bilinear_info_t *info;
2453 pixman_vector_t v;
2454
2455 /* Reference point is the center of the pixel */
2456 v.vector[0] = pixman_int_to_fixed (iter->x)((pixman_fixed_t) ((uint32_t) (iter->x) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2457 v.vector[1] = pixman_int_to_fixed (iter->y)((pixman_fixed_t) ((uint32_t) (iter->y) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2458 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
2459
2460 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (iter->image->common.transform, &v))
2461 goto fail;
2462
2463 info = malloc (sizeof (*info) + (2 * width - 1) * sizeof (uint64_t));
2464 if (!info)
2465 goto fail;
2466
2467 info->x = v.vector[0] - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2468 info->y = v.vector[1] - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2469
2470 /* It is safe to set the y coordinates to -1 initially
2471 * because COVER_CLIP_BILINEAR ensures that we will only
2472 * be asked to fetch lines in the [0, height) interval
2473 */
2474 info->lines[0].y = -1;
2475 info->lines[0].buffer = &(info->data[0]);
2476 info->lines[1].y = -1;
2477 info->lines[1].buffer = &(info->data[width]);
2478
2479 iter->get_scanline = fast_fetch_bilinear_cover;
2480 iter->fini = bilinear_cover_iter_fini;
2481
2482 iter->data = info;
2483 return;
2484
2485fail:
2486 /* Something went wrong, either a bad matrix or OOM; in such cases,
2487 * we don't guarantee any particular rendering.
2488 */
2489 _pixman_log_error (
2490 FUNC((const char*) (__PRETTY_FUNCTION__)), "Allocation failure or bad matrix, skipping rendering\n");
2491
2492 iter->get_scanline = _pixman_iter_get_scanline_noop;
2493 iter->fini = NULL((void*)0);
2494}
2495
2496static uint32_t *
2497bits_image_fetch_bilinear_no_repeat_8888 (pixman_iter_t *iter,
2498 const uint32_t *mask)
2499{
2500
2501 pixman_image_t * ima = iter->image;
2502 int offset = iter->x;
2503 int line = iter->y++;
2504 int width = iter->width;
2505 uint32_t * buffer = iter->buffer;
2506
2507 bits_image_t *bits = &ima->bits;
2508 pixman_fixed_t x_top, x_bottom, x;
2509 pixman_fixed_t ux_top, ux_bottom, ux;
2510 pixman_vector_t v;
2511 uint32_t top_mask, bottom_mask;
2512 uint32_t *top_row;
2513 uint32_t *bottom_row;
2514 uint32_t *end;
2515 uint32_t zero[2] = { 0, 0 };
2516 uint32_t one = 1;
2517 int y, y1, y2;
2518 int disty;
2519 int mask_inc;
2520 int w;
2521
2522 /* reference point is the center of the pixel */
2523 v.vector[0] = pixman_int_to_fixed (offset)((pixman_fixed_t) ((uint32_t) (offset) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2524 v.vector[1] = pixman_int_to_fixed (line)((pixman_fixed_t) ((uint32_t) (line) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2525 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
2526
2527 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (bits->common.transform, &v))
2528 return iter->buffer;
2529
2530 ux = ux_top = ux_bottom = bits->common.transform->matrix[0][0];
2531 x = x_top = x_bottom = v.vector[0] - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)))/2;
2532
2533 y = v.vector[1] - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)))/2;
2534 disty = pixman_fixed_to_bilinear_weight (y);
2535
2536 /* Load the pointers to the first and second lines from the source
2537 * image that bilinear code must read.
2538 *
2539 * The main trick in this code is about the check if any line are
2540 * outside of the image;
2541 *
2542 * When I realize that a line (any one) is outside, I change
2543 * the pointer to a dummy area with zeros. Once I change this, I
2544 * must be sure the pointer will not change, so I set the
2545 * variables to each pointer increments inside the loop.
2546 */
2547 y1 = pixman_fixed_to_int (y)((int) ((y) >> 16));
2548 y2 = y1 + 1;
2549
2550 if (y1 < 0 || y1 >= bits->height)
2551 {
2552 top_row = zero;
2553 x_top = 0;
2554 ux_top = 0;
2555 }
2556 else
2557 {
2558 top_row = bits->bits + y1 * bits->rowstride;
2559 x_top = x;
2560 ux_top = ux;
2561 }
2562
2563 if (y2 < 0 || y2 >= bits->height)
2564 {
2565 bottom_row = zero;
2566 x_bottom = 0;
2567 ux_bottom = 0;
2568 }
2569 else
2570 {
2571 bottom_row = bits->bits + y2 * bits->rowstride;
2572 x_bottom = x;
2573 ux_bottom = ux;
2574 }
2575
2576 /* Instead of checking whether the operation uses the mast in
2577 * each loop iteration, verify this only once and prepare the
2578 * variables to make the code smaller inside the loop.
2579 */
2580 if (!mask)
2581 {
2582 mask_inc = 0;
2583 mask = &one;
2584 }
2585 else
2586 {
2587 /* If have a mask, prepare the variables to check it */
2588 mask_inc = 1;
2589 }
2590
2591 /* If both are zero, then the whole thing is zero */
2592 if (top_row == zero && bottom_row == zero)
2593 {
2594 memset (buffer, 0, width * sizeof (uint32_t));
2595 return iter->buffer;
2596 }
2597 else if (bits->format == PIXMAN_x8r8g8b8)
2598 {
2599 if (top_row == zero)
2600 {
2601 top_mask = 0;
2602 bottom_mask = 0xff000000;
2603 }
2604 else if (bottom_row == zero)
2605 {
2606 top_mask = 0xff000000;
2607 bottom_mask = 0;
2608 }
2609 else
2610 {
2611 top_mask = 0xff000000;
2612 bottom_mask = 0xff000000;
2613 }
2614 }
2615 else
2616 {
2617 top_mask = 0;
2618 bottom_mask = 0;
2619 }
2620
2621 end = buffer + width;
2622
2623 /* Zero fill to the left of the image */
2624 while (buffer < end && x < pixman_fixed_minus_1(((pixman_fixed_t) ((uint32_t) (-1) << 16))))
2625 {
2626 *buffer++ = 0;
2627 x += ux;
2628 x_top += ux_top;
2629 x_bottom += ux_bottom;
2630 mask += mask_inc;
2631 }
2632
2633 /* Left edge
2634 */
2635 while (buffer < end && x < 0)
2636 {
2637 uint32_t tr, br;
2638 int32_t distx;
2639
2640 tr = top_row[pixman_fixed_to_int (x_top)((int) ((x_top) >> 16)) + 1] | top_mask;
2641 br = bottom_row[pixman_fixed_to_int (x_bottom)((int) ((x_bottom) >> 16)) + 1] | bottom_mask;
2642
2643 distx = pixman_fixed_to_bilinear_weight (x);
2644
2645 *buffer++ = bilinear_interpolation (0, tr, 0, br, distx, disty);
2646
2647 x += ux;
2648 x_top += ux_top;
2649 x_bottom += ux_bottom;
2650 mask += mask_inc;
2651 }
2652
2653 /* Main part */
2654 w = pixman_int_to_fixed (bits->width - 1)((pixman_fixed_t) ((uint32_t) (bits->width - 1) << 16
))
;
2655
2656 while (buffer < end && x < w)
2657 {
2658 if (*mask)
2659 {
2660 uint32_t tl, tr, bl, br;
2661 int32_t distx;
2662
2663 tl = top_row [pixman_fixed_to_int (x_top)((int) ((x_top) >> 16))] | top_mask;
2664 tr = top_row [pixman_fixed_to_int (x_top)((int) ((x_top) >> 16)) + 1] | top_mask;
2665 bl = bottom_row [pixman_fixed_to_int (x_bottom)((int) ((x_bottom) >> 16))] | bottom_mask;
2666 br = bottom_row [pixman_fixed_to_int (x_bottom)((int) ((x_bottom) >> 16)) + 1] | bottom_mask;
2667
2668 distx = pixman_fixed_to_bilinear_weight (x);
2669
2670 *buffer = bilinear_interpolation (tl, tr, bl, br, distx, disty);
2671 }
2672
2673 buffer++;
2674 x += ux;
2675 x_top += ux_top;
2676 x_bottom += ux_bottom;
2677 mask += mask_inc;
2678 }
2679
2680 /* Right Edge */
2681 w = pixman_int_to_fixed (bits->width)((pixman_fixed_t) ((uint32_t) (bits->width) << 16));
2682 while (buffer < end && x < w)
2683 {
2684 if (*mask)
2685 {
2686 uint32_t tl, bl;
2687 int32_t distx;
2688
2689 tl = top_row [pixman_fixed_to_int (x_top)((int) ((x_top) >> 16))] | top_mask;
2690 bl = bottom_row [pixman_fixed_to_int (x_bottom)((int) ((x_bottom) >> 16))] | bottom_mask;
2691
2692 distx = pixman_fixed_to_bilinear_weight (x);
2693
2694 *buffer = bilinear_interpolation (tl, 0, bl, 0, distx, disty);
2695 }
2696
2697 buffer++;
2698 x += ux;
2699 x_top += ux_top;
2700 x_bottom += ux_bottom;
2701 mask += mask_inc;
2702 }
2703
2704 /* Zero fill to the left of the image */
2705 while (buffer < end)
2706 *buffer++ = 0;
2707
2708 return iter->buffer;
2709}
2710
2711typedef uint32_t (* convert_pixel_t) (const uint8_t *row, int x);
2712
2713static force_inline__inline__ __attribute__ ((__always_inline__)) void
2714bits_image_fetch_separable_convolution_affine (pixman_image_t * image,
2715 int offset,
2716 int line,
2717 int width,
2718 uint32_t * buffer,
2719 const uint32_t * mask,
2720
2721 convert_pixel_t convert_pixel,
2722 pixman_format_code_t format,
2723 pixman_repeat_t repeat_mode)
2724{
2725 bits_image_t *bits = &image->bits;
2726 pixman_fixed_t *params = image->common.filter_params;
2727 int cwidth = pixman_fixed_to_int (params[0])((int) ((params[0]) >> 16));
2728 int cheight = pixman_fixed_to_int (params[1])((int) ((params[1]) >> 16));
2729 int x_off = ((cwidth << 16) - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)))) >> 1;
2730 int y_off = ((cheight << 16) - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)))) >> 1;
2731 int x_phase_bits = pixman_fixed_to_int (params[2])((int) ((params[2]) >> 16));
2732 int y_phase_bits = pixman_fixed_to_int (params[3])((int) ((params[3]) >> 16));
2733 int x_phase_shift = 16 - x_phase_bits;
2734 int y_phase_shift = 16 - y_phase_bits;
2735 pixman_fixed_t vx, vy;
2736 pixman_fixed_t ux, uy;
2737 pixman_vector_t v;
2738 int k;
2739
2740 /* reference point is the center of the pixel */
2741 v.vector[0] = pixman_int_to_fixed (offset)((pixman_fixed_t) ((uint32_t) (offset) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2742 v.vector[1] = pixman_int_to_fixed (line)((pixman_fixed_t) ((uint32_t) (line) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2743 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
2744
2745 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (image->common.transform, &v))
2746 return;
2747
2748 ux = image->common.transform->matrix[0][0];
2749 uy = image->common.transform->matrix[1][0];
2750
2751 vx = v.vector[0];
2752 vy = v.vector[1];
2753
2754 for (k = 0; k < width; ++k)
2755 {
2756 pixman_fixed_t *y_params;
2757 int satot, srtot, sgtot, sbtot;
2758 pixman_fixed_t x, y;
2759 int32_t x1, x2, y1, y2;
2760 int32_t px, py;
2761 int i, j;
2762
2763 if (mask && !mask[k])
2764 goto next;
2765
2766 /* Round x and y to the middle of the closest phase before continuing. This
2767 * ensures that the convolution matrix is aligned right, since it was
2768 * positioned relative to a particular phase (and not relative to whatever
2769 * exact fraction we happen to get here).
2770 */
2771 x = ((vx >> x_phase_shift) << x_phase_shift) + ((1 << x_phase_shift) >> 1);
2772 y = ((vy >> y_phase_shift) << y_phase_shift) + ((1 << y_phase_shift) >> 1);
2773
2774 px = (x & 0xffff) >> x_phase_shift;
2775 py = (y & 0xffff) >> y_phase_shift;
2776
2777 x1 = pixman_fixed_to_int (x - pixman_fixed_e - x_off)((int) ((x - ((pixman_fixed_t) 1) - x_off) >> 16));
2778 y1 = pixman_fixed_to_int (y - pixman_fixed_e - y_off)((int) ((y - ((pixman_fixed_t) 1) - y_off) >> 16));
2779 x2 = x1 + cwidth;
2780 y2 = y1 + cheight;
2781
2782 satot = srtot = sgtot = sbtot = 0;
2783
2784 y_params = params + 4 + (1 << x_phase_bits) * cwidth + py * cheight;
2785
2786 for (i = y1; i < y2; ++i)
2787 {
2788 pixman_fixed_t fy = *y_params++;
2789
2790 if (fy)
2791 {
2792 pixman_fixed_t *x_params = params + 4 + px * cwidth;
2793
2794 for (j = x1; j < x2; ++j)
2795 {
2796 pixman_fixed_t fx = *x_params++;
2797 int rx = j;
2798 int ry = i;
2799
2800 if (fx)
2801 {
2802 pixman_fixed_t f;
2803 uint32_t pixel, mask;
2804 uint8_t *row;
2805
2806 mask = PIXMAN_FORMAT_A (format)(((format >> (12)) & ((1 << (4)) - 1)) <<
((format >> 22) & 3))
? 0 : 0xff000000;
2807
2808 if (repeat_mode != PIXMAN_REPEAT_NONE)
2809 {
2810 repeat (repeat_mode, &rx, bits->width);
2811 repeat (repeat_mode, &ry, bits->height);
2812
2813 row = (uint8_t *)(bits->bits + bits->rowstride * ry);
2814 pixel = convert_pixel (row, rx) | mask;
2815 }
2816 else
2817 {
2818 if (rx < 0 || ry < 0 || rx >= bits->width || ry >= bits->height)
2819 {
2820 pixel = 0;
2821 }
2822 else
2823 {
2824 row = (uint8_t *)(bits->bits + bits->rowstride * ry);
2825 pixel = convert_pixel (row, rx) | mask;
2826 }
2827 }
2828
2829 f = ((pixman_fixed_32_32_t)fx * fy + 0x8000) >> 16;
2830 srtot += (int)RED_8 (pixel)(((pixel) >> 8 * 2) & 0xff) * f;
2831 sgtot += (int)GREEN_8 (pixel)(((pixel) >> 8) & 0xff) * f;
2832 sbtot += (int)BLUE_8 (pixel)((pixel) & 0xff) * f;
2833 satot += (int)ALPHA_8 (pixel)((pixel) >> 8 * 3) * f;
2834 }
2835 }
2836 }
2837 }
2838
2839 satot = (satot + 0x8000) >> 16;
2840 srtot = (srtot + 0x8000) >> 16;
2841 sgtot = (sgtot + 0x8000) >> 16;
2842 sbtot = (sbtot + 0x8000) >> 16;
2843
2844 satot = CLIP (satot, 0, 0xff)((satot) < (0) ? (0) : ((satot) > (0xff) ? (0xff) : (satot
)))
;
2845 srtot = CLIP (srtot, 0, 0xff)((srtot) < (0) ? (0) : ((srtot) > (0xff) ? (0xff) : (srtot
)))
;
2846 sgtot = CLIP (sgtot, 0, 0xff)((sgtot) < (0) ? (0) : ((sgtot) > (0xff) ? (0xff) : (sgtot
)))
;
2847 sbtot = CLIP (sbtot, 0, 0xff)((sbtot) < (0) ? (0) : ((sbtot) > (0xff) ? (0xff) : (sbtot
)))
;
2848
2849 buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
2850
2851 next:
2852 vx += ux;
2853 vy += uy;
2854 }
2855}
2856
2857static const uint32_t zero[2] = { 0, 0 };
2858
2859static force_inline__inline__ __attribute__ ((__always_inline__)) void
2860bits_image_fetch_bilinear_affine (pixman_image_t * image,
2861 int offset,
2862 int line,
2863 int width,
2864 uint32_t * buffer,
2865 const uint32_t * mask,
2866
2867 convert_pixel_t convert_pixel,
2868 pixman_format_code_t format,
2869 pixman_repeat_t repeat_mode)
2870{
2871 pixman_fixed_t x, y;
2872 pixman_fixed_t ux, uy;
2873 pixman_vector_t v;
2874 bits_image_t *bits = &image->bits;
2875 int i;
2876
2877 /* reference point is the center of the pixel */
2878 v.vector[0] = pixman_int_to_fixed (offset)((pixman_fixed_t) ((uint32_t) (offset) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2879 v.vector[1] = pixman_int_to_fixed (line)((pixman_fixed_t) ((uint32_t) (line) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2880 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
2881
2882 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (image->common.transform, &v))
2883 return;
2884
2885 ux = image->common.transform->matrix[0][0];
2886 uy = image->common.transform->matrix[1][0];
2887
2888 x = v.vector[0];
2889 y = v.vector[1];
2890
2891 for (i = 0; i < width; ++i)
2892 {
2893 int x1, y1, x2, y2;
2894 uint32_t tl, tr, bl, br;
2895 int32_t distx, disty;
2896 int width = image->bits.width;
2897 int height = image->bits.height;
2898 const uint8_t *row1;
2899 const uint8_t *row2;
2900
2901 if (mask && !mask[i])
2902 goto next;
2903
2904 x1 = x - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2905 y1 = y - pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
2906
2907 distx = pixman_fixed_to_bilinear_weight (x1);
2908 disty = pixman_fixed_to_bilinear_weight (y1);
2909
2910 y1 = pixman_fixed_to_int (y1)((int) ((y1) >> 16));
2911 y2 = y1 + 1;
2912 x1 = pixman_fixed_to_int (x1)((int) ((x1) >> 16));
2913 x2 = x1 + 1;
2914
2915 if (repeat_mode != PIXMAN_REPEAT_NONE)
2916 {
2917 uint32_t mask;
2918
2919 mask = PIXMAN_FORMAT_A (format)(((format >> (12)) & ((1 << (4)) - 1)) <<
((format >> 22) & 3))
? 0 : 0xff000000;
2920
2921 repeat (repeat_mode, &x1, width);
2922 repeat (repeat_mode, &y1, height);
2923 repeat (repeat_mode, &x2, width);
2924 repeat (repeat_mode, &y2, height);
2925
2926 row1 = (uint8_t *)(bits->bits + bits->rowstride * y1);
2927 row2 = (uint8_t *)(bits->bits + bits->rowstride * y2);
2928
2929 tl = convert_pixel (row1, x1) | mask;
2930 tr = convert_pixel (row1, x2) | mask;
2931 bl = convert_pixel (row2, x1) | mask;
2932 br = convert_pixel (row2, x2) | mask;
2933 }
2934 else
2935 {
2936 uint32_t mask1, mask2;
2937 int bpp;
2938
2939 /* Note: PIXMAN_FORMAT_BPP() returns an unsigned value,
2940 * which means if you use it in expressions, those
2941 * expressions become unsigned themselves. Since
2942 * the variables below can be negative in some cases,
2943 * that will lead to crashes on 64 bit architectures.
2944 *
2945 * So this line makes sure bpp is signed
2946 */
2947 bpp = PIXMAN_FORMAT_BPP (format)(((format >> (24)) & ((1 << (8)) - 1)) <<
((format >> 22) & 3))
;
2948
2949 if (x1 >= width || x2 < 0 || y1 >= height || y2 < 0)
2950 {
2951 buffer[i] = 0;
2952 goto next;
2953 }
2954
2955 if (y2 == 0)
2956 {
2957 row1 = (const uint8_t *)zero;
2958 mask1 = 0;
2959 }
2960 else
2961 {
2962 row1 = (uint8_t *)(bits->bits + bits->rowstride * y1);
2963 row1 += bpp / 8 * x1;
2964
2965 mask1 = PIXMAN_FORMAT_A (format)(((format >> (12)) & ((1 << (4)) - 1)) <<
((format >> 22) & 3))
? 0 : 0xff000000;
2966 }
2967
2968 if (y1 == height - 1)
2969 {
2970 row2 = (const uint8_t *)zero;
2971 mask2 = 0;
2972 }
2973 else
2974 {
2975 row2 = (uint8_t *)(bits->bits + bits->rowstride * y2);
2976 row2 += bpp / 8 * x1;
2977
2978 mask2 = PIXMAN_FORMAT_A (format)(((format >> (12)) & ((1 << (4)) - 1)) <<
((format >> 22) & 3))
? 0 : 0xff000000;
2979 }
2980
2981 if (x2 == 0)
2982 {
2983 tl = 0;
2984 bl = 0;
2985 }
2986 else
2987 {
2988 tl = convert_pixel (row1, 0) | mask1;
2989 bl = convert_pixel (row2, 0) | mask2;
2990 }
2991
2992 if (x1 == width - 1)
2993 {
2994 tr = 0;
2995 br = 0;
2996 }
2997 else
2998 {
2999 tr = convert_pixel (row1, 1) | mask1;
3000 br = convert_pixel (row2, 1) | mask2;
3001 }
3002 }
3003
3004 buffer[i] = bilinear_interpolation (
3005 tl, tr, bl, br, distx, disty);
3006
3007 next:
3008 x += ux;
3009 y += uy;
3010 }
3011}
3012
3013static force_inline__inline__ __attribute__ ((__always_inline__)) void
3014bits_image_fetch_nearest_affine (pixman_image_t * image,
3015 int offset,
3016 int line,
3017 int width,
3018 uint32_t * buffer,
3019 const uint32_t * mask,
3020
3021 convert_pixel_t convert_pixel,
3022 pixman_format_code_t format,
3023 pixman_repeat_t repeat_mode)
3024{
3025 pixman_fixed_t x, y;
3026 pixman_fixed_t ux, uy;
3027 pixman_vector_t v;
3028 bits_image_t *bits = &image->bits;
3029 int i;
3030
3031 /* reference point is the center of the pixel */
3032 v.vector[0] = pixman_int_to_fixed (offset)((pixman_fixed_t) ((uint32_t) (offset) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
3033 v.vector[1] = pixman_int_to_fixed (line)((pixman_fixed_t) ((uint32_t) (line) << 16)) + pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16))) / 2;
3034 v.vector[2] = pixman_fixed_1(((pixman_fixed_t) ((uint32_t) (1) << 16)));
3035
3036 if (!pixman_transform_point_3d_moz_pixman_transform_point_3d (image->common.transform, &v))
3037 return;
3038
3039 ux = image->common.transform->matrix[0][0];
3040 uy = image->common.transform->matrix[1][0];
3041
3042 x = v.vector[0];
3043 y = v.vector[1];
3044
3045 for (i = 0; i < width; ++i)
3046 {
3047 int width, height, x0, y0;
3048 const uint8_t *row;
3049
3050 if (mask && !mask[i])
3051 goto next;
3052
3053 width = image->bits.width;
3054 height = image->bits.height;
3055 x0 = pixman_fixed_to_int (x - pixman_fixed_e)((int) ((x - ((pixman_fixed_t) 1)) >> 16));
3056 y0 = pixman_fixed_to_int (y - pixman_fixed_e)((int) ((y - ((pixman_fixed_t) 1)) >> 16));
3057
3058 if (repeat_mode == PIXMAN_REPEAT_NONE &&
3059 (y0 < 0 || y0 >= height || x0 < 0 || x0 >= width))
3060 {
3061 buffer[i] = 0;
3062 }
3063 else
3064 {
3065 uint32_t mask = PIXMAN_FORMAT_A (format)(((format >> (12)) & ((1 << (4)) - 1)) <<
((format >> 22) & 3))
? 0 : 0xff000000;
3066
3067 if (repeat_mode != PIXMAN_REPEAT_NONE)
3068 {
3069 repeat (repeat_mode, &x0, width);
3070 repeat (repeat_mode, &y0, height);
3071 }
3072
3073 row = (uint8_t *)(bits->bits + bits->rowstride * y0);
3074
3075 buffer[i] = convert_pixel (row, x0) | mask;
3076 }
3077
3078 next:
3079 x += ux;
3080 y += uy;
3081 }
3082}
3083
3084static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
3085convert_a8r8g8b8 (const uint8_t *row, int x)
3086{
3087 return *(((uint32_t *)row) + x);
3088}
3089
3090static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
3091convert_x8r8g8b8 (const uint8_t *row, int x)
3092{
3093 return *(((uint32_t *)row) + x);
3094}
3095
3096static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
3097convert_a8 (const uint8_t *row, int x)
3098{
3099 return (uint32_t) *(row + x) << 24;
3100}
3101
3102static force_inline__inline__ __attribute__ ((__always_inline__)) uint32_t
3103convert_r5g6b5 (const uint8_t *row, int x)
3104{
3105 return convert_0565_to_0888 (*((uint16_t *)row + x));
3106}
3107
3108#define MAKE_SEPARABLE_CONVOLUTION_FETCHER(name, format, repeat_mode)static uint32_t * bits_image_fetch_separable_convolution_affine_name
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3109 static uint32_t * \
3110 bits_image_fetch_separable_convolution_affine_ ## name (pixman_iter_t *iter, \
3111 const uint32_t * mask) \
3112 { \
3113 bits_image_fetch_separable_convolution_affine ( \
3114 iter->image, \
3115 iter->x, iter->y++, \
3116 iter->width, \
3117 iter->buffer, mask, \
3118 convert_ ## format, \
3119 PIXMAN_ ## format, \
3120 repeat_mode); \
3121 \
3122 return iter->buffer; \
3123 }
3124
3125#define MAKE_BILINEAR_FETCHER(name, format, repeat_mode)static uint32_t * bits_image_fetch_bilinear_affine_name (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3126 static uint32_t * \
3127 bits_image_fetch_bilinear_affine_ ## name (pixman_iter_t *iter, \
3128 const uint32_t * mask) \
3129 { \
3130 bits_image_fetch_bilinear_affine (iter->image, \
3131 iter->x, iter->y++, \
3132 iter->width, \
3133 iter->buffer, mask, \
3134 convert_ ## format, \
3135 PIXMAN_ ## format, \
3136 repeat_mode); \
3137 return iter->buffer; \
3138 }
3139
3140#define MAKE_NEAREST_FETCHER(name, format, repeat_mode)static uint32_t * bits_image_fetch_nearest_affine_name (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3141 static uint32_t * \
3142 bits_image_fetch_nearest_affine_ ## name (pixman_iter_t *iter, \
3143 const uint32_t * mask) \
3144 { \
3145 bits_image_fetch_nearest_affine (iter->image, \
3146 iter->x, iter->y++, \
3147 iter->width, \
3148 iter->buffer, mask, \
3149 convert_ ## format, \
3150 PIXMAN_ ## format, \
3151 repeat_mode); \
3152 return iter->buffer; \
3153 }
3154
3155#define MAKE_FETCHERS(name, format, repeat_mode)static uint32_t * bits_image_fetch_nearest_affine_name (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_name
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_name
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3156 MAKE_NEAREST_FETCHER (name, format, repeat_mode)static uint32_t * bits_image_fetch_nearest_affine_name (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3157 MAKE_BILINEAR_FETCHER (name, format, repeat_mode)static uint32_t * bits_image_fetch_bilinear_affine_name (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
\
3158 MAKE_SEPARABLE_CONVOLUTION_FETCHER (name, format, repeat_mode)static uint32_t * bits_image_fetch_separable_convolution_affine_name
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_format, PIXMAN_format, repeat_mode
); return iter->buffer; }
3159
3160MAKE_FETCHERS (pad_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_PAD)static uint32_t * bits_image_fetch_nearest_affine_pad_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_pad_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_pad_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; }
3161MAKE_FETCHERS (none_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_NONE)static uint32_t * bits_image_fetch_nearest_affine_none_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_none_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_none_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; }
3162MAKE_FETCHERS (reflect_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_REFLECT)static uint32_t * bits_image_fetch_nearest_affine_reflect_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_reflect_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_reflect_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; }
3163MAKE_FETCHERS (normal_a8r8g8b8, a8r8g8b8, PIXMAN_REPEAT_NORMAL)static uint32_t * bits_image_fetch_nearest_affine_normal_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_normal_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_normal_a8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8r8g8b8, PIXMAN_a8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; }
3164MAKE_FETCHERS (pad_x8r8g8b8, x8r8g8b8, PIXMAN_REPEAT_PAD)static uint32_t * bits_image_fetch_nearest_affine_pad_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_pad_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_pad_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_PAD
); return iter->buffer; }
3165MAKE_FETCHERS (none_x8r8g8b8, x8r8g8b8, PIXMAN_REPEAT_NONE)static uint32_t * bits_image_fetch_nearest_affine_none_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_none_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_none_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NONE
); return iter->buffer; }
3166MAKE_FETCHERS (reflect_x8r8g8b8, x8r8g8b8, PIXMAN_REPEAT_REFLECT)static uint32_t * bits_image_fetch_nearest_affine_reflect_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_reflect_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_reflect_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; }
3167MAKE_FETCHERS (normal_x8r8g8b8, x8r8g8b8, PIXMAN_REPEAT_NORMAL)static uint32_t * bits_image_fetch_nearest_affine_normal_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_normal_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_normal_x8r8g8b8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_x8r8g8b8, PIXMAN_x8r8g8b8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; }
3168MAKE_FETCHERS (pad_a8, a8, PIXMAN_REPEAT_PAD)static uint32_t * bits_image_fetch_nearest_affine_pad_a8 (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_PAD);
return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_pad_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_PAD);
return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_pad_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_PAD);
return iter->buffer; }
3169MAKE_FETCHERS (none_a8, a8, PIXMAN_REPEAT_NONE)static uint32_t * bits_image_fetch_nearest_affine_none_a8 (pixman_iter_t
*iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NONE)
; return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_none_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NONE)
; return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_none_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NONE)
; return iter->buffer; }
3170MAKE_FETCHERS (reflect_a8, a8, PIXMAN_REPEAT_REFLECT)static uint32_t * bits_image_fetch_nearest_affine_reflect_a8 (
pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_reflect_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_reflect_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_REFLECT
); return iter->buffer; }
3171MAKE_FETCHERS (normal_a8, a8, PIXMAN_REPEAT_NORMAL)static uint32_t * bits_image_fetch_nearest_affine_normal_a8 (
pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_normal_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_normal_a8
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_a8, PIXMAN_a8, PIXMAN_REPEAT_NORMAL
); return iter->buffer; }
3172MAKE_FETCHERS (pad_r5g6b5, r5g6b5, PIXMAN_REPEAT_PAD)static uint32_t * bits_image_fetch_nearest_affine_pad_r5g6b5 (
pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_pad_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_PAD
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_pad_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_PAD
); return iter->buffer; }
3173MAKE_FETCHERS (none_r5g6b5, r5g6b5, PIXMAN_REPEAT_NONE)static uint32_t * bits_image_fetch_nearest_affine_none_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_none_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NONE
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_none_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NONE
); return iter->buffer; }
3174MAKE_FETCHERS (reflect_r5g6b5, r5g6b5, PIXMAN_REPEAT_REFLECT)static uint32_t * bits_image_fetch_nearest_affine_reflect_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_reflect_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_REFLECT
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_reflect_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_REFLECT
); return iter->buffer; }
3175MAKE_FETCHERS (normal_r5g6b5, r5g6b5, PIXMAN_REPEAT_NORMAL)static uint32_t * bits_image_fetch_nearest_affine_normal_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_nearest_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_bilinear_affine_normal_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_bilinear_affine
(iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NORMAL
); return iter->buffer; } static uint32_t * bits_image_fetch_separable_convolution_affine_normal_r5g6b5
(pixman_iter_t *iter, const uint32_t * mask) { bits_image_fetch_separable_convolution_affine
( iter->image, iter->x, iter->y++, iter->width, iter
->buffer, mask, convert_r5g6b5, PIXMAN_r5g6b5, PIXMAN_REPEAT_NORMAL
); return iter->buffer; }
3176
3177#define IMAGE_FLAGS(((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (1 << 0) | (1 << 25) | (1 << 23))
\
3178 (FAST_PATH_STANDARD_FLAGS((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6))
| FAST_PATH_ID_TRANSFORM(1 << 0) | \
3179 FAST_PATH_BITS_IMAGE(1 << 25) | FAST_PATH_SAMPLES_COVER_CLIP_NEAREST(1 << 23))
3180
3181static const pixman_iter_info_t fast_iters[] =
3182{
3183 { PIXMAN_r5g6b5, IMAGE_FLAGS(((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6)) | (1 << 0) | (1 << 25) | (1 << 23))
, ITER_NARROW | ITER_SRC,
3184 _pixman_iter_init_bits_stride, fast_fetch_r5g6b5, NULL((void*)0) },
3185
3186 { PIXMAN_r5g6b5, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)),
3187 ITER_NARROW | ITER_DEST,
3188 _pixman_iter_init_bits_stride,
3189 fast_fetch_r5g6b5, fast_write_back_r5g6b5 },
3190
3191 { PIXMAN_r5g6b5, FAST_PATH_STD_DEST_FLAGS((1 << 5) | (1 << 1) | (1 << 6)),
3192 ITER_NARROW | ITER_DEST | ITER_IGNORE_RGB | ITER_IGNORE_ALPHA,
3193 _pixman_iter_init_bits_stride,
3194 fast_dest_fetch_noop, fast_write_back_r5g6b5 },
3195
3196 { PIXMAN_a8r8g8b8,
3197 (FAST_PATH_STANDARD_FLAGS((1 << 2) | (1 << 5) | (1 << 1) | (1 <<
6))
|
3198 FAST_PATH_SCALE_TRANSFORM(1 << 10) |
3199 FAST_PATH_BILINEAR_FILTER(1 << 19) |
3200 FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR(1 << 24)),
3201 ITER_NARROW | ITER_SRC,
3202 fast_bilinear_cover_iter_init,
3203 NULL((void*)0), NULL((void*)0)
3204 },
3205
3206#define FAST_BILINEAR_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 16) | (1 << 18) | ((1 << 14) |
(1 << 3) | (1 << 4)) | (1 << 19))
\
3207 (FAST_PATH_NO_ALPHA_MAP(1 << 1) | \
3208 FAST_PATH_NO_ACCESSORS(1 << 5) | \
3209 FAST_PATH_HAS_TRANSFORM(1 << 12) | \
3210 FAST_PATH_AFFINE_TRANSFORM(1 << 17) | \
3211 FAST_PATH_X_UNIT_POSITIVE(1 << 16) | \
3212 FAST_PATH_Y_UNIT_ZERO(1 << 18) | \
3213 FAST_PATH_NONE_REPEAT((1 << 14) | (1 << 3) | (1 << 4)) | \
3214 FAST_PATH_BILINEAR_FILTER(1 << 19))
3215
3216 { PIXMAN_a8r8g8b8,
3217 FAST_BILINEAR_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 16) | (1 << 18) | ((1 << 14) |
(1 << 3) | (1 << 4)) | (1 << 19))
,
3218 ITER_NARROW | ITER_SRC,
3219 NULL((void*)0), bits_image_fetch_bilinear_no_repeat_8888, NULL((void*)0)
3220 },
3221
3222 { PIXMAN_x8r8g8b8,
3223 FAST_BILINEAR_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 16) | (1 << 18) | ((1 << 14) |
(1 << 3) | (1 << 4)) | (1 << 19))
,
3224 ITER_NARROW | ITER_SRC,
3225 NULL((void*)0), bits_image_fetch_bilinear_no_repeat_8888, NULL((void*)0)
3226 },
3227
3228#define GENERAL_BILINEAR_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 19))
\
3229 (FAST_PATH_NO_ALPHA_MAP(1 << 1) | \
3230 FAST_PATH_NO_ACCESSORS(1 << 5) | \
3231 FAST_PATH_HAS_TRANSFORM(1 << 12) | \
3232 FAST_PATH_AFFINE_TRANSFORM(1 << 17) | \
3233 FAST_PATH_BILINEAR_FILTER(1 << 19))
3234
3235#define GENERAL_NEAREST_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 11))
\
3236 (FAST_PATH_NO_ALPHA_MAP(1 << 1) | \
3237 FAST_PATH_NO_ACCESSORS(1 << 5) | \
3238 FAST_PATH_HAS_TRANSFORM(1 << 12) | \
3239 FAST_PATH_AFFINE_TRANSFORM(1 << 17) | \
3240 FAST_PATH_NEAREST_FILTER(1 << 11))
3241
3242#define GENERAL_SEPARABLE_CONVOLUTION_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 26))
\
3243 (FAST_PATH_NO_ALPHA_MAP(1 << 1) | \
3244 FAST_PATH_NO_ACCESSORS(1 << 5) | \
3245 FAST_PATH_HAS_TRANSFORM(1 << 12) | \
3246 FAST_PATH_AFFINE_TRANSFORM(1 << 17) | \
3247 FAST_PATH_SEPARABLE_CONVOLUTION_FILTER(1 << 26))
3248
3249#define SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 26)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_name
, ((void*)0) },
\
3250 { PIXMAN_ ## format, \
3251 GENERAL_SEPARABLE_CONVOLUTION_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 26))
| FAST_PATH_ ## repeat ## _REPEAT, \
3252 ITER_NARROW | ITER_SRC, \
3253 NULL((void*)0), bits_image_fetch_separable_convolution_affine_ ## name, NULL((void*)0) \
3254 },
3255
3256#define BILINEAR_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 19)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_name
, ((void*)0), },
\
3257 { PIXMAN_ ## format, \
3258 GENERAL_BILINEAR_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 19))
| FAST_PATH_ ## repeat ## _REPEAT, \
3259 ITER_NARROW | ITER_SRC, \
3260 NULL((void*)0), bits_image_fetch_bilinear_affine_ ## name, NULL((void*)0), \
3261 },
3262
3263#define NEAREST_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_nearest_affine_name
, ((void*)0) },
\
3264 { PIXMAN_ ## format, \
3265 GENERAL_NEAREST_FLAGS((1 << 1) | (1 << 5) | (1 << 12) | (1 <<
17) | (1 << 11))
| FAST_PATH_ ## repeat ## _REPEAT, \
3266 ITER_NARROW | ITER_SRC, \
3267 NULL((void*)0), bits_image_fetch_nearest_affine_ ## name, NULL((void*)0) \
3268 },
3269
3270#define AFFINE_FAST_PATHS(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_nearest_affine_name
, ((void*)0) }, { PIXMAN_format, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 19)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_name
, ((void*)0), }, { PIXMAN_format, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_name
, ((void*)0) },
\
3271 NEAREST_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_nearest_affine_name
, ((void*)0) },
\
3272 BILINEAR_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 19)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_name
, ((void*)0), },
\
3273 SEPARABLE_CONVOLUTION_AFFINE_FAST_PATH(name, format, repeat){ PIXMAN_format, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 26)) | FAST_PATH_repeat_REPEAT
, ITER_NARROW | ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_name
, ((void*)0) },
3274
3275 AFFINE_FAST_PATHS (pad_a8r8g8b8, a8r8g8b8, PAD){ PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_pad_a8r8g8b8, ((void
*)0) }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) |
(1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
15) | (1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_pad_a8r8g8b8, (
(void*)0), }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 14) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_pad_a8r8g8b8
, ((void*)0) },
3276 AFFINE_FAST_PATHS (none_a8r8g8b8, a8r8g8b8, NONE){ PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 14) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_none_a8r8g8b8, ((void
*)0) }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) |
(1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
14) | (1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_none_a8r8g8b8,
((void*)0), }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 14) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_none_a8r8g8b8
, ((void*)0) },
3277 AFFINE_FAST_PATHS (reflect_a8r8g8b8, a8r8g8b8, REFLECT){ PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_reflect_a8r8g8b8, (
(void*)0) }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 19)) | (
(1 << 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_reflect_a8r8g8b8
, ((void*)0), }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_reflect_a8r8g8b8
, ((void*)0) },
3278 AFFINE_FAST_PATHS (normal_a8r8g8b8, a8r8g8b8, NORMAL){ PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_normal_a8r8g8b8, ((
void*)0) }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 << 5
) | (1 << 12) | (1 << 17) | (1 << 19)) | ((
1 << 15) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_normal_a8r8g8b8
, ((void*)0), }, { PIXMAN_a8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_normal_a8r8g8b8
, ((void*)0) },
3279 AFFINE_FAST_PATHS (pad_x8r8g8b8, x8r8g8b8, PAD){ PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_pad_x8r8g8b8, ((void
*)0) }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) |
(1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
15) | (1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_pad_x8r8g8b8, (
(void*)0), }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 14) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_pad_x8r8g8b8
, ((void*)0) },
3280 AFFINE_FAST_PATHS (none_x8r8g8b8, x8r8g8b8, NONE){ PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 14) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_none_x8r8g8b8, ((void
*)0) }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) |
(1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
14) | (1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_none_x8r8g8b8,
((void*)0), }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 14) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_none_x8r8g8b8
, ((void*)0) },
3281 AFFINE_FAST_PATHS (reflect_x8r8g8b8, x8r8g8b8, REFLECT){ PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_reflect_x8r8g8b8, (
(void*)0) }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 19)) | (
(1 << 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_reflect_x8r8g8b8
, ((void*)0), }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_reflect_x8r8g8b8
, ((void*)0) },
3282 AFFINE_FAST_PATHS (normal_x8r8g8b8, x8r8g8b8, NORMAL){ PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_normal_x8r8g8b8, ((
void*)0) }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 << 5
) | (1 << 12) | (1 << 17) | (1 << 19)) | ((
1 << 15) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_normal_x8r8g8b8
, ((void*)0), }, { PIXMAN_x8r8g8b8, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_normal_x8r8g8b8
, ((void*)0) },
3283 AFFINE_FAST_PATHS (pad_a8, a8, PAD){ PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 11)) | ((1 << 15) | (
1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_nearest_affine_pad_a8, ((void*)0) }, {
PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 19)) | ((1 << 15) | (
1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_bilinear_affine_pad_a8, ((void*)0), },
{ PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 26)) | ((1 << 15) | (
1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_separable_convolution_affine_pad_a8, (
(void*)0) },
3284 AFFINE_FAST_PATHS (none_a8, a8, NONE){ PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 11)) | ((1 << 14) | (
1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_nearest_affine_none_a8, ((void*)0) }, {
PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 19)) | ((1 << 14) | (
1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_bilinear_affine_none_a8, ((void*)0), }
, { PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 26)) | ((1 << 14) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_separable_convolution_affine_none_a8
, ((void*)0) },
3285 AFFINE_FAST_PATHS (reflect_a8, a8, REFLECT){ PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 11)) | ((1 << 15) | (
1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_nearest_affine_reflect_a8, ((void*)0) }
, { PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 19)) | ((1 << 15) |
(1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_bilinear_affine_reflect_a8, ((void
*)0), }, { PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 26)) | ((1 << 15) |
(1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_separable_convolution_affine_reflect_a8
, ((void*)0) },
3286 AFFINE_FAST_PATHS (normal_a8, a8, NORMAL){ PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 << 12
) | (1 << 17) | (1 << 11)) | ((1 << 15) | (
1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((void
*)0), bits_image_fetch_nearest_affine_normal_a8, ((void*)0) }
, { PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 19)) | ((1 << 15) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_bilinear_affine_normal_a8, ((void*
)0), }, { PIXMAN_a8, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 26)) | ((1 << 15) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_separable_convolution_affine_normal_a8
, ((void*)0) },
3287 AFFINE_FAST_PATHS (pad_r5g6b5, r5g6b5, PAD){ PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_pad_r5g6b5, ((void
*)0) }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (
1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
15) | (1 << 14) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_pad_r5g6b5, ((
void*)0), }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5
) | (1 << 12) | (1 << 17) | (1 << 26)) | ((
1 << 15) | (1 << 14) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_pad_r5g6b5
, ((void*)0) },
3288 AFFINE_FAST_PATHS (none_r5g6b5, r5g6b5, NONE){ PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 14) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_none_r5g6b5, ((void
*)0) }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (
1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
14) | (1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_none_r5g6b5, (
(void*)0), }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5
) | (1 << 12) | (1 << 17) | (1 << 26)) | ((
1 << 14) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_none_r5g6b5
, ((void*)0) },
3289 AFFINE_FAST_PATHS (reflect_r5g6b5, r5g6b5, REFLECT){ PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 14) | (1 << 3)), ITER_NARROW | ITER_SRC, (
(void*)0), bits_image_fetch_nearest_affine_reflect_r5g6b5, ((
void*)0) }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5)
| (1 << 12) | (1 << 17) | (1 << 19)) | ((1
<< 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_bilinear_affine_reflect_r5g6b5
, ((void*)0), }, { PIXMAN_r5g6b5, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 14) | (1 << 3)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_reflect_r5g6b5
, ((void*)0) },
3290 AFFINE_FAST_PATHS (normal_r5g6b5, r5g6b5, NORMAL){ PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (1 <<
12) | (1 << 17) | (1 << 11)) | ((1 << 15) |
(1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC, ((
void*)0), bits_image_fetch_nearest_affine_normal_r5g6b5, ((void
*)0) }, { PIXMAN_r5g6b5, ((1 << 1) | (1 << 5) | (
1 << 12) | (1 << 17) | (1 << 19)) | ((1 <<
15) | (1 << 3) | (1 << 4)), ITER_NARROW | ITER_SRC
, ((void*)0), bits_image_fetch_bilinear_affine_normal_r5g6b5,
((void*)0), }, { PIXMAN_r5g6b5, ((1 << 1) | (1 <<
5) | (1 << 12) | (1 << 17) | (1 << 26)) | (
(1 << 15) | (1 << 3) | (1 << 4)), ITER_NARROW
| ITER_SRC, ((void*)0), bits_image_fetch_separable_convolution_affine_normal_r5g6b5
, ((void*)0) },
3291
3292 { PIXMAN_null(((0) << 24) | ((0) << 16) | ((0) << 12) | (
(0) << 8) | ((0) << 4) | ((0)))
},
3293};
3294
3295pixman_implementation_t *
3296_pixman_implementation_create_fast_path (pixman_implementation_t *fallback)
3297{
3298 pixman_implementation_t *imp = _pixman_implementation_create (fallback, c_fast_paths);
3299
3300 imp->fill = fast_path_fill;
3301 imp->iter_info = fast_iters;
3302
3303 return imp;
3304}