2
# error config.h must be included before pixman-private.h
5
#ifndef PIXMAN_PRIVATE_H
6
#define PIXMAN_PRIVATE_H
22
#ifdef WORDS_BIGENDIAN
23
# define IMAGE_BYTE_ORDER MSBFirst
24
# define BITMAP_BIT_ORDER MSBFirst
26
# define IMAGE_BYTE_ORDER LSBFirst
27
# define BITMAP_BIT_ORDER LSBFirst
33
#if defined (__GNUC__)
34
# define FUNC ((const char*) (__PRETTY_FUNCTION__))
35
#elif defined (__sun) || (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
36
# define FUNC ((const char*) (__func__))
38
# define FUNC ((const char*) ("???"))
42
# define INT16_MIN (-32767-1)
46
# define INT16_MAX (32767)
50
# define INT32_MIN (-2147483647-1)
54
# define INT32_MAX (2147483647)
58
# define UINT32_MIN (0)
62
# define UINT32_MAX (4294967295U)
66
# define M_PI 3.14159265358979323846
70
#define inline __inline
74
#define FB_UNIT (1 << FB_SHIFT)
75
#define FB_HALFUNIT (1 << (FB_SHIFT-1))
76
#define FB_MASK (FB_UNIT - 1)
77
#define FB_ALLONES ((uint32_t) -1)
79
/* Memory allocation helpers */
80
void *pixman_malloc_ab (unsigned int n, unsigned int b);
81
void *pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
82
pixman_bool_t pixman_multiply_overflows_int (unsigned int a, unsigned int b);
83
pixman_bool_t pixman_addition_overflows_int (unsigned int a, unsigned int b);
87
#define return_if_fail(expr) \
92
fprintf(stderr, "In %s: %s failed\n", FUNC, #expr); \
98
#define return_val_if_fail(expr, retval) \
103
fprintf(stderr, "In %s: %s failed\n", FUNC, #expr); \
111
#define return_if_fail(expr) \
119
#define return_val_if_fail(expr, retval) \
129
typedef struct image_common image_common_t;
130
typedef struct source_image source_image_t;
131
typedef struct solid_fill solid_fill_t;
132
typedef struct gradient gradient_t;
133
typedef struct linear_gradient linear_gradient_t;
134
typedef struct horizontal_gradient horizontal_gradient_t;
135
typedef struct vertical_gradient vertical_gradient_t;
136
typedef struct conical_gradient conical_gradient_t;
137
typedef struct radial_gradient radial_gradient_t;
138
typedef struct bits_image bits_image_t;
139
typedef struct circle circle_t;
140
typedef struct point point_t;
142
/* FIXME - the types and structures below should be give proper names
146
typedef FASTCALL void (*CombineMaskU32) (uint32_t *src, const uint32_t *mask, int width);
147
typedef FASTCALL void (*CombineFuncU32) (uint32_t *dest, const uint32_t *src, int width);
148
typedef FASTCALL void (*CombineFuncC32) (uint32_t *dest, uint32_t *src, uint32_t *mask, int width);
149
typedef FASTCALL void (*fetchProc32)(bits_image_t *pict, int x, int y, int width,
151
typedef FASTCALL uint32_t (*fetchPixelProc32)(bits_image_t *pict, int offset, int line);
152
typedef FASTCALL void (*storeProc32)(pixman_image_t *, uint32_t *bits,
153
const uint32_t *values, int x, int width,
154
const pixman_indexed_t *);
156
typedef FASTCALL void (*CombineMaskU64) (uint64_t *src, const uint64_t *mask, int width);
157
typedef FASTCALL void (*CombineFuncU64) (uint64_t *dest, const uint64_t *src, int width);
158
typedef FASTCALL void (*CombineFuncC64) (uint64_t *dest, uint64_t *src, uint64_t *mask, int width);
159
typedef FASTCALL void (*fetchProc64)(bits_image_t *pict, int x, int y, int width,
161
typedef FASTCALL uint64_t (*fetchPixelProc64)(bits_image_t *pict, int offset, int line);
162
typedef FASTCALL void (*storeProc64)(pixman_image_t *, uint32_t *bits,
163
const uint64_t *values, int x, int width,
164
const pixman_indexed_t *);
166
typedef struct _FbComposeData {
169
pixman_image_t *mask;
170
pixman_image_t *dest;
181
typedef struct _FbComposeFunctions32 {
182
CombineFuncU32 *combineU;
183
CombineFuncC32 *combineC;
184
CombineMaskU32 combineMaskU;
185
} FbComposeFunctions32;
187
typedef struct _FbComposeFunctions64 {
188
CombineFuncU64 *combineU;
189
CombineFuncC64 *combineC;
190
CombineMaskU64 combineMaskU;
191
} FbComposeFunctions64;
193
extern FbComposeFunctions32 pixman_composeFunctions;
194
extern FbComposeFunctions64 pixman_composeFunctions64;
196
void pixman_composite_rect_general_accessors (const FbComposeData *data,
201
void pixman_composite_rect_general (const FbComposeData *data);
203
fetchProc32 pixman_fetchProcForPicture32 (bits_image_t *);
204
fetchPixelProc32 pixman_fetchPixelProcForPicture32 (bits_image_t *);
205
storeProc32 pixman_storeProcForPicture32 (bits_image_t *);
206
fetchProc32 pixman_fetchProcForPicture32_accessors (bits_image_t *);
207
fetchPixelProc32 pixman_fetchPixelProcForPicture32_accessors (bits_image_t *);
208
storeProc32 pixman_storeProcForPicture32_accessors (bits_image_t *);
210
fetchProc64 pixman_fetchProcForPicture64 (bits_image_t *);
211
fetchPixelProc64 pixman_fetchPixelProcForPicture64 (bits_image_t *);
212
storeProc64 pixman_storeProcForPicture64 (bits_image_t *);
213
fetchProc64 pixman_fetchProcForPicture64_accessors (bits_image_t *);
214
fetchPixelProc64 pixman_fetchPixelProcForPicture64_accessors (bits_image_t *);
215
storeProc64 pixman_storeProcForPicture64_accessors (bits_image_t *);
217
void pixman_expand(uint64_t *dst, const uint32_t *src, pixman_format_code_t, int width);
218
void pixman_contract(uint32_t *dst, const uint64_t *src, int width);
220
void pixmanFetchSourcePict(source_image_t *, int x, int y, int width,
221
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
222
void pixmanFetchSourcePict64(source_image_t *, int x, int y, int width,
223
uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
225
void fbFetchTransformed(bits_image_t *, int x, int y, int width,
226
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
227
void fbStoreExternalAlpha(bits_image_t *, int x, int y, int width,
229
void fbFetchExternalAlpha(bits_image_t *, int x, int y, int width,
230
uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
232
void fbFetchTransformed_accessors(bits_image_t *, int x, int y, int width,
233
uint32_t *buffer, uint32_t *mask,
235
void fbStoreExternalAlpha_accessors(bits_image_t *, int x, int y, int width,
237
void fbFetchExternalAlpha_accessors(bits_image_t *, int x, int y, int width,
238
uint32_t *buffer, uint32_t *mask,
241
void fbFetchTransformed64(bits_image_t *, int x, int y, int width,
242
uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
243
void fbStoreExternalAlpha64(bits_image_t *, int x, int y, int width,
245
void fbFetchExternalAlpha64(bits_image_t *, int x, int y, int width,
246
uint64_t *buffer, uint64_t *mask, uint32_t maskBits);
248
void fbFetchTransformed64_accessors(bits_image_t *, int x, int y, int width,
249
uint64_t *buffer, uint64_t *mask,
251
void fbStoreExternalAlpha64_accessors(bits_image_t *, int x, int y, int width,
253
void fbFetchExternalAlpha64_accessors(bits_image_t *, int x, int y, int width,
254
uint64_t *buffer, uint64_t *mask,
268
#define IS_SOURCE_IMAGE(img) (((image_common_t *)img)->type > BITS)
272
SOURCE_IMAGE_CLASS_UNKNOWN,
273
SOURCE_IMAGE_CLASS_HORIZONTAL,
274
SOURCE_IMAGE_CLASS_VERTICAL
275
} source_pict_class_t;
286
pixman_region32_t full_region;
287
pixman_region32_t clip_region;
288
pixman_region32_t *src_clip;
289
pixman_bool_t has_client_clip;
290
pixman_transform_t *transform;
291
pixman_repeat_t repeat;
292
pixman_filter_t filter;
293
pixman_fixed_t *filter_params;
295
bits_image_t *alpha_map;
296
point_t alpha_origin;
297
pixman_bool_t component_alpha;
298
pixman_read_memory_func_t read_func;
299
pixman_write_memory_func_t write_func;
304
image_common_t common;
305
source_pict_class_t class;
310
source_image_t common;
311
uint32_t color; /* FIXME: shouldn't this be a pixman_color_t? */
316
source_image_t common;
318
pixman_gradient_stop_t * stops;
320
uint32_t * color_table;
321
int color_table_size;
324
struct linear_gradient
327
pixman_point_fixed_t p1;
328
pixman_point_fixed_t p2;
335
pixman_fixed_t radius;
338
struct radial_gradient
350
struct conical_gradient
353
pixman_point_fixed_t center;
354
pixman_fixed_t angle;
359
image_common_t common;
360
pixman_format_code_t format;
361
const pixman_indexed_t *indexed;
366
int rowstride; /* in number of uint32_t's */
372
image_common_t common;
375
linear_gradient_t linear;
376
conical_gradient_t conical;
377
radial_gradient_t radial;
382
#define LOG2_BITMAP_PAD 5
383
#define FB_STIP_SHIFT LOG2_BITMAP_PAD
384
#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
385
#define FB_STIP_MASK (FB_STIP_UNIT - 1)
386
#define FB_STIP_ALLONES ((uint32_t) -1)
388
#if BITMAP_BIT_ORDER == LSBFirst
389
#define FbScrLeft(x,n) ((x) >> (n))
390
#define FbScrRight(x,n) ((x) << (n))
391
#define FbLeftStipBits(x,n) ((x) & ((((uint32_t) 1) << (n)) - 1))
393
#define FbScrLeft(x,n) ((x) << (n))
394
#define FbScrRight(x,n) ((x) >> (n))
395
#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
398
#define FbStipLeft(x,n) FbScrLeft(x,n)
399
#define FbStipRight(x,n) FbScrRight(x,n)
400
#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
401
FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
403
#define FbLeftMask(x) ( ((x) & FB_MASK) ? \
404
FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
405
#define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
406
FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
408
#define FbMaskBits(x,w,l,n,r) { \
410
r = FbRightMask((x)+n); \
413
n -= FB_UNIT - ((x) & FB_MASK); \
423
#if IMAGE_BYTE_ORDER == MSBFirst
424
#define Fetch24(img, a) ((unsigned long) (a) & 1 ? \
425
((READ(img, a) << 16) | READ(img, (uint16_t *) ((a)+1))) : \
426
((READ(img, (uint16_t *) (a)) << 8) | READ(img, (a)+2)))
427
#define Store24(img,a,v) ((unsigned long) (a) & 1 ? \
428
(WRITE(img, a, (uint8_t) ((v) >> 16)), \
429
WRITE(img, (uint16_t *) ((a)+1), (uint16_t) (v))) : \
430
(WRITE(img, (uint16_t *) (a), (uint16_t) ((v) >> 8)), \
431
WRITE(img, (a)+2, (uint8_t) (v))))
433
#define Fetch24(img,a) ((unsigned long) (a) & 1 ? \
434
(READ(img, a) | (READ(img, (uint16_t *) ((a)+1)) << 8)) : \
435
(READ(img, (uint16_t *) (a)) | (READ(img, (a)+2) << 16)))
436
#define Store24(img,a,v) ((unsigned long) (a) & 1 ? \
437
(WRITE(img, a, (uint8_t) (v)), \
438
WRITE(img, (uint16_t *) ((a)+1), (uint16_t) ((v) >> 8))) : \
439
(WRITE(img, (uint16_t *) (a), (uint16_t) (v)), \
440
WRITE(img, (a)+2, (uint8_t) ((v) >> 16))))
443
#define CvtR8G8B8toY15(s) (((((s) >> 16) & 0xff) * 153 + \
444
(((s) >> 8) & 0xff) * 301 + \
445
(((s) ) & 0xff) * 58) >> 2)
446
#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
447
(((s) >> 6) & 0x03e0) | \
448
(((s) >> 9) & 0x7c00))
449
#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
450
#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
452
#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
455
#define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
456
#define FbIntDiv(a,b) (((uint16_t) (a) * 255) / (b))
458
#define FbGet8(v,i) ((uint16_t) (uint8_t) ((v) >> i))
461
#define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \
462
(((s) >> 5) & 0x07e0) | \
463
(((s) >> 8) & 0xf800))
464
#define cvt0565to0888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
465
((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
466
((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
469
* There are two ways of handling alpha -- either as a single unified value or
470
* a separate value for each component, hence each macro must have two
471
* versions. The unified alpha version has a 'U' at the end of the name,
472
* the component version has a 'C'. Similarly, functions which deal with
473
* this difference will have two versions using the same convention.
476
#define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i), \
477
(uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
479
#define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i), \
480
(uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
482
#define FbInU(x,i,a,t) ((uint32_t) FbIntMult(FbGet8(x,i),(a),(t)) << (i))
484
#define FbInC(x,i,a,t) ((uint32_t) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))
486
#define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \
487
(uint32_t) ((uint8_t) ((t) | (0 - ((t) >> 8)))) << (i))
489
#define div_255(x) (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)
490
#define div_65535(x) (((x) + 0x8000 + (((x) + 0x8000) >> 16)) >> 16)
492
#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
494
#define DIV(a,b) ((((a) < 0) == ((b) < 0)) ? (a) / (b) : \
495
((a) - (b) + 1 - (((b) < 0) << 1)) / (b))
497
#define CLIP(a,b,c) ((a) < (b) ? (b) : ((a) > (c) ? (c) : (a)))
500
/* FIXME: the MOD macro above is equivalent, but faster I think */
501
#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
504
/* FIXME: the (void)__read_func hides lots of warnings (which is what they
505
* are supposed to do), but some of them are real. For example the one
506
* where Fetch4 doesn't have a READ
510
/* Framebuffer access support macros */
511
#define ACCESS_MEM(code) \
513
const image_common_t *const com__ = \
514
(image_common_t *)image; \
516
if (!com__->read_func && !com__->write_func) \
518
const int do_access__ = 0; \
519
const pixman_read_memory_func_t read_func__ = NULL; \
520
const pixman_write_memory_func_t write_func__ = NULL; \
522
(void)write_func__; \
529
const int do_access__ = 1; \
530
const pixman_read_memory_func_t read_func__ = \
532
const pixman_write_memory_func_t write_func__ = \
535
(void)write_func__; \
543
#ifdef PIXMAN_FB_ACCESSORS
545
#define ACCESS(sym) sym##_accessors
547
#define READ(img, ptr) \
548
((img)->common.read_func ((ptr), sizeof(*(ptr))))
549
#define WRITE(img, ptr,val) \
550
((img)->common.write_func ((ptr), (val), sizeof (*(ptr))))
552
#define MEMCPY_WRAPPED(img, dst, src, size) \
555
uint8_t *_dst = (uint8_t*)(dst), *_src = (uint8_t*)(src); \
556
for(_i = 0; _i < size; _i++) { \
557
WRITE((img), _dst +_i, READ((img), _src + _i)); \
561
#define MEMSET_WRAPPED(img, dst, val, size) \
564
uint8_t *_dst = (uint8_t*)(dst); \
565
for(_i = 0; _i < (size_t) size; _i++) { \
566
WRITE((img), _dst +_i, (val)); \
572
#define ACCESS(sym) sym
574
#define READ(img, ptr) (*(ptr))
575
#define WRITE(img, ptr, val) (*(ptr) = (val))
576
#define MEMCPY_WRAPPED(img, dst, src, size) \
577
memcpy(dst, src, size)
578
#define MEMSET_WRAPPED(img, dst, val, size) \
579
memset(dst, val, size)
583
#define fbComposeGetSolid(img, res, fmt) \
586
pixman_format_code_t format__; \
587
if (img->type == SOLID) \
589
format__ = PIXMAN_a8r8g8b8; \
590
(res) = img->solid.color; \
594
uint32_t *bits__ = (img)->bits.bits; \
595
format__ = (img)->bits.format; \
597
switch (PIXMAN_FORMAT_BPP((img)->bits.format)) \
600
(res) = READ(img, (uint32_t *)bits__); \
603
(res) = Fetch24(img, (uint8_t *) bits__); \
606
(res) = READ(img, (uint16_t *) bits__); \
607
(res) = cvt0565to0888(res); \
610
(res) = READ(img, (uint8_t *) bits__); \
611
(res) = (res) << 24; \
614
(res) = READ(img, (uint32_t *) bits__); \
615
(res) = FbLeftStipBits((res),1) ? 0xff000000 : 0x00000000; \
620
/* manage missing src alpha */ \
621
if (!PIXMAN_FORMAT_A((img)->bits.format)) \
622
(res) |= 0xff000000; \
625
/* If necessary, convert RGB <--> BGR. */ \
626
if (PIXMAN_FORMAT_TYPE (format__) != PIXMAN_FORMAT_TYPE(fmt)) \
628
(res) = ((((res) & 0xff000000) >> 0) | \
629
(((res) & 0x00ff0000) >> 16) | \
630
(((res) & 0x0000ff00) >> 0) | \
631
(((res) & 0x000000ff) << 16)); \
636
#define fbComposeGetStart(pict,x,y,type,out_stride,line,mul) do { \
637
uint32_t *__bits__; \
641
__bits__ = pict->bits.bits; \
642
__stride__ = pict->bits.rowstride; \
643
__bpp__ = PIXMAN_FORMAT_BPP(pict->bits.format); \
644
(out_stride) = __stride__ * (int) sizeof (uint32_t) / (int) sizeof (type); \
645
(line) = ((type *) __bits__) + \
646
(out_stride) * (y) + (mul) * (x); \
650
#define PIXMAN_FORMAT_16BPC(f) (PIXMAN_FORMAT_A(f) > 8 || \
651
PIXMAN_FORMAT_R(f) > 8 || \
652
PIXMAN_FORMAT_G(f) > 8 || \
653
PIXMAN_FORMAT_B(f) > 8)
658
#define MAX_ALPHA(n) ((1 << (n)) - 1)
659
#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
660
#define N_X_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) + 1)
662
#define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC(n))
663
#define STEP_Y_BIG(n) (pixman_fixed_1 - (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
665
#define Y_FRAC_FIRST(n) (STEP_Y_SMALL(n) / 2)
666
#define Y_FRAC_LAST(n) (Y_FRAC_FIRST(n) + (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
668
#define STEP_X_SMALL(n) (pixman_fixed_1 / N_X_FRAC(n))
669
#define STEP_X_BIG(n) (pixman_fixed_1 - (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
671
#define X_FRAC_FIRST(n) (STEP_X_SMALL(n) / 2)
672
#define X_FRAC_LAST(n) (X_FRAC_FIRST(n) + (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
674
#define RenderSamplesX(x,n) ((n) == 1 ? 0 : (pixman_fixed_frac (x) + X_FRAC_FIRST(n)) / STEP_X_SMALL(n))
677
* Step across a small sample grid gap
679
#define RenderEdgeStepSmall(edge) { \
680
edge->x += edge->stepx_small; \
681
edge->e += edge->dx_small; \
684
edge->e -= edge->dy; \
685
edge->x += edge->signdx; \
690
* Step across a large sample grid gap
692
#define RenderEdgeStepBig(edge) { \
693
edge->x += edge->stepx_big; \
694
edge->e += edge->dx_big; \
697
edge->e -= edge->dy; \
698
edge->x += edge->signdx; \
703
pixman_rasterize_edges_accessors (pixman_image_t *image,
710
pixman_image_is_opaque(pixman_image_t *image);
713
pixman_image_can_get_solid (pixman_image_t *image);
716
pixman_compute_composite_region32 (pixman_region32_t * pRegion,
717
pixman_image_t * pSrc,
718
pixman_image_t * pMask,
719
pixman_image_t * pDst,
730
#if defined(__GNUC__) && __GNUC__ >= 4
731
#define PIXMAN_EXPORT __attribute__ ((visibility("default")))
732
/* Sun Studio 8 visibility */
733
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
734
#define PIXMAN_EXPORT __global
736
#define PIXMAN_EXPORT
740
pixman_bool_t pixman_region32_copy_from_region16 (pixman_region32_t *dst,
741
pixman_region16_t *src);
742
pixman_bool_t pixman_region16_copy_from_region32 (pixman_region16_t *dst,
743
pixman_region32_t *src);
744
void pixman_region_internal_set_static_pointers (pixman_box16_t *empty_box,
745
pixman_region16_data_t *empty_data,
746
pixman_region16_data_t *broken_data);
751
static inline uint64_t
752
oil_profile_stamp_rdtsc (void)
755
__asm__ __volatile__("rdtsc\n" : "=A" (ts));
758
#define OIL_STAMP oil_profile_stamp_rdtsc
760
typedef struct PixmanTimer PixmanTimer;
771
extern int timer_defined;
772
void pixman_timer_register (PixmanTimer *timer);
774
#define TIMER_BEGIN(tname) \
776
static PixmanTimer timer##tname; \
777
uint64_t begin##tname; \
779
if (!timer##tname.initialized) \
781
timer##tname.initialized = 1; \
782
timer##tname.name = #tname; \
783
pixman_timer_register (&timer##tname); \
786
timer##tname.n_times++; \
787
begin##tname = OIL_STAMP();
789
#define TIMER_END(tname) \
790
timer##tname.total += OIL_STAMP() - begin##tname; \
793
#endif /* PIXMAN_TIMING */
795
#endif /* PIXMAN_PRIVATE_H */