1
/* Cairo - a vector graphics library with display and print output
2
 *
3
 * Copyright © 2005 Red Hat, Inc.
4
 * Copyright © 2009 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 Red Hat, Inc.
32
 *
33
 * Contributors(s):
34
 *	Chris Wilson <chris@chris-wilson.co.uk>
35
 */
36

            
37
#ifndef CAIRO_XCB_PRIVATE_H
38
#define CAIRO_XCB_PRIVATE_H
39

            
40
#include "cairoint.h"
41

            
42
#include "cairo-xcb.h"
43

            
44
#include "cairo-cache-private.h"
45
#include "cairo-compiler-private.h"
46
#include "cairo-device-private.h"
47
#include "cairo-error-private.h"
48
#include "cairo-freelist-private.h"
49
#include "cairo-list-private.h"
50
#include "cairo-mutex-private.h"
51
#include "cairo-pattern-private.h"
52
#include "cairo-reference-count-private.h"
53
#include "cairo-scaled-font-private.h"
54
#include "cairo-spans-private.h"
55
#include "cairo-surface-private.h"
56

            
57
#include <xcb/xcb.h>
58
#include <xcb/render.h>
59
#include <xcb/xcbext.h>
60
#include <pixman.h>
61

            
62
#define XLIB_COORD_MAX 32767
63

            
64
/* maximum number of cached GC's */
65
#define GC_CACHE_SIZE 4
66

            
67
#define CAIRO_XCB_RENDER_AT_LEAST(major, minor)	\
68
	((XCB_RENDER_MAJOR_VERSION > major) ||	\
69
	((XCB_RENDER_MAJOR_VERSION == major) && (XCB_RENDER_MINOR_VERSION >= minor)))
70

            
71
typedef struct _cairo_xcb_connection cairo_xcb_connection_t;
72
typedef struct _cairo_xcb_font cairo_xcb_font_t;
73
typedef struct _cairo_xcb_screen cairo_xcb_screen_t;
74
typedef struct _cairo_xcb_surface cairo_xcb_surface_t;
75
typedef struct _cairo_xcb_picture cairo_xcb_picture_t;
76
typedef struct _cairo_xcb_shm_mem_pool cairo_xcb_shm_mem_pool_t;
77
typedef struct _cairo_xcb_shm_info cairo_xcb_shm_info_t;
78
typedef struct _cairo_xcb_resources cairo_xcb_resources_t;
79

            
80
struct _cairo_xcb_shm_info {
81
    cairo_xcb_connection_t *connection;
82
    uint32_t shm;
83
    uint32_t offset;
84
    size_t size;
85
    void *mem;
86
    cairo_xcb_shm_mem_pool_t *pool;
87
    xcb_get_input_focus_cookie_t sync;
88
    cairo_list_t pending;
89
};
90

            
91
struct _cairo_xcb_surface {
92
    cairo_surface_t base;
93
    cairo_image_surface_t *fallback;
94
    cairo_boxes_t fallback_damage;
95

            
96
    cairo_xcb_connection_t *connection;
97
    cairo_xcb_screen_t *screen;
98

            
99
    xcb_drawable_t drawable;
100
    cairo_bool_t owns_pixmap;
101

            
102
    cairo_bool_t deferred_clear;
103
    cairo_color_t deferred_clear_color;
104

            
105
    int width;
106
    int height;
107
    int depth;
108

            
109
    xcb_render_picture_t picture;
110
    xcb_render_pictformat_t xrender_format;
111
    pixman_format_code_t pixman_format;
112
    uint32_t precision;
113

            
114
    cairo_list_t link;
115
};
116

            
117
struct _cairo_xcb_picture {
118
    cairo_surface_t base;
119

            
120
    cairo_xcb_screen_t *screen;
121
    xcb_render_picture_t picture;
122
    xcb_render_pictformat_t xrender_format;
123
    pixman_format_code_t pixman_format;
124

            
125
    int width, height;
126

            
127
    cairo_extend_t extend;
128
    cairo_filter_t filter;
129
    cairo_bool_t has_component_alpha;
130
    xcb_render_transform_t transform;
131

            
132
    int x0, y0;
133
    int x, y;
134

            
135
    cairo_list_t link;
136
};
137

            
138
#if CAIRO_HAS_XLIB_XCB_FUNCTIONS
139
typedef struct _cairo_xlib_xcb_surface {
140
    cairo_surface_t base;
141

            
142
    cairo_xcb_surface_t *xcb;
143

            
144
    /* original settings for query */
145
    void *display;
146
    void *screen;
147
    void *visual;
148
    void *format;
149
} cairo_xlib_xcb_surface_t;
150
#endif
151

            
152

            
153
enum {
154
    GLYPHSET_INDEX_ARGB32,
155
    GLYPHSET_INDEX_A8,
156
    GLYPHSET_INDEX_A1,
157
    NUM_GLYPHSETS
158
};
159

            
160
typedef struct _cairo_xcb_font_glyphset_free_glyphs {
161
    xcb_render_glyphset_t   glyphset;
162
    int			    glyph_count;
163
    xcb_render_glyph_t	    glyph_indices[128];
164
} cairo_xcb_font_glyphset_free_glyphs_t;
165

            
166
typedef struct _cairo_xcb_font_glyphset_info {
167
    xcb_render_glyphset_t   glyphset;
168
    cairo_format_t	    format;
169
    xcb_render_pictformat_t xrender_format;
170
    cairo_xcb_font_glyphset_free_glyphs_t *pending_free_glyphs;
171
} cairo_xcb_font_glyphset_info_t;
172

            
173
struct _cairo_xcb_font {
174
    cairo_scaled_font_private_t      base;
175
    cairo_scaled_font_t		    *scaled_font;
176
    cairo_xcb_connection_t	    *connection;
177
    cairo_xcb_font_glyphset_info_t  glyphset_info[NUM_GLYPHSETS];
178
    cairo_list_t link;
179
};
180

            
181
struct _cairo_xcb_screen {
182
    cairo_xcb_connection_t *connection;
183

            
184
    xcb_screen_t	   *xcb_screen;
185
    xcb_render_sub_pixel_t  subpixel_order;
186

            
187
    xcb_gcontext_t gc[GC_CACHE_SIZE];
188
    uint8_t gc_depths[GC_CACHE_SIZE];
189

            
190
    cairo_surface_t *stock_colors[CAIRO_STOCK_NUM_COLORS];
191
    struct {
192
	cairo_surface_t *picture;
193
	cairo_color_t color;
194
    } solid_cache[16];
195
    int solid_cache_size;
196

            
197
    cairo_cache_t linear_pattern_cache;
198
    cairo_cache_t radial_pattern_cache;
199
    cairo_freelist_t pattern_cache_entry_freelist;
200

            
201
    cairo_list_t link;
202
    cairo_list_t surfaces;
203
    cairo_list_t pictures;
204

            
205
    cairo_bool_t has_font_options;
206
    cairo_font_options_t font_options;
207
};
208

            
209
struct _cairo_xcb_connection {
210
    cairo_device_t device;
211

            
212
    xcb_connection_t *xcb_connection;
213

            
214
    xcb_render_pictformat_t standard_formats[5];
215
    cairo_hash_table_t *xrender_formats;
216
    cairo_hash_table_t *visual_to_xrender_format;
217

            
218
    unsigned int maximum_request_length;
219
    unsigned int flags;
220
    unsigned int original_flags;
221

            
222
    int force_precision;
223

            
224
    const xcb_setup_t *root;
225
    const xcb_query_extension_reply_t *render;
226
    const xcb_query_extension_reply_t *shm;
227
    xcb_render_sub_pixel_t *subpixel_orders;
228

            
229
    cairo_mutex_t shm_mutex;
230
    cairo_list_t shm_pools;
231
    cairo_list_t shm_pending;
232
    cairo_freepool_t shm_info_freelist;
233

            
234
    cairo_mutex_t screens_mutex;
235
    cairo_list_t screens;
236

            
237
    cairo_list_t fonts;
238

            
239
    cairo_list_t link;
240
};
241

            
242
struct _cairo_xcb_resources {
243
    cairo_bool_t xft_antialias;
244
    int xft_lcdfilter;
245
    cairo_bool_t xft_hinting;
246
    int xft_hintstyle;
247
    int xft_rgba;
248
};
249

            
250
enum {
251
    CAIRO_XCB_HAS_RENDER			= 0x0001,
252
    CAIRO_XCB_RENDER_HAS_FILL_RECTANGLES	= 0x0002,
253
    CAIRO_XCB_RENDER_HAS_COMPOSITE		= 0x0004,
254
    CAIRO_XCB_RENDER_HAS_COMPOSITE_TRAPEZOIDS	= 0x0008,
255
    CAIRO_XCB_RENDER_HAS_COMPOSITE_GLYPHS	= 0x0010,
256
    CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM	= 0x0020,
257
    CAIRO_XCB_RENDER_HAS_FILTERS		= 0x0040,
258
    CAIRO_XCB_RENDER_HAS_PDF_OPERATORS		= 0x0080,
259
    CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT	= 0x0100,
260
    CAIRO_XCB_RENDER_HAS_GRADIENTS		= 0x0200,
261
    CAIRO_XCB_RENDER_HAS_FILTER_GOOD		= 0x0400,
262
    CAIRO_XCB_RENDER_HAS_FILTER_BEST		= 0x0800,
263

            
264
    CAIRO_XCB_HAS_SHM				= 0x80000000,
265

            
266
    CAIRO_XCB_RENDER_MASK = CAIRO_XCB_HAS_RENDER |
267
			    CAIRO_XCB_RENDER_HAS_FILL_RECTANGLES |
268
			    CAIRO_XCB_RENDER_HAS_COMPOSITE |
269
			    CAIRO_XCB_RENDER_HAS_COMPOSITE_TRAPEZOIDS |
270
			    CAIRO_XCB_RENDER_HAS_COMPOSITE_GLYPHS |
271
			    CAIRO_XCB_RENDER_HAS_PICTURE_TRANSFORM |
272
			    CAIRO_XCB_RENDER_HAS_FILTERS |
273
			    CAIRO_XCB_RENDER_HAS_PDF_OPERATORS |
274
			    CAIRO_XCB_RENDER_HAS_EXTENDED_REPEAT |
275
			    CAIRO_XCB_RENDER_HAS_GRADIENTS |
276
			    CAIRO_XCB_RENDER_HAS_FILTER_GOOD |
277
			    CAIRO_XCB_RENDER_HAS_FILTER_BEST,
278
    CAIRO_XCB_SHM_MASK    = CAIRO_XCB_HAS_SHM
279
};
280

            
281
#define CAIRO_XCB_SHM_SMALL_IMAGE 8192
282

            
283
cairo_private extern const cairo_surface_backend_t _cairo_xcb_surface_backend;
284

            
285
/**
286
 * _cairo_surface_is_xcb:
287
 * @surface: a #cairo_surface_t
288
 *
289
 * Checks if a surface is an #cairo_xcb_surface_t
290
 *
291
 * Return value: %TRUE if the surface is an xcb surface
292
 **/
293
static inline cairo_bool_t
294
9
_cairo_surface_is_xcb (const cairo_surface_t *surface)
295
{
296
    /* _cairo_surface_nil sets a NULL backend so be safe */
297
9
    return surface->backend && surface->backend->type == CAIRO_SURFACE_TYPE_XCB;
298
}
299

            
300
cairo_private cairo_xcb_connection_t *
301
_cairo_xcb_connection_get (xcb_connection_t *connection);
302

            
303
static inline cairo_xcb_connection_t *
304
7
_cairo_xcb_connection_reference (cairo_xcb_connection_t *connection)
305
{
306
7
    return (cairo_xcb_connection_t *) cairo_device_reference (&connection->device);
307
}
308

            
309
cairo_private xcb_render_pictformat_t
310
_cairo_xcb_connection_get_xrender_format (cairo_xcb_connection_t *connection,
311
					  pixman_format_code_t pixman_format);
312

            
313
cairo_private xcb_render_pictformat_t
314
_cairo_xcb_connection_get_xrender_format_for_visual (cairo_xcb_connection_t *connection,
315
						     const xcb_visualid_t visual);
316

            
317
static inline cairo_status_t cairo_warn
318
49
_cairo_xcb_connection_acquire (cairo_xcb_connection_t *connection)
319
{
320
49
    return cairo_device_acquire (&connection->device);
321
}
322

            
323
static inline void
324
49
_cairo_xcb_connection_release (cairo_xcb_connection_t *connection)
325
{
326
49
    cairo_device_release (&connection->device);
327
49
}
328

            
329
static inline void
330
7
_cairo_xcb_connection_destroy (cairo_xcb_connection_t *connection)
331
{
332
7
    cairo_device_destroy (&connection->device);
333
7
}
334

            
335
cairo_private cairo_int_status_t
336
_cairo_xcb_connection_allocate_shm_info (cairo_xcb_connection_t *display,
337
					 size_t size,
338
					 cairo_bool_t might_reuse,
339
					 cairo_xcb_shm_info_t **shm_info_out);
340

            
341
cairo_private void
342
_cairo_xcb_shm_info_destroy (cairo_xcb_shm_info_t *shm_info);
343

            
344
cairo_private void
345
_cairo_xcb_connection_shm_mem_pools_flush (cairo_xcb_connection_t *connection);
346

            
347
cairo_private void
348
_cairo_xcb_connection_shm_mem_pools_fini (cairo_xcb_connection_t *connection);
349

            
350
cairo_private void
351
_cairo_xcb_font_close (cairo_xcb_font_t *font);
352

            
353
cairo_private cairo_xcb_screen_t *
354
_cairo_xcb_screen_get (xcb_connection_t *connection,
355
		       xcb_screen_t *screen);
356

            
357
cairo_private void
358
_cairo_xcb_screen_finish (cairo_xcb_screen_t *screen);
359

            
360
cairo_private xcb_gcontext_t
361
_cairo_xcb_screen_get_gc (cairo_xcb_screen_t *screen,
362
			  xcb_drawable_t drawable,
363
			  int depth);
364

            
365
cairo_private void
366
_cairo_xcb_screen_put_gc (cairo_xcb_screen_t *screen, int depth, xcb_gcontext_t gc);
367

            
368
cairo_private cairo_font_options_t *
369
_cairo_xcb_screen_get_font_options (cairo_xcb_screen_t *screen);
370

            
371
cairo_private cairo_status_t
372
_cairo_xcb_screen_store_linear_picture (cairo_xcb_screen_t *screen,
373
					const cairo_linear_pattern_t *linear,
374
					cairo_surface_t *picture);
375

            
376
cairo_private cairo_surface_t *
377
_cairo_xcb_screen_lookup_linear_picture (cairo_xcb_screen_t *screen,
378
					 const cairo_linear_pattern_t *linear);
379

            
380
cairo_private cairo_status_t
381
_cairo_xcb_screen_store_radial_picture (cairo_xcb_screen_t *screen,
382
					const cairo_radial_pattern_t *radial,
383
					cairo_surface_t *picture);
384

            
385
cairo_private cairo_surface_t *
386
_cairo_xcb_screen_lookup_radial_picture (cairo_xcb_screen_t *screen,
387
					 const cairo_radial_pattern_t *radial);
388

            
389
cairo_private cairo_surface_t *
390
_cairo_xcb_surface_create_similar_image (void *abstrct_other,
391
					 cairo_format_t format,
392
					 int width,
393
					 int height);
394

            
395
cairo_private cairo_surface_t *
396
_cairo_xcb_surface_create_similar (void			*abstract_other,
397
				   cairo_content_t	 content,
398
				   int			 width,
399
				   int			 height);
400

            
401
cairo_private cairo_surface_t *
402
_cairo_xcb_surface_create_internal (cairo_xcb_screen_t		*screen,
403
				    xcb_drawable_t		 drawable,
404
				    cairo_bool_t		 owns_pixmap,
405
				    pixman_format_code_t	 pixman_format,
406
				    xcb_render_pictformat_t	 xrender_format,
407
				    int				 width,
408
				    int				 height);
409

            
410
cairo_private_no_warn cairo_bool_t
411
_cairo_xcb_surface_get_extents (void *abstract_surface,
412
				cairo_rectangle_int_t *extents);
413

            
414
cairo_private cairo_int_status_t
415
_cairo_xcb_render_compositor_paint (const cairo_compositor_t     *compositor,
416
				    cairo_composite_rectangles_t *extents);
417

            
418
cairo_private cairo_int_status_t
419
_cairo_xcb_render_compositor_mask (const cairo_compositor_t     *compositor,
420
				   cairo_composite_rectangles_t *extents);
421

            
422
cairo_private cairo_int_status_t
423
_cairo_xcb_render_compositor_stroke (const cairo_compositor_t     *compositor,
424
				     cairo_composite_rectangles_t *extents,
425
				     const cairo_path_fixed_t     *path,
426
				     const cairo_stroke_style_t   *style,
427
				     const cairo_matrix_t         *ctm,
428
				     const cairo_matrix_t         *ctm_inverse,
429
				     double                        tolerance,
430
				     cairo_antialias_t             antialias);
431

            
432
cairo_private cairo_int_status_t
433
_cairo_xcb_render_compositor_fill (const cairo_compositor_t     *compositor,
434
				   cairo_composite_rectangles_t *extents,
435
				   const cairo_path_fixed_t     *path,
436
				   cairo_fill_rule_t             fill_rule,
437
				   double                        tolerance,
438
				   cairo_antialias_t             antialias);
439

            
440
cairo_private cairo_int_status_t
441
_cairo_xcb_render_compositor_glyphs (const cairo_compositor_t     *compositor,
442
				     cairo_composite_rectangles_t *extents,
443
				     cairo_scaled_font_t          *scaled_font,
444
				     cairo_glyph_t                *glyphs,
445
				     int                           num_glyphs,
446
				     cairo_bool_t                  overlap);
447
cairo_private void
448
_cairo_xcb_surface_scaled_font_fini (cairo_scaled_font_t *scaled_font);
449

            
450
cairo_private void
451
_cairo_xcb_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph,
452
				      cairo_scaled_font_t  *scaled_font);
453

            
454
cairo_private cairo_status_t
455
_cairo_xcb_surface_clear (cairo_xcb_surface_t *dst);
456

            
457
cairo_private cairo_status_t
458
_cairo_xcb_surface_core_copy_boxes (cairo_xcb_surface_t		*dst,
459
				   const cairo_pattern_t	*src_pattern,
460
				   const cairo_rectangle_int_t	*extents,
461
				   const cairo_boxes_t		*boxes);
462

            
463
cairo_private cairo_status_t
464
_cairo_xcb_surface_core_fill_boxes (cairo_xcb_surface_t *dst,
465
				    const cairo_color_t	*color,
466
				    cairo_boxes_t *boxes);
467

            
468
cairo_private xcb_pixmap_t
469
_cairo_xcb_connection_create_pixmap (cairo_xcb_connection_t *connection,
470
				     uint8_t depth,
471
				     xcb_drawable_t drawable,
472
				     uint16_t width,
473
				     uint16_t height);
474

            
475
cairo_private xcb_gcontext_t
476
_cairo_xcb_connection_create_gc (cairo_xcb_connection_t *connection,
477
				 xcb_drawable_t drawable,
478
				 uint32_t value_mask,
479
				 uint32_t *values);
480

            
481
cairo_private void
482
_cairo_xcb_connection_change_gc (cairo_xcb_connection_t *connection,
483
				 xcb_gcontext_t gc,
484
				 uint32_t value_mask,
485
				 uint32_t *values);
486

            
487
cairo_private void
488
_cairo_xcb_connection_copy_area (cairo_xcb_connection_t *connection,
489
				 xcb_drawable_t src,
490
				 xcb_drawable_t dst,
491
				 xcb_gcontext_t gc,
492
				 int16_t src_x,
493
				 int16_t src_y,
494
				 int16_t dst_x,
495
				 int16_t dst_y,
496
				 uint16_t width,
497
				 uint16_t height);
498

            
499
cairo_private void
500
_cairo_xcb_connection_put_image (cairo_xcb_connection_t *connection,
501
				 xcb_drawable_t dst,
502
				 xcb_gcontext_t gc,
503
				 uint16_t width,
504
				 uint16_t height,
505
				 int16_t dst_x,
506
				 int16_t dst_y,
507
				 uint8_t depth,
508
				 uint32_t length,
509
				 void *data);
510

            
511
cairo_private void
512
_cairo_xcb_connection_put_subimage (cairo_xcb_connection_t *connection,
513
				    xcb_drawable_t dst,
514
				    xcb_gcontext_t gc,
515
				    int16_t src_x,
516
				    int16_t src_y,
517
				    uint16_t width,
518
				    uint16_t height,
519
				    uint16_t cpp,
520
				    int stride,
521
				    int16_t dst_x,
522
				    int16_t dst_y,
523
				    uint8_t depth,
524
				    void *data);
525

            
526
cairo_private xcb_get_image_reply_t *
527
_cairo_xcb_connection_get_image (cairo_xcb_connection_t *connection,
528
				 xcb_drawable_t src,
529
				 int16_t src_x,
530
				 int16_t src_y,
531
				 uint16_t width,
532
				 uint16_t height);
533

            
534
cairo_private void
535
_cairo_xcb_connection_poly_fill_rectangle (cairo_xcb_connection_t *connection,
536
					   xcb_drawable_t dst,
537
					   xcb_gcontext_t gc,
538
					   uint32_t num_rectangles,
539
					   xcb_rectangle_t *rectangles);
540

            
541
cairo_private cairo_status_t
542
_cairo_xcb_shm_image_create (cairo_xcb_connection_t *connection,
543
			     pixman_format_code_t pixman_format,
544
			     int width, int height,
545
			     cairo_image_surface_t **image_out,
546
			     cairo_xcb_shm_info_t **shm_info_out);
547

            
548
#if CAIRO_HAS_XCB_SHM_FUNCTIONS
549
cairo_private uint32_t
550
_cairo_xcb_connection_shm_attach (cairo_xcb_connection_t *connection,
551
				  uint32_t id,
552
				  cairo_bool_t readonly);
553

            
554
cairo_private void
555
_cairo_xcb_connection_shm_put_image (cairo_xcb_connection_t *connection,
556
				     xcb_drawable_t dst,
557
				     xcb_gcontext_t gc,
558
				     uint16_t total_width,
559
				     uint16_t total_height,
560
				     int16_t src_x,
561
				     int16_t src_y,
562
				     uint16_t width,
563
				     uint16_t height,
564
				     int16_t dst_x,
565
				     int16_t dst_y,
566
				     uint8_t depth,
567
				     uint32_t shm,
568
				     uint32_t offset);
569

            
570
cairo_private cairo_status_t
571
_cairo_xcb_connection_shm_get_image (cairo_xcb_connection_t *connection,
572
				     xcb_drawable_t src,
573
				     int16_t src_x,
574
				     int16_t src_y,
575
				     uint16_t width,
576
				     uint16_t height,
577
				     uint32_t shmseg,
578
				     uint32_t offset);
579

            
580
cairo_private void
581
_cairo_xcb_connection_shm_detach (cairo_xcb_connection_t *connection,
582
				  uint32_t segment);
583
#else
584
static inline void
585
_cairo_xcb_connection_shm_put_image (cairo_xcb_connection_t *connection,
586
				     xcb_drawable_t dst,
587
				     xcb_gcontext_t gc,
588
				     uint16_t total_width,
589
				     uint16_t total_height,
590
				     int16_t src_x,
591
				     int16_t src_y,
592
				     uint16_t width,
593
				     uint16_t height,
594
				     int16_t dst_x,
595
				     int16_t dst_y,
596
				     uint8_t depth,
597
				     uint32_t shm,
598
				     uint32_t offset)
599
{
600
    ASSERT_NOT_REACHED;
601
}
602
#endif
603

            
604
cairo_private void
605
_cairo_xcb_connection_render_create_picture (cairo_xcb_connection_t  *connection,
606
					     xcb_render_picture_t     picture,
607
					     xcb_drawable_t           drawable,
608
					     xcb_render_pictformat_t  format,
609
					     uint32_t                 value_mask,
610
					     uint32_t	             *value_list);
611

            
612
cairo_private void
613
_cairo_xcb_connection_render_change_picture (cairo_xcb_connection_t     *connection,
614
					     xcb_render_picture_t  picture,
615
					     uint32_t              value_mask,
616
					     uint32_t             *value_list);
617

            
618
cairo_private void
619
_cairo_xcb_connection_render_set_picture_clip_rectangles (cairo_xcb_connection_t      *connection,
620
							  xcb_render_picture_t   picture,
621
							  int16_t                clip_x_origin,
622
							  int16_t                clip_y_origin,
623
							  uint32_t               rectangles_len,
624
							  xcb_rectangle_t       *rectangles);
625

            
626
cairo_private void
627
_cairo_xcb_connection_render_free_picture (cairo_xcb_connection_t *connection,
628
					   xcb_render_picture_t  picture);
629

            
630
cairo_private void
631
_cairo_xcb_connection_render_composite (cairo_xcb_connection_t     *connection,
632
					uint8_t               op,
633
					xcb_render_picture_t  src,
634
					xcb_render_picture_t  mask,
635
					xcb_render_picture_t  dst,
636
					int16_t               src_x,
637
					int16_t               src_y,
638
					int16_t               mask_x,
639
					int16_t               mask_y,
640
					int16_t               dst_x,
641
					int16_t               dst_y,
642
					uint16_t              width,
643
					uint16_t              height);
644

            
645
cairo_private void
646
_cairo_xcb_connection_render_trapezoids (cairo_xcb_connection_t *connection,
647
					 uint8_t                       op,
648
					 xcb_render_picture_t          src,
649
					 xcb_render_picture_t          dst,
650
					 xcb_render_pictformat_t       mask_format,
651
					 int16_t                       src_x,
652
					 int16_t                       src_y,
653
					 uint32_t                      traps_len,
654
					 xcb_render_trapezoid_t       *traps);
655

            
656
cairo_private void
657
_cairo_xcb_connection_render_create_glyph_set (cairo_xcb_connection_t	*connection,
658
					       xcb_render_glyphset_t	 id,
659
					       xcb_render_pictformat_t  format);
660

            
661
cairo_private void
662
_cairo_xcb_connection_render_free_glyph_set (cairo_xcb_connection_t      *connection,
663
					     xcb_render_glyphset_t  glyphset);
664

            
665
cairo_private void
666
_cairo_xcb_connection_render_add_glyphs (cairo_xcb_connection_t             *connection,
667
					 xcb_render_glyphset_t         glyphset,
668
					 uint32_t                      num_glyphs,
669
					 uint32_t                     *glyphs_id,
670
					 xcb_render_glyphinfo_t       *glyphs,
671
					 uint32_t                      data_len,
672
					 uint8_t                      *data);
673

            
674
cairo_private void
675
_cairo_xcb_connection_render_free_glyphs (cairo_xcb_connection_t         *connection,
676
					  xcb_render_glyphset_t     glyphset,
677
					  uint32_t                  num_glyphs,
678
					  xcb_render_glyph_t       *glyphs);
679

            
680
cairo_private void
681
_cairo_xcb_connection_render_composite_glyphs_8 (cairo_xcb_connection_t        *connection,
682
						 uint8_t                  op,
683
						 xcb_render_picture_t     src,
684
						 xcb_render_picture_t     dst,
685
						 xcb_render_pictformat_t  mask_format,
686
						 xcb_render_glyphset_t    glyphset,
687
						 int16_t                  src_x,
688
						 int16_t                  src_y,
689
						 uint32_t                 glyphcmds_len,
690
						 uint8_t                 *glyphcmds);
691

            
692
cairo_private void
693
_cairo_xcb_connection_render_composite_glyphs_16 (cairo_xcb_connection_t        *connection,
694
						  uint8_t                  op,
695
						  xcb_render_picture_t     src,
696
						  xcb_render_picture_t     dst,
697
						  xcb_render_pictformat_t  mask_format,
698
						  xcb_render_glyphset_t    glyphset,
699
						  int16_t                  src_x,
700
						  int16_t                  src_y,
701
						  uint32_t                 glyphcmds_len,
702
						  uint8_t                 *glyphcmds);
703

            
704
cairo_private void
705
_cairo_xcb_connection_render_composite_glyphs_32 (cairo_xcb_connection_t        *connection,
706
						  uint8_t                  op,
707
						  xcb_render_picture_t     src,
708
						  xcb_render_picture_t     dst,
709
						  xcb_render_pictformat_t  mask_format,
710
						  xcb_render_glyphset_t    glyphset,
711
						  int16_t                  src_x,
712
						  int16_t                  src_y,
713
						  uint32_t                 glyphcmds_len,
714
						  uint8_t                 *glyphcmds);
715

            
716
cairo_private void
717
_cairo_xcb_connection_render_fill_rectangles (cairo_xcb_connection_t      *connection,
718
					      uint8_t                op,
719
					      xcb_render_picture_t   dst,
720
					      xcb_render_color_t     color,
721
					      uint32_t               num_rects,
722
					      xcb_rectangle_t       *rects);
723

            
724
cairo_private void
725
_cairo_xcb_connection_render_set_picture_transform (cairo_xcb_connection_t       *connection,
726
						    xcb_render_picture_t    picture,
727
						    xcb_render_transform_t  *transform);
728

            
729
cairo_private void
730
_cairo_xcb_connection_render_set_picture_filter (cairo_xcb_connection_t         *connection,
731
						 xcb_render_picture_t      picture,
732
						 uint16_t                  filter_len,
733
						 char                     *filter);
734

            
735
cairo_private void
736
_cairo_xcb_connection_render_create_solid_fill (cairo_xcb_connection_t     *connection,
737
						xcb_render_picture_t  picture,
738
						xcb_render_color_t    color);
739

            
740
cairo_private void
741
_cairo_xcb_connection_render_create_linear_gradient (cairo_xcb_connection_t         *connection,
742
						     xcb_render_picture_t      picture,
743
						     xcb_render_pointfix_t     p1,
744
						     xcb_render_pointfix_t     p2,
745
						     uint32_t                  num_stops,
746
						     xcb_render_fixed_t *stops,
747
						     xcb_render_color_t *colors);
748

            
749
cairo_private void
750
_cairo_xcb_connection_render_create_radial_gradient (cairo_xcb_connection_t         *connection,
751
						     xcb_render_picture_t      picture,
752
						     xcb_render_pointfix_t     inner,
753
						     xcb_render_pointfix_t     outer,
754
						     xcb_render_fixed_t        inner_radius,
755
						     xcb_render_fixed_t        outer_radius,
756
						     uint32_t                  num_stops,
757
						     xcb_render_fixed_t *stops,
758
						     xcb_render_color_t *colors);
759

            
760
cairo_private void
761
_cairo_xcb_connection_render_create_conical_gradient (cairo_xcb_connection_t         *c,
762
						      xcb_render_picture_t      picture,
763
						      xcb_render_pointfix_t     center,
764
						      xcb_render_fixed_t        angle,
765
						      uint32_t                  num_stops,
766
						      xcb_render_fixed_t *stops,
767
						      xcb_render_color_t *colors);
768

            
769
cairo_private void
770
_cairo_xcb_resources_get (cairo_xcb_screen_t *screen,
771
			  cairo_xcb_resources_t *resources);
772

            
773
#endif /* CAIRO_XCB_PRIVATE_H */