2 * Copyright © 2009 Red Hat, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Red Hat not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. Red Hat makes no representations about the
11 * suitability of this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
15 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
17 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
19 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
20 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
24 #include "pixman-private.h"
27 combine_32 (pixman_implementation_t *imp, pixman_op_t op,
28 uint32_t *dest, const uint32_t *src, const uint32_t *mask,
31 CombineFunc32 f = pixman_composeFunctions.combineU[op];
33 f (dest, src, mask, width);
37 combine_64 (pixman_implementation_t *imp, pixman_op_t op,
38 uint64_t *dest, const uint64_t *src, const uint64_t *mask,
41 CombineFunc64 f = pixman_composeFunctions64.combineU[op];
43 f (dest, src, mask, width);
47 combine_32_ca (pixman_implementation_t *imp, pixman_op_t op,
48 uint32_t *dest, const uint32_t *src, const uint32_t *mask,
51 CombineFunc32 f = pixman_composeFunctions.combineC[op];
53 f (dest, src, mask, width);
57 combine_64_ca (pixman_implementation_t *imp, pixman_op_t op,
58 uint64_t *dest, const uint64_t *src, const uint64_t *mask,
61 CombineFunc64 f = pixman_composeFunctions64.combineC[op];
63 f (dest, src, mask, width);
66 pixman_implementation_t *
67 _pixman_implementation_create_general (pixman_implementation_t *toplevel)
69 pixman_implementation_t *imp = _pixman_implementation_create (toplevel, NULL);
72 for (i = 0; i < PIXMAN_OP_LAST; ++i)
74 imp->combine_32[i] = combine_32;
75 imp->combine_64[i] = combine_64;
76 imp->combine_32_ca[i] = combine_32_ca;
77 imp->combine_64_ca[i] = combine_64_ca;