Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */ |
2 | /* cairo - a vector graphics library with display and print output |
||
3 | * |
||
4 | * Copyright © 2011 Intel Corporation |
||
5 | * |
||
6 | * This library is free software; you can redistribute it and/or |
||
7 | * modify it either under the terms of the GNU Lesser General Public |
||
8 | * License version 2.1 as published by the Free Software Foundation |
||
9 | * (the "LGPL") or, at your option, under the terms of the Mozilla |
||
10 | * Public License Version 1.1 (the "MPL"). If you do not alter this |
||
11 | * notice, a recipient may use your version of this file under either |
||
12 | * the MPL or the LGPL. |
||
13 | * |
||
14 | * You should have received a copy of the LGPL along with this library |
||
15 | * in the file COPYING-LGPL-2.1; if not, write to the Free Software |
||
16 | * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA |
||
17 | * You should have received a copy of the MPL along with this library |
||
18 | * in the file COPYING-MPL-1.1 |
||
19 | * |
||
20 | * The contents of this file are subject to the Mozilla Public License |
||
21 | * Version 1.1 (the "License"); you may not use this file except in |
||
22 | * compliance with the License. You may obtain a copy of the License at |
||
23 | * http://www.mozilla.org/MPL/ |
||
24 | * |
||
25 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY |
||
26 | * OF ANY KIND, either express or implied. See the LGPL or the MPL for |
||
27 | * the specific language governing rights and limitations. |
||
28 | * |
||
29 | * The Original Code is the cairo graphics library. |
||
30 | * |
||
31 | * The Initial Developer of the Original Code is University of Southern |
||
32 | * California. |
||
33 | * |
||
34 | * Contributor(s): |
||
35 | * Chris Wilson |
||
36 | */ |
||
37 | |||
38 | #ifndef CAIRO_SPANS_COMPOSITOR_PRIVATE_H |
||
39 | #define CAIRO_SPANS_COMPOSITOR_PRIVATE_H |
||
40 | |||
41 | #include "cairo-compositor-private.h" |
||
42 | #include "cairo-types-private.h" |
||
43 | #include "cairo-spans-private.h" |
||
44 | |||
45 | CAIRO_BEGIN_DECLS |
||
46 | |||
47 | typedef struct _cairo_abstract_span_renderer { |
||
48 | cairo_span_renderer_t base; |
||
49 | char data[4096]; |
||
50 | } cairo_abstract_span_renderer_t; |
||
51 | |||
52 | struct cairo_spans_compositor { |
||
53 | cairo_compositor_t base; |
||
54 | |||
55 | unsigned int flags; |
||
56 | #define CAIRO_SPANS_COMPOSITOR_HAS_LERP 0x1 |
||
57 | |||
58 | /* pixel-aligned fast paths */ |
||
59 | cairo_int_status_t (*fill_boxes) (void *surface, |
||
60 | cairo_operator_t op, |
||
61 | const cairo_color_t *color, |
||
62 | cairo_boxes_t *boxes); |
||
63 | |||
64 | cairo_int_status_t (*draw_image_boxes) (void *surface, |
||
65 | cairo_image_surface_t *image, |
||
66 | cairo_boxes_t *boxes, |
||
67 | int dx, int dy); |
||
68 | |||
69 | cairo_int_status_t (*copy_boxes) (void *surface, |
||
70 | cairo_surface_t *src, |
||
71 | cairo_boxes_t *boxes, |
||
72 | const cairo_rectangle_int_t *extents, |
||
73 | int dx, int dy); |
||
74 | |||
75 | cairo_surface_t * (*pattern_to_surface) (cairo_surface_t *dst, |
||
76 | const cairo_pattern_t *pattern, |
||
77 | cairo_bool_t is_mask, |
||
78 | const cairo_rectangle_int_t *extents, |
||
79 | const cairo_rectangle_int_t *sample, |
||
80 | int *src_x, int *src_y); |
||
81 | |||
82 | cairo_int_status_t (*composite_boxes) (void *surface, |
||
83 | cairo_operator_t op, |
||
84 | cairo_surface_t *source, |
||
85 | cairo_surface_t *mask, |
||
86 | int src_x, |
||
87 | int src_y, |
||
88 | int mask_x, |
||
89 | int mask_y, |
||
90 | int dst_x, |
||
91 | int dst_y, |
||
92 | cairo_boxes_t *boxes, |
||
93 | const cairo_rectangle_int_t *extents); |
||
94 | |||
95 | /* general shape masks using a span renderer */ |
||
96 | cairo_int_status_t (*renderer_init) (cairo_abstract_span_renderer_t *renderer, |
||
97 | const cairo_composite_rectangles_t *extents, |
||
98 | cairo_antialias_t antialias, |
||
99 | cairo_bool_t needs_clip); |
||
100 | |||
101 | void (*renderer_fini) (cairo_abstract_span_renderer_t *renderer, |
||
102 | cairo_int_status_t status); |
||
103 | }; |
||
104 | |||
105 | cairo_private void |
||
106 | _cairo_spans_compositor_init (cairo_spans_compositor_t *compositor, |
||
107 | const cairo_compositor_t *delegate); |
||
108 | |||
109 | CAIRO_END_DECLS |
||
110 | |||
111 | #endif /* CAIRO_SPANS_COMPOSITOR_PRIVATE_H */ |