Add stubs for Direct3D9 backend.
[cairo/gpu.git] / src / cairo-surface-private.h
blobc25b6dc8a7de09213824c0c6c5688d149e499a25
1 /* cairo - a vector graphics library with display and print output
3 * Copyright © 2002 University of Southern California
4 * Copyright © 2005 Red Hat, Inc.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 * You should have received a copy of the MPL along with this library
18 * in the file COPYING-MPL-1.1
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/
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.
29 * The Original Code is the cairo graphics library.
31 * The Initial Developer of the Original Code is University of Southern
32 * California.
34 * Contributor(s):
35 * Carl D. Worth <cworth@cworth.org>
38 #ifndef CAIRO_SURFACE_PRIVATE_H
39 #define CAIRO_SURFACE_PRIVATE_H
41 #include "cairo.h"
43 #include "cairo-types-private.h"
44 #include "cairo-reference-count-private.h"
46 typedef void (*cairo_surface_func_t) (cairo_surface_t *);
48 struct _cairo_surface {
49 const cairo_surface_backend_t *backend;
51 /* We allow surfaces to override the backend->type by shoving something
52 * else into surface->type. This is for "wrapper" surfaces that want to
53 * hide their internal type from the user-level API. */
54 cairo_surface_type_t type;
56 cairo_content_t content;
58 cairo_reference_count_t ref_count;
59 cairo_status_t status;
60 cairo_bool_t finished;
61 unsigned int unique_id;
63 cairo_user_data_array_t user_data;
64 cairo_user_data_array_t mime_data;
66 cairo_matrix_t device_transform;
67 cairo_matrix_t device_transform_inverse;
69 /* The actual resolution of the device, in dots per inch. */
70 double x_resolution;
71 double y_resolution;
73 /* The resolution that should be used when generating image-based
74 * fallback; generally only used by the analysis/paginated
75 * surfaces
77 double x_fallback_resolution;
78 double y_fallback_resolution;
80 cairo_clip_t *clip;
83 * Each time a clip region is modified, it gets the next value in this
84 * sequence. This means that clip regions for this surface are uniquely
85 * identified and updates to the clip can be readily identified
87 unsigned int next_clip_serial;
89 * The serial number of the current clip. This is set when
90 * the surface clipping is set. The gstate can then cheaply
91 * check whether the surface clipping is already correct before
92 * performing a rendering operation.
94 * The special value '0' is reserved for the unclipped case.
96 unsigned int current_clip_serial;
98 /* A "snapshot" surface is immutable. See _cairo_surface_snapshot. */
99 cairo_surface_t *snapshot_of;
100 cairo_surface_func_t snapshot_detach;
101 /* current snapshots of this surface */
102 cairo_array_t snapshots;
105 * Surface font options, falling back to backend's default options,
106 * and set using _cairo_surface_set_font_options(), and propagated by
107 * cairo_surface_create_similar().
109 cairo_bool_t has_font_options;
110 cairo_font_options_t font_options;
113 #endif /* CAIRO_SURFACE_PRIVATE_H */