RetroArch
pixman-private.h
Go to the documentation of this file.
1 #include <float.h>
2 #include <retro_inline.h>
3 
4 #ifndef PIXMAN_PRIVATE_H
5 #define PIXMAN_PRIVATE_H
6 
7 /*
8  * The defines which are shared between C and assembly code
9  */
10 
11 /* bilinear interpolation precision (must be < 8) */
12 #define BILINEAR_INTERPOLATION_BITS 7
13 #define BILINEAR_INTERPOLATION_RANGE (1 << BILINEAR_INTERPOLATION_BITS)
14 
15 /*
16  * C specific part
17  */
18 
19 #ifndef __ASSEMBLER__
20 
21 #ifndef PACKAGE
22 # error config.h must be included before pixman-private.h
23 #endif
24 
25 #define PIXMAN_DISABLE_DEPRECATED
26 #define PIXMAN_USE_INTERNAL_API
27 
28 #include "pixman.h"
29 #include <time.h>
30 #include <assert.h>
31 #include <stdio.h>
32 #include <string.h>
33 #include <stddef.h>
34 
35 #include "pixman-compiler.h"
36 
37 /*
38  * Images
39  */
41 typedef struct solid_fill solid_fill_t;
42 typedef struct gradient gradient_t;
44 typedef struct horizontal_gradient horizontal_gradient_t;
45 typedef struct vertical_gradient vertical_gradient_t;
48 typedef struct bits_image bits_image_t;
49 typedef struct circle circle_t;
50 
51 typedef struct argb_t argb_t;
52 
53 struct argb_t
54 {
55  float a;
56  float r;
57  float g;
58  float b;
59 };
60 
62  int x,
63  int y,
64  int width,
66  const uint32_t *mask);
67 
69  int x,
70  int y);
71 
73  int x,
74  int y);
75 
77  int x,
78  int y,
79  int width,
80  const uint32_t *values);
81 
82 typedef enum
83 {
89 } image_type_t;
90 
91 typedef void (*property_changed_func_t) (pixman_image_t *image);
92 
94 {
97  pixman_region32_t clip_region;
98  int32_t alpha_count; /* How many times this image is being used as an alpha map */
99  pixman_bool_t have_clip_region; /* FALSE if there is no clip */
100  pixman_bool_t client_clip; /* Whether the source clip was
101  set by a client */
102  pixman_bool_t clip_sources; /* Whether the clip applies when
103  * the image is used as a source
104  */
105  pixman_bool_t dirty;
106  pixman_transform_t * transform;
107  pixman_repeat_t repeat;
108  pixman_filter_t filter;
109  pixman_fixed_t * filter_params;
114  pixman_bool_t component_alpha;
116 
117  pixman_image_destroy_func_t destroy_func;
118  void * destroy_data;
119 
121  pixman_format_code_t extended_format_code;
122 };
123 
125 {
127  pixman_color_t color;
128 
131 };
132 
133 struct gradient
134 {
136  int n_stops;
137  pixman_gradient_stop_t *stops;
138 };
139 
141 {
143  pixman_point_fixed_t p1;
144  pixman_point_fixed_t p2;
145 };
146 
147 struct circle
148 {
149  pixman_fixed_t x;
150  pixman_fixed_t y;
151  pixman_fixed_t radius;
152 };
153 
155 {
157 
160 
162  double a;
163  double inva;
164  double mindr;
165 };
166 
168 {
170  pixman_point_fixed_t center;
171  double angle;
172 };
173 
175 {
177  pixman_format_code_t format;
178  const pixman_indexed_t * indexed;
179  int width;
180  int height;
183  int rowstride; /* in number of uint32_t's */
184 
188 
192 
193  /* Used for indirect access to the bits */
194  pixman_read_memory_func_t read_func;
195  pixman_write_memory_func_t write_func;
196 };
197 
199 {
208 };
209 
211 typedef uint32_t *(* pixman_iter_get_scanline_t) (pixman_iter_t *iter, const uint32_t *mask);
214 
215 typedef enum
216 {
217  ITER_NARROW = (1 << 0),
218  ITER_WIDE = (1 << 1),
219 
220  /* "Localized alpha" is when the alpha channel is used only to compute
221  * the alpha value of the destination. This means that the computation
222  * of the RGB values of the result is independent of the alpha value.
223  *
224  * For example, the OVER operator has localized alpha for the
225  * destination, because the RGB values of the result can be computed
226  * without knowing the destination alpha. Similarly, ADD has localized
227  * alpha for both source and destination because the RGB values of the
228  * result can be computed without knowing the alpha value of source or
229  * destination.
230  *
231  * When he destination is xRGB, this is useful knowledge, because then
232  * we can treat it as if it were ARGB, which means in some cases we can
233  * avoid copying it to a temporary buffer.
234  */
236  ITER_IGNORE_ALPHA = (1 << 3),
237  ITER_IGNORE_RGB = (1 << 4),
238 
239  /* These indicate whether the iterator is for a source
240  * or a destination image
241  */
242  ITER_SRC = (1 << 5),
243  ITER_DEST = (1 << 6)
244 } iter_flags_t;
245 
247 {
248  /* These are initialized by _pixman_implementation_{src,dest}_init */
249  pixman_image_t * image;
251  int x, y;
252  int width;
253  int height;
256 
257  /* These function pointers are initialized by the implementation */
261 
262  /* These fields are scratch data that implementations can use */
263  void * data;
265  int stride;
266 };
267 
270  const pixman_iter_info_t *info);
272 {
273  pixman_format_code_t format;
279 };
280 
281 void
283 
284 void
285 _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter);
286 
287 void
288 _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter);
289 
290 void
291 _pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter);
292 
293 void
294 _pixman_radial_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter);
295 
296 void
298 
299 void
300 _pixman_image_init (pixman_image_t *image);
301 
302 pixman_bool_t
303 _pixman_bits_image_init (pixman_image_t * image,
304  pixman_format_code_t format,
305  int width,
306  int height,
307  uint32_t * bits,
308  int rowstride,
309  pixman_bool_t clear);
310 pixman_bool_t
311 _pixman_image_fini (pixman_image_t *image);
312 
313 pixman_image_t *
315 
316 pixman_bool_t
318  const pixman_gradient_stop_t *stops,
319  int n_stops);
320 void
321 _pixman_image_reset_clip_region (pixman_image_t *image);
322 
323 void
324 _pixman_image_validate (pixman_image_t *image);
325 
326 #define PIXMAN_IMAGE_GET_LINE(image, x, y, type, out_stride, line, mul) \
327  do \
328  { \
329  uint32_t *__bits__; \
330  int __stride__; \
331  \
332  __bits__ = image->bits.bits; \
333  __stride__ = image->bits.rowstride; \
334  (out_stride) = \
335  __stride__ * (int) sizeof (uint32_t) / (int) sizeof (type); \
336  (line) = \
337  ((type *) __bits__) + (out_stride) * (y) + (mul) * (x); \
338  } while (0)
339 
340 /*
341  * Gradient walker
342  */
343 typedef struct
344 {
345  float a_s, a_b;
346  float r_s, r_b;
347  float g_s, g_b;
348  float b_s, b_b;
349  pixman_fixed_48_16_t left_x;
350  pixman_fixed_48_16_t right_x;
351 
352  pixman_gradient_stop_t *stops;
354  pixman_repeat_t repeat;
355 
356  pixman_bool_t need_reset;
358 
359 void
362  pixman_repeat_t repeat);
363 
364 void
366  pixman_fixed_48_16_t pos);
367 
368 uint32_t
370  pixman_fixed_48_16_t x);
371 
372 /*
373  * Edges
374  */
375 
376 #define MAX_ALPHA(n) ((1 << (n)) - 1)
377 #define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) - 1)
378 #define N_X_FRAC(n) ((n) == 1 ? 1 : (1 << ((n) / 2)) + 1)
379 
380 #define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC (n))
381 #define STEP_Y_BIG(n) (pixman_fixed_1 - (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n))
382 
383 #define Y_FRAC_FIRST(n) (STEP_Y_BIG (n) / 2)
384 #define Y_FRAC_LAST(n) (Y_FRAC_FIRST (n) + (N_Y_FRAC (n) - 1) * STEP_Y_SMALL (n))
385 
386 #define STEP_X_SMALL(n) (pixman_fixed_1 / N_X_FRAC (n))
387 #define STEP_X_BIG(n) (pixman_fixed_1 - (N_X_FRAC (n) - 1) * STEP_X_SMALL (n))
388 
389 #define X_FRAC_FIRST(n) (STEP_X_BIG (n) / 2)
390 #define X_FRAC_LAST(n) (X_FRAC_FIRST (n) + (N_X_FRAC (n) - 1) * STEP_X_SMALL (n))
391 
392 #define RENDER_SAMPLES_X(x, n) \
393  ((n) == 1? 0 : (pixman_fixed_frac (x) + \
394  X_FRAC_FIRST (n)) / STEP_X_SMALL (n))
395 
396 void
397 pixman_rasterize_edges_accessors (pixman_image_t *image,
398  pixman_edge_t * l,
399  pixman_edge_t * r,
400  pixman_fixed_t t,
401  pixman_fixed_t b);
402 
403 /*
404  * Implementations
405  */
407 
408 typedef struct
409 {
410  pixman_op_t op;
411  pixman_image_t * src_image;
412  pixman_image_t * mask_image;
413  pixman_image_t * dest_image;
422 
427 
428 #define PIXMAN_COMPOSITE_ARGS(info) \
429  MAYBE_UNUSED pixman_op_t op = info->op; \
430  MAYBE_UNUSED pixman_image_t * src_image = info->src_image; \
431  MAYBE_UNUSED pixman_image_t * mask_image = info->mask_image; \
432  MAYBE_UNUSED pixman_image_t * dest_image = info->dest_image; \
433  MAYBE_UNUSED int32_t src_x = info->src_x; \
434  MAYBE_UNUSED int32_t src_y = info->src_y; \
435  MAYBE_UNUSED int32_t mask_x = info->mask_x; \
436  MAYBE_UNUSED int32_t mask_y = info->mask_y; \
437  MAYBE_UNUSED int32_t dest_x = info->dest_x; \
438  MAYBE_UNUSED int32_t dest_y = info->dest_y; \
439  MAYBE_UNUSED int32_t width = info->width; \
440  MAYBE_UNUSED int32_t height = info->height
441 
443  pixman_op_t op,
444  uint32_t * dest,
445  const uint32_t * src,
446  const uint32_t * mask,
447  int width);
448 
450  pixman_op_t op,
451  float * dest,
452  const float * src,
453  const float * mask,
454  int n_pixels);
455 
458 typedef pixman_bool_t (*pixman_blt_func_t) (pixman_implementation_t *imp,
459  uint32_t * src_bits,
460  uint32_t * dst_bits,
461  int src_stride,
462  int dst_stride,
463  int src_bpp,
464  int dst_bpp,
465  int src_x,
466  int src_y,
467  int dest_x,
468  int dest_y,
469  int width,
470  int height);
471 typedef pixman_bool_t (*pixman_fill_func_t) (pixman_implementation_t *imp,
472  uint32_t * bits,
473  int stride,
474  int bpp,
475  int x,
476  int y,
477  int width,
478  int height,
479  uint32_t filler);
480 
483 
484 typedef struct
485 {
486  pixman_op_t op;
487  pixman_format_code_t src_format;
489  pixman_format_code_t mask_format;
491  pixman_format_code_t dest_format;
495 
497 {
502 
505 
510 };
511 
512 uint32_t
514  pixman_image_t * image,
515  pixman_format_code_t format);
516 
519  const pixman_fast_path_t *fast_paths);
520 
521 void
523  pixman_op_t op,
524  pixman_format_code_t src_format,
525  uint32_t src_flags,
526  pixman_format_code_t mask_format,
527  uint32_t mask_flags,
528  pixman_format_code_t dest_format,
529  uint32_t dest_flags,
530  pixman_implementation_t **out_imp,
531  pixman_composite_func_t *out_func);
532 
535  pixman_op_t op,
536  pixman_bool_t component_alpha,
537  pixman_bool_t wide);
538 
539 pixman_bool_t
541  uint32_t * src_bits,
542  uint32_t * dst_bits,
543  int src_stride,
544  int dst_stride,
545  int src_bpp,
546  int dst_bpp,
547  int src_x,
548  int src_y,
549  int dest_x,
550  int dest_y,
551  int width,
552  int height);
553 
554 pixman_bool_t
556  uint32_t * bits,
557  int stride,
558  int bpp,
559  int x,
560  int y,
561  int width,
562  int height,
563  uint32_t filler);
564 
565 void
567  pixman_iter_t *iter,
568  pixman_image_t *image,
569  int x,
570  int y,
571  int width,
572  int height,
573  uint8_t *buffer,
575  uint32_t image_flags);
576 
577 /* Specific implementations */
580 
583 
586 
587 #if defined USE_X86_MMX || defined USE_ARM_IWMMXT || defined USE_LOONGSON_MMI
589 _pixman_implementation_create_mmx (pixman_implementation_t *fallback);
590 #endif
591 
592 #ifdef USE_SSE2
594 _pixman_implementation_create_sse2 (pixman_implementation_t *fallback);
595 #endif
596 
597 #ifdef USE_SSSE3
599 _pixman_implementation_create_ssse3 (pixman_implementation_t *fallback);
600 #endif
601 
602 #ifdef USE_ARM_SIMD
604 _pixman_implementation_create_arm_simd (pixman_implementation_t *fallback);
605 #endif
606 
607 #ifdef USE_ARM_NEON
609 _pixman_implementation_create_arm_neon (pixman_implementation_t *fallback);
610 #endif
611 
612 #ifdef USE_MIPS_DSPR2
614 _pixman_implementation_create_mips_dspr2 (pixman_implementation_t *fallback);
615 #endif
616 
617 #ifdef USE_VMX
619 _pixman_implementation_create_vmx (pixman_implementation_t *fallback);
620 #endif
621 
622 pixman_bool_t
624 
627 
630 
633 
636 
639 
640 pixman_bool_t
641 _pixman_disabled (const char *name);
642 
643 
644 /*
645  * Utilities
646  */
647 pixman_bool_t
648 _pixman_compute_composite_region32 (pixman_region32_t * region,
649  pixman_image_t * src_image,
650  pixman_image_t * mask_image,
651  pixman_image_t * dest_image,
652  int32_t src_x,
653  int32_t src_y,
654  int32_t mask_x,
655  int32_t mask_y,
656  int32_t dest_x,
657  int32_t dest_y,
658  int32_t width,
659  int32_t height);
660 uint32_t *
662 
663 void
665 
666 /* These "formats" all have depth 0, so they
667  * will never clash with any real ones
668  */
669 #define PIXMAN_null PIXMAN_FORMAT (0, 0, 0, 0, 0, 0)
670 #define PIXMAN_solid PIXMAN_FORMAT (0, 1, 0, 0, 0, 0)
671 #define PIXMAN_pixbuf PIXMAN_FORMAT (0, 2, 0, 0, 0, 0)
672 #define PIXMAN_rpixbuf PIXMAN_FORMAT (0, 3, 0, 0, 0, 0)
673 #define PIXMAN_unknown PIXMAN_FORMAT (0, 4, 0, 0, 0, 0)
674 #define PIXMAN_any PIXMAN_FORMAT (0, 5, 0, 0, 0, 0)
675 
676 #define PIXMAN_OP_any (PIXMAN_N_OPERATORS + 1)
677 
678 #define FAST_PATH_ID_TRANSFORM (1 << 0)
679 #define FAST_PATH_NO_ALPHA_MAP (1 << 1)
680 #define FAST_PATH_NO_CONVOLUTION_FILTER (1 << 2)
681 #define FAST_PATH_NO_PAD_REPEAT (1 << 3)
682 #define FAST_PATH_NO_REFLECT_REPEAT (1 << 4)
683 #define FAST_PATH_NO_ACCESSORS (1 << 5)
684 #define FAST_PATH_NARROW_FORMAT (1 << 6)
685 #define FAST_PATH_COMPONENT_ALPHA (1 << 8)
686 #define FAST_PATH_SAMPLES_OPAQUE (1 << 7)
687 #define FAST_PATH_UNIFIED_ALPHA (1 << 9)
688 #define FAST_PATH_SCALE_TRANSFORM (1 << 10)
689 #define FAST_PATH_NEAREST_FILTER (1 << 11)
690 #define FAST_PATH_HAS_TRANSFORM (1 << 12)
691 #define FAST_PATH_IS_OPAQUE (1 << 13)
692 #define FAST_PATH_NO_NORMAL_REPEAT (1 << 14)
693 #define FAST_PATH_NO_NONE_REPEAT (1 << 15)
694 #define FAST_PATH_X_UNIT_POSITIVE (1 << 16)
695 #define FAST_PATH_AFFINE_TRANSFORM (1 << 17)
696 #define FAST_PATH_Y_UNIT_ZERO (1 << 18)
697 #define FAST_PATH_BILINEAR_FILTER (1 << 19)
698 #define FAST_PATH_ROTATE_90_TRANSFORM (1 << 20)
699 #define FAST_PATH_ROTATE_180_TRANSFORM (1 << 21)
700 #define FAST_PATH_ROTATE_270_TRANSFORM (1 << 22)
701 #define FAST_PATH_SAMPLES_COVER_CLIP_NEAREST (1 << 23)
702 #define FAST_PATH_SAMPLES_COVER_CLIP_BILINEAR (1 << 24)
703 #define FAST_PATH_BITS_IMAGE (1 << 25)
704 #define FAST_PATH_SEPARABLE_CONVOLUTION_FILTER (1 << 26)
705 
706 #define FAST_PATH_PAD_REPEAT \
707  (FAST_PATH_NO_NONE_REPEAT | \
708  FAST_PATH_NO_NORMAL_REPEAT | \
709  FAST_PATH_NO_REFLECT_REPEAT)
710 
711 #define FAST_PATH_NORMAL_REPEAT \
712  (FAST_PATH_NO_NONE_REPEAT | \
713  FAST_PATH_NO_PAD_REPEAT | \
714  FAST_PATH_NO_REFLECT_REPEAT)
715 
716 #define FAST_PATH_NONE_REPEAT \
717  (FAST_PATH_NO_NORMAL_REPEAT | \
718  FAST_PATH_NO_PAD_REPEAT | \
719  FAST_PATH_NO_REFLECT_REPEAT)
720 
721 #define FAST_PATH_REFLECT_REPEAT \
722  (FAST_PATH_NO_NONE_REPEAT | \
723  FAST_PATH_NO_NORMAL_REPEAT | \
724  FAST_PATH_NO_PAD_REPEAT)
725 
726 #define FAST_PATH_STANDARD_FLAGS \
727  (FAST_PATH_NO_CONVOLUTION_FILTER | \
728  FAST_PATH_NO_ACCESSORS | \
729  FAST_PATH_NO_ALPHA_MAP | \
730  FAST_PATH_NARROW_FORMAT)
731 
732 #define FAST_PATH_STD_DEST_FLAGS \
733  (FAST_PATH_NO_ACCESSORS | \
734  FAST_PATH_NO_ALPHA_MAP | \
735  FAST_PATH_NARROW_FORMAT)
736 
737 #define SOURCE_FLAGS(format) \
738  (FAST_PATH_STANDARD_FLAGS | \
739  ((PIXMAN_ ## format == PIXMAN_solid) ? \
740  0 : (FAST_PATH_SAMPLES_COVER_CLIP_NEAREST | FAST_PATH_NEAREST_FILTER | FAST_PATH_ID_TRANSFORM)))
741 
742 #define MASK_FLAGS(format, extra) \
743  ((PIXMAN_ ## format == PIXMAN_null) ? 0 : (SOURCE_FLAGS (format) | extra))
744 
745 #define FAST_PATH(op, src, src_flags, mask, mask_flags, dest, dest_flags, func) \
746  PIXMAN_OP_ ## op, \
747  PIXMAN_ ## src, \
748  src_flags, \
749  PIXMAN_ ## mask, \
750  mask_flags, \
751  PIXMAN_ ## dest, \
752  dest_flags, \
753  func
754 
755 #define PIXMAN_STD_FAST_PATH(op, src, mask, dest, func) \
756  { FAST_PATH ( \
757  op, \
758  src, SOURCE_FLAGS (src), \
759  mask, MASK_FLAGS (mask, FAST_PATH_UNIFIED_ALPHA), \
760  dest, FAST_PATH_STD_DEST_FLAGS, \
761  func) }
762 
763 #define PIXMAN_STD_FAST_PATH_CA(op, src, mask, dest, func) \
764  { FAST_PATH ( \
765  op, \
766  src, SOURCE_FLAGS (src), \
767  mask, MASK_FLAGS (mask, FAST_PATH_COMPONENT_ALPHA), \
768  dest, FAST_PATH_STD_DEST_FLAGS, \
769  func) }
770 
772 
775 {
776 #ifndef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR
779 #endif
780  return global_implementation;
781 }
782 
783 /* This function is exported for the sake of the test suite and not part
784  * of the ABI.
785  */
786 PIXMAN_EXPORT pixman_implementation_t *
788 
789 /* Memory allocation helpers */
790 void *
791 pixman_malloc_ab (unsigned int n, unsigned int b);
792 
793 void *
794 pixman_malloc_abc (unsigned int a, unsigned int b, unsigned int c);
795 
796 void *
797 pixman_malloc_ab_plus_c (unsigned int a, unsigned int b, unsigned int c);
798 
799 pixman_bool_t
800 _pixman_multiply_overflows_size (size_t a, size_t b);
801 
802 pixman_bool_t
803 _pixman_multiply_overflows_int (unsigned int a, unsigned int b);
804 
805 pixman_bool_t
806 _pixman_addition_overflows_int (unsigned int a, unsigned int b);
807 
808 /* Compositing utilities */
809 void
811  const uint32_t *src,
812  pixman_format_code_t format,
813  int width);
814 
815 void
817  const argb_t *src,
818  int width);
819 
820 /* Region Helpers */
821 pixman_bool_t
822 pixman_region32_copy_from_region16 (pixman_region32_t *dst,
823  pixman_region16_t *src);
824 
825 pixman_bool_t
826 pixman_region16_copy_from_region32 (pixman_region16_t *dst,
827  pixman_region32_t *src);
828 
829 /* Doubly linked lists */
832 {
835 };
836 
839 {
842 };
843 
844 static INLINE void
846 {
847  list->head = (pixman_link_t *)list;
848  list->tail = (pixman_link_t *)list;
849 }
850 
851 static INLINE void
853 {
854  link->next = list->head;
855  link->prev = (pixman_link_t *)list;
856  list->head->prev = link;
857  list->head = link;
858 }
859 
860 static INLINE void
862 {
863  link->prev->next = link->next;
864  link->next->prev = link->prev;
865 }
866 
867 static INLINE void
869 {
871  pixman_list_prepend (list, link);
872 }
873 
874 /* Misc macros */
875 
876 #ifndef FALSE
877 # define FALSE 0
878 #endif
879 
880 #ifndef TRUE
881 # define TRUE 1
882 #endif
883 
884 #ifndef MIN
885 # define MIN(a, b) ((a < b) ? a : b)
886 #endif
887 
888 #ifndef MAX
889 # define MAX(a, b) ((a > b) ? a : b)
890 #endif
891 
892 /* Integer division that rounds towards -infinity */
893 #define DIV(a, b) \
894  ((((a) < 0) == ((b) < 0)) ? (a) / (b) : \
895  ((a) - (b) + 1 - (((b) < 0) << 1)) / (b))
896 
897 /* Modulus that produces the remainder wrt. DIV */
898 #define MOD(a, b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
899 
900 #define CLIP(v, low, high) ((v) < (low) ? (low) : ((v) > (high) ? (high) : (v)))
901 
902 #define FLOAT_IS_ZERO(f) (-FLT_MIN < (f) && (f) < FLT_MIN)
903 
904 /* Conversion between 8888 and 0565 */
905 
906 static INLINE uint16_t
908 {
909  /* The following code can be compiled into just 4 instructions on ARM */
910  uint32_t a, b;
911  a = (s >> 3) & 0x1F001F;
912  b = s & 0xFC00;
913  a |= a >> 5;
914  a |= b >> 5;
915  return (uint16_t)a;
916 }
917 
918 static INLINE uint32_t
920 {
921  return (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) |
922  ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) |
923  ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)));
924 }
925 
926 static INLINE uint32_t
928 {
929  return convert_0565_to_0888 (s) | 0xff000000;
930 }
931 
932 /* Trivial versions that are useful in macros */
933 
934 static INLINE uint32_t
936 {
937  return s;
938 }
939 
940 static INLINE uint32_t
942 {
943  return s | 0xff000000;
944 }
945 
946 static INLINE uint16_t
948 {
949  return s;
950 }
951 
952 #define PIXMAN_FORMAT_IS_WIDE(f) \
953  (PIXMAN_FORMAT_A (f) > 8 || \
954  PIXMAN_FORMAT_R (f) > 8 || \
955  PIXMAN_FORMAT_G (f) > 8 || \
956  PIXMAN_FORMAT_B (f) > 8 || \
957  PIXMAN_FORMAT_TYPE (f) == PIXMAN_TYPE_ARGB_SRGB)
958 
959 #ifdef WORDS_BIGENDIAN
960 # define SCREEN_SHIFT_LEFT(x,n) ((x) << (n))
961 # define SCREEN_SHIFT_RIGHT(x,n) ((x) >> (n))
962 #else
963 # define SCREEN_SHIFT_LEFT(x,n) ((x) >> (n))
964 # define SCREEN_SHIFT_RIGHT(x,n) ((x) << (n))
965 #endif
966 
967 static INLINE uint32_t
968 unorm_to_unorm (uint32_t val, int from_bits, int to_bits)
969 {
971 
972  if (from_bits == 0)
973  return 0;
974 
975  /* Delete any extra bits */
976  val &= ((1 << from_bits) - 1);
977 
978  if (from_bits >= to_bits)
979  return val >> (from_bits - to_bits);
980 
981  /* Start out with the high bit of val in the high bit of result. */
982  result = val << (to_bits - from_bits);
983 
984  /* Copy the bits in result, doubling the number of bits each time, until
985  * we fill all to_bits. Unrolled manually because from_bits and to_bits
986  * are usually known statically, so the compiler can turn all of this
987  * into a few shifts.
988  */
989 #define REPLICATE() \
990  do \
991  { \
992  if (from_bits < to_bits) \
993  { \
994  result |= result >> from_bits; \
995  \
996  from_bits *= 2; \
997  } \
998  } \
999  while (0)
1000 
1001  REPLICATE();
1002  REPLICATE();
1003  REPLICATE();
1004  REPLICATE();
1005  REPLICATE();
1006 
1007  return result;
1008 }
1009 
1010 uint16_t pixman_float_to_unorm (float f, int n_bits);
1011 float pixman_unorm_to_float (uint16_t u, int n_bits);
1012 
1013 /*
1014  * Various debugging code
1015  */
1016 
1017 #undef DEBUG
1018 
1019 #define COMPILE_TIME_ASSERT(x) \
1020  do { typedef int compile_time_assertion [(x)?1:-1]; } while (0)
1021 
1022 /* Turn on debugging depending on what type of release this is
1023  */
1024 #if (((PIXMAN_VERSION_MICRO % 2) == 0) && ((PIXMAN_VERSION_MINOR % 2) == 1))
1025 
1026 /* Debugging gets turned on for development releases because these
1027  * are the things that end up in bleeding edge distributions such
1028  * as Rawhide etc.
1029  *
1030  * For performance reasons we don't turn it on for stable releases or
1031  * random git checkouts. (Random git checkouts are often used for
1032  * performance work).
1033  */
1034 
1035 # define DEBUG
1036 
1037 #endif
1038 
1039 void
1040 _pixman_log_error (const char *function, const char *message);
1041 
1042 #define return_if_fail(expr) \
1043  do \
1044  { \
1045  if (unlikely (!(expr))) \
1046  { \
1047  _pixman_log_error (FUNC, "The expression " # expr " was false"); \
1048  return; \
1049  } \
1050  } \
1051  while (0)
1052 
1053 #define return_val_if_fail(expr, retval) \
1054  do \
1055  { \
1056  if (unlikely (!(expr))) \
1057  { \
1058  _pixman_log_error (FUNC, "The expression " # expr " was false"); \
1059  return (retval); \
1060  } \
1061  } \
1062  while (0)
1063 
1064 #define critical_if_fail(expr) \
1065  do \
1066  { \
1067  if (unlikely (!(expr))) \
1068  _pixman_log_error (FUNC, "The expression " # expr " was false"); \
1069  } \
1070  while (0)
1071 
1072 /*
1073  * Matrix
1074  */
1075 
1076 typedef struct { pixman_fixed_48_16_t v[3]; } pixman_vector_48_16_t;
1077 
1078 pixman_bool_t
1079 pixman_transform_point_31_16 (const pixman_transform_t *t,
1080  const pixman_vector_48_16_t *v,
1082 
1083 void
1084 pixman_transform_point_31_16_3d (const pixman_transform_t *t,
1085  const pixman_vector_48_16_t *v,
1087 
1088 void
1089 pixman_transform_point_31_16_affine (const pixman_transform_t *t,
1090  const pixman_vector_48_16_t *v,
1092 
1093 /*
1094  * Timers
1095  */
1096 
1097 #ifdef PIXMAN_TIMERS
1098 
1099 static INLINE uint64_t
1100 oil_profile_stamp_rdtsc (void)
1101 {
1102  uint32_t hi, lo;
1103 
1104  __asm__ __volatile__ ("rdtsc\n" : "=a" (lo), "=d" (hi));
1105 
1106  return lo | (((uint64_t)hi) << 32);
1107 }
1108 
1109 #define OIL_STAMP oil_profile_stamp_rdtsc
1110 
1111 typedef struct pixman_timer_t pixman_timer_t;
1112 
1113 struct pixman_timer_t
1114 {
1115  int initialized;
1116  const char * name;
1117  uint64_t n_times;
1118  uint64_t total;
1119  pixman_timer_t *next;
1120 };
1121 
1122 extern int timer_defined;
1123 
1124 void pixman_timer_register (pixman_timer_t *timer);
1125 
1126 #define TIMER_BEGIN(tname) \
1127  { \
1128  static pixman_timer_t timer ## tname; \
1129  uint64_t begin ## tname; \
1130  \
1131  if (!timer ## tname.initialized) \
1132  { \
1133  timer ## tname.initialized = 1; \
1134  timer ## tname.name = # tname; \
1135  pixman_timer_register (&timer ## tname); \
1136  } \
1137  \
1138  timer ## tname.n_times++; \
1139  begin ## tname = OIL_STAMP ();
1140 
1141 #define TIMER_END(tname) \
1142  timer ## tname.total += OIL_STAMP () - begin ## tname; \
1143  }
1144 
1145 #else
1146 
1147 #define TIMER_BEGIN(tname)
1148 #define TIMER_END(tname)
1149 
1150 #endif /* PIXMAN_TIMERS */
1151 
1152 #endif /* __ASSEMBLER__ */
1153 
1154 #endif /* PIXMAN_PRIVATE_H */
pixman_transform_t * transform
Definition: pixman-private.h:106
pixman_read_memory_func_t read_func
Definition: pixman-private.h:194
pixman_gradient_stop_t * stops
Definition: pixman-private.h:137
static INLINE uint32_t unorm_to_unorm(uint32_t val, int from_bits, int to_bits)
Definition: pixman-private.h:968
void(* pixman_combine_32_func_t)(pixman_implementation_t *imp, pixman_op_t op, uint32_t *dest, const uint32_t *src, const uint32_t *mask, int width)
Definition: pixman-private.h:442
pixman_bool_t clip_sources
Definition: pixman-private.h:102
pixman_bool_t _pixman_implementation_blt(pixman_implementation_t *imp, uint32_t *src_bits, uint32_t *dst_bits, int src_stride, int dst_stride, int src_bpp, int dst_bpp, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
pixman_image_t * mask_image
Definition: pixman-private.h:412
void pixman_contract_from_float(uint32_t *dst, const argb_t *src, int width)
void _pixman_gradient_walker_init(pixman_gradient_walker_t *walker, gradient_t *gradient, pixman_repeat_t repeat)
pixman_link_t * tail
Definition: pixman-private.h:841
static INLINE void pixman_list_move_to_front(pixman_list_t *list, pixman_link_t *link)
Definition: pixman-private.h:868
pixman_bool_t pixman_region16_copy_from_region32(pixman_region16_t *dst, pixman_region32_t *src)
int link(const char *oldpath, const char *newpath)
Definition: compat_ctype.c:438
int32_t width
Definition: pixman-private.h:420
GLuint const GLchar * name
Definition: glext.h:6671
void _pixman_implementation_lookup_composite(pixman_implementation_t *toplevel, pixman_op_t op, pixman_format_code_t src_format, uint32_t src_flags, pixman_format_code_t mask_format, uint32_t mask_flags, pixman_format_code_t dest_format, uint32_t dest_flags, pixman_implementation_t **out_imp, pixman_composite_func_t *out_func)
pixman_bool_t(* pixman_fill_func_t)(pixman_implementation_t *imp, uint32_t *bits, int stride, int bpp, int x, int y, int width, int height, uint32_t filler)
Definition: pixman-private.h:471
Definition: btstack_hid.c:110
uint32_t dest_flags
Definition: pixman-private.h:425
uint32_t _pixman_gradient_walker_pixel(pixman_gradient_walker_t *walker, pixman_fixed_48_16_t x)
void pixman_transform_point_31_16_affine(const pixman_transform_t *t, const pixman_vector_48_16_t *v, pixman_vector_48_16_t *result)
static INLINE uint32_t convert_8888_to_8888(uint32_t s)
Definition: pixman-private.h:935
pixman_fixed_t x
Definition: pixman-private.h:149
double inva
Definition: pixman-private.h:163
int32_t dest_y
Definition: pixman-private.h:419
pixman_link_t * next
Definition: pixman-private.h:833
pixman_image_t * dest_image
Definition: pixman-private.h:413
GLuint GLfloat * val
Definition: glext.h:7847
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
pixman_iter_write_back_t write_back
Definition: pixman-private.h:259
uint32_t * _pixman_iter_get_scanline_noop(pixman_iter_t *iter, const uint32_t *mask)
#define INLINE
Definition: retro_inline.h:35
iter_flags_t
Definition: pixman-private.h:215
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:6318
GLuint buffer
Definition: glext.h:6555
__asm__(".arm\n" ".align 4\n" ".globl co_switch_arm\n" ".globl _co_switch_arm\n" "co_switch_arm:\n" "_co_switch_arm:\n" " stmia r1!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, lr}\n" " ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}\n")
pixman_op_t op
Definition: pixman-private.h:410
double mindr
Definition: pixman-private.h:164
pixman_format_code_t mask_format
Definition: pixman-private.h:489
static INLINE void pixman_list_init(pixman_list_t *list)
Definition: pixman-private.h:845
uint32_t src_flags
Definition: pixman-private.h:423
PIXMAN_EXPORT pixman_implementation_t * _pixman_internal_only_get_implementation(void)
Definition: libretro.h:2275
GLdouble GLdouble GLdouble r
Definition: glext.h:6406
pixman_bool_t _pixman_multiply_overflows_int(unsigned int a, unsigned int b)
pixman_gradient_stop_t * stops
Definition: pixman-private.h:352
GLdouble GLdouble t
Definition: glext.h:6398
pixman_fixed_48_16_t right_x
Definition: pixman-private.h:350
Definition: pixman-private.h:53
uint32_t mask_flags
Definition: pixman-private.h:490
void * pixman_malloc_ab(unsigned int n, unsigned int b)
gradient_t common
Definition: pixman-private.h:156
int n_filter_params
Definition: pixman-private.h:110
pixman_combine_32_func_t combine_32_ca[PIXMAN_N_OPERATORS]
Definition: pixman-private.h:507
static INLINE uint16_t convert_8888_to_0565(uint32_t s)
Definition: pixman-private.h:907
static INLINE pixman_implementation_t * get_implementation(void)
Definition: pixman-private.h:774
GLfloat f
Definition: glext.h:8207
uint32_t *(* pixman_iter_get_scanline_t)(pixman_iter_t *iter, const uint32_t *mask)
Definition: pixman-private.h:211
const pixman_indexed_t * indexed
Definition: pixman-private.h:178
uint32_t color_32
Definition: pixman-private.h:129
uint8_t * bits
Definition: pixman-private.h:264
int x
Definition: pixman-private.h:251
Definition: pixman-private.h:242
circle_t c1
Definition: pixman-private.h:158
pixman_image_t * image
Definition: pixman-private.h:249
#define next(ls)
Definition: llex.c:32
GLdouble s
Definition: glext.h:6390
bits_image_t bits
Definition: pixman-private.h:202
float a_s
Definition: pixman-private.h:345
pixman_point_fixed_t p2
Definition: pixman-private.h:144
const struct retro_game_info * info
Definition: libretro.h:2121
conical_gradient_t conical
Definition: pixman-private.h:205
pixman_bool_t _pixman_implementation_disabled(const char *name)
pixman_bool_t pixman_region32_copy_from_region16(pixman_region32_t *dst, pixman_region16_t *src)
pixman_bool_t _pixman_multiply_overflows_size(size_t a, size_t b)
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
image_common_t common
Definition: pixman-private.h:176
struct argb_t argb_t
Definition: pixman-private.h:51
void(* pixman_combine_float_func_t)(pixman_implementation_t *imp, pixman_op_t op, float *dest, const float *src, const float *mask, int n_pixels)
Definition: pixman-private.h:449
Definition: pixman-private.h:147
void _pixman_gradient_walker_reset(pixman_gradient_walker_t *walker, pixman_fixed_48_16_t pos)
pixman_iter_get_scanline_t get_scanline
Definition: pixman-private.h:258
int width
Definition: pixman-private.h:179
uint32_t(* fetch_pixel_32_t)(bits_image_t *image, int x, int y)
Definition: pixman-private.h:68
int y
Definition: pixman-private.h:251
void * destroy_data
Definition: pixman-private.h:118
void(* pixman_composite_func_t)(pixman_implementation_t *imp, pixman_composite_info_t *info)
Definition: pixman-private.h:456
pixman_link_t * head
Definition: pixman-private.h:840
int height
Definition: pixman-private.h:253
gradient_t common
Definition: pixman-private.h:169
pixman_bool_t _pixman_addition_overflows_int(unsigned int a, unsigned int b)
const GLubyte * c
Definition: glext.h:9812
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
int num_stops
Definition: pixman-private.h:353
pixman_bool_t(* pixman_blt_func_t)(pixman_implementation_t *imp, uint32_t *src_bits, uint32_t *dst_bits, int src_stride, int dst_stride, int src_bpp, int dst_bpp, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
Definition: pixman-private.h:458
void(* pixman_iter_fini_t)(pixman_iter_t *iter)
Definition: pixman-private.h:213
argb_t color_float
Definition: pixman-private.h:130
uint32_t src_flags
Definition: pixman-private.h:488
int n_stops
Definition: pixman-private.h:136
Definition: pixman-private.h:237
Definition: pixman-private.h:218
pixman_fill_func_t fill
Definition: pixman-private.h:504
static INLINE void pixman_list_prepend(pixman_list_t *list, pixman_link_t *link)
Definition: pixman-private.h:852
float b
Definition: pixman-private.h:58
int height
Definition: pixman-private.h:180
pixman_implementation_t * _pixman_ppc_get_implementations(pixman_implementation_t *imp)
Definition: pixman-private.h:246
fetch_scanline_t fetch_scanline_float
Definition: pixman-private.h:189
static INLINE void pixman_list_unlink(pixman_link_t *link)
Definition: pixman-private.h:861
int32_t src_x
Definition: pixman-private.h:414
fetch_pixel_32_t fetch_pixel_32
Definition: pixman-private.h:186
pixman_bool_t pixman_transform_point_31_16(const pixman_transform_t *t, const pixman_vector_48_16_t *v, pixman_vector_48_16_t *result)
pixman_bool_t _pixman_image_fini(pixman_image_t *image)
uint32_t _pixman_image_get_solid(pixman_implementation_t *imp, pixman_image_t *image, pixman_format_code_t format)
int32_t src_y
Definition: pixman-private.h:415
bool l
Definition: connect_wiiupro.c:37
argb_t(* fetch_pixel_float_t)(bits_image_t *image, int x, int y)
Definition: pixman-private.h:72
linear_gradient_t linear
Definition: pixman-private.h:204
gradient_t gradient
Definition: pixman-private.h:203
pixman_format_code_t src_format
Definition: pixman-private.h:487
pixman_point_fixed_t p1
Definition: pixman-private.h:143
int rowstride
Definition: pixman-private.h:183
pixman_combine_float_func_t combine_float[PIXMAN_N_OPERATORS]
Definition: pixman-private.h:508
int32_t alpha_count
Definition: pixman-private.h:98
void _pixman_conical_gradient_iter_init(pixman_image_t *image, pixman_iter_t *iter)
pixman_color_t color
Definition: pixman-private.h:127
pixman_composite_func_t func
Definition: pixman-private.h:493
Definition: pixman-private.h:124
void _pixman_setup_combiner_functions_32(pixman_implementation_t *imp)
void _pixman_setup_combiner_functions_float(pixman_implementation_t *imp)
Definition: pixman-private.h:86
void _pixman_iter_init_bits_stride(pixman_iter_t *iter, const pixman_iter_info_t *info)
pixman_implementation_t * _pixman_choose_implementation(void)
float g
Definition: pixman-private.h:57
Definition: pixman-private.h:496
image_common_t common
Definition: pixman-private.h:201
void * pixman_malloc_abc(unsigned int a, unsigned int b, unsigned int c)
uint32_t image_flags
Definition: pixman-private.h:255
int32_t height
Definition: pixman-private.h:421
pixman_iter_write_back_t write_back
Definition: pixman-private.h:278
Definition: pixman-private.h:236
bits_image_t * alpha_map
Definition: pixman-private.h:111
Definition: pixman-private.h:1076
pixman_implementation_t * _pixman_implementation_create_general(void)
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glext.h:6305
image_type_t type
Definition: pixman-private.h:200
#define REPLICATE()
uint32_t mask_flags
Definition: pixman-private.h:424
static INLINE uint32_t convert_x888_to_8888(uint32_t s)
Definition: pixman-private.h:941
uint32_t image_flags
Definition: pixman-private.h:274
image_common_t common
Definition: pixman-private.h:135
pixman_fixed_t * filter_params
Definition: pixman-private.h:109
void(* property_changed_func_t)(pixman_image_t *image)
Definition: pixman-private.h:91
pixman_fixed_t radius
Definition: pixman-private.h:151
pixman_combine_32_func_t _pixman_implementation_lookup_combiner(pixman_implementation_t *imp, pixman_op_t op, pixman_bool_t component_alpha, pixman_bool_t wide)
static INLINE uint16_t convert_0565_to_0565(uint16_t s)
Definition: pixman-private.h:947
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
Definition: pixman-arm-neon-asm.h:139
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:6233
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
Definition: pixman-private.h:87
GLenum src
Definition: glext.h:6980
Definition: pixman-private.h:167
GLenum GLint GLuint mask
Definition: glext.h:6668
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
void _pixman_image_reset_clip_region(pixman_image_t *image)
pixman_bool_t client_clip
Definition: pixman-private.h:100
GLuint64EXT * result
Definition: glext.h:12211
Definition: pixman-private.h:140
pixman_iter_get_scanline_t get_scanline
Definition: pixman-private.h:277
pixman_link_t * prev
Definition: pixman-private.h:834
uint32_t dest_flags
Definition: pixman-private.h:492
float pixman_unorm_to_float(uint16_t u, int n_bits)
image_type_t type
Definition: pixman-private.h:95
float g_s
Definition: pixman-private.h:347
void _pixman_implementation_iter_init(pixman_implementation_t *imp, pixman_iter_t *iter, pixman_image_t *image, int x, int y, int width, int height, uint8_t *buffer, iter_flags_t flags, uint32_t image_flags)
radial_gradient_t radial
Definition: pixman-private.h:206
uint32_t * bits
Definition: pixman-private.h:181
Definition: pixman-private.h:93
void _pixman_bits_image_dest_iter_init(pixman_image_t *image, pixman_iter_t *iter)
Definition: pixman-private.h:235
pixman_combine_float_func_t combine_float_ca[PIXMAN_N_OPERATORS]
Definition: pixman-private.h:509
void * data
Definition: pixman-private.h:263
void _pixman_log_error(const char *function, const char *message)
pixman_combine_32_func_t combine_32[PIXMAN_N_OPERATORS]
Definition: pixman-private.h:506
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld [DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld src_bpp[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp local skip1 beq endif
Definition: pixman-arm-neon-asm.h:474
signed int int32_t
Definition: stdint.h:123
pixman_write_memory_func_t write_func
Definition: pixman-private.h:195
pixman_iter_fini_t fini
Definition: pixman-private.h:260
void pixman_transform_point_31_16_3d(const pixman_transform_t *t, const pixman_vector_48_16_t *v, pixman_vector_48_16_t *result)
Definition: pixman-private.h:84
pixman_repeat_t repeat
Definition: pixman-private.h:107
double angle
Definition: pixman-private.h:171
Definition: pixman-private.h:88
void _pixman_radial_gradient_iter_init(pixman_image_t *image, pixman_iter_t *iter)
iter_flags_t iter_flags
Definition: pixman-private.h:254
int alpha_origin_y
Definition: pixman-private.h:113
Definition: pixman-private.h:343
circle_t c2
Definition: pixman-private.h:159
store_scanline_t store_scanline_32
Definition: pixman-private.h:187
void _pixman_image_validate(pixman_image_t *image)
static int initialized
Definition: iosuhax_disc_interface.c:32
Definition: pixman-private.h:198
uint32_t * free_me
Definition: pixman-private.h:182
int stride
Definition: pixman-private.h:265
pixman_bool_t need_reset
Definition: pixman-private.h:356
fetch_pixel_float_t fetch_pixel_float
Definition: pixman-private.h:190
iter_flags_t iter_flags
Definition: pixman-private.h:275
Definition: pixman-private.h:154
const GLdouble * v
Definition: glext.h:6391
pixman_implementation_t * _pixman_implementation_create_fast_path(pixman_implementation_t *fallback)
pixman_image_t * src_image
Definition: pixman-private.h:411
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:11836
void(* pixman_iter_write_back_t)(pixman_iter_t *iter)
Definition: pixman-private.h:212
Definition: pixman-private.h:133
pixman_bool_t component_alpha
Definition: pixman-private.h:114
void _pixman_bits_image_setup_accessors(bits_image_t *image)
Definition: pixman-private.h:243
int32_t ref_count
Definition: pixman-private.h:96
void(* store_scanline_t)(bits_image_t *image, int x, int y, int width, const uint32_t *values)
Definition: pixman-private.h:76
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
pixman_filter_t filter
Definition: pixman-private.h:108
void _pixman_linear_gradient_iter_init(pixman_image_t *image, pixman_iter_t *iter)
Definition: pixman-private.h:838
fetch_scanline_t fetch_scanline_32
Definition: pixman-private.h:185
void _pixman_image_init(pixman_image_t *image)
GLint GLint GLsizei width
Definition: glext.h:6293
double a
Definition: pixman-private.h:162
pixman_blt_func_t blt
Definition: pixman-private.h:503
pixman_bool_t _pixman_bits_image_init(pixman_image_t *image, pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride, pixman_bool_t clear)
pixman_implementation_t * global_implementation
float r_s
Definition: pixman-private.h:346
solid_fill_t solid
Definition: pixman-private.h:207
Definition: pixman-private.h:484
pixman_region32_t clip_region
Definition: pixman-private.h:97
pixman_format_code_t format
Definition: pixman-private.h:273
pixman_bool_t _pixman_disabled(const char *name)
Definition: pixman-private.h:271
pixman_image_destroy_func_t destroy_func
Definition: pixman-private.h:117
circle_t delta
Definition: pixman-private.h:161
image_type_t
Definition: pixman-private.h:82
uint16_t pixman_float_to_unorm(float f, int n_bits)
Definition: pixman-private.h:217
Definition: pixman-private.h:174
uint32_t * buffer
Definition: pixman-private.h:250
uint32_t flags
Definition: pixman-private.h:120
float b_s
Definition: pixman-private.h:348
pixman_bool_t dirty
Definition: pixman-private.h:105
void(* fetch_scanline_t)(bits_image_t *image, int x, int y, int width, uint32_t *buffer, const uint32_t *mask)
Definition: pixman-private.h:61
static INLINE uint32_t convert_0565_to_8888(uint16_t s)
Definition: pixman-private.h:927
pixman_format_code_t extended_format_code
Definition: pixman-private.h:121
pixman_fixed_t y
Definition: pixman-private.h:150
store_scanline_t store_scanline_float
Definition: pixman-private.h:191
int32_t dest_x
Definition: pixman-private.h:418
GLsizei stride
Definition: glext.h:6488
GLenum GLenum dst
Definition: glext.h:6980
int32_t mask_y
Definition: pixman-private.h:417
static INLINE uint32_t convert_0565_to_0888(uint16_t s)
Definition: pixman-private.h:919
const pixman_fast_path_t * fast_paths
Definition: pixman-private.h:500
pixman_implementation_t * _pixman_implementation_create(pixman_implementation_t *fallback, const pixman_fast_path_t *fast_paths)
void * pixman_malloc_ab_plus_c(unsigned int a, unsigned int b, unsigned int c)
pixman_point_fixed_t center
Definition: pixman-private.h:170
Definition: pixman-private.h:831
void pixman_expand_to_float(argb_t *dst, const uint32_t *src, pixman_format_code_t format, int width)
Definition: video4linux2.c:51
pixman_implementation_t * fallback
Definition: pixman-private.h:499
pixman_image_t * _pixman_image_allocate(void)
pixman_bool_t _pixman_implementation_fill(pixman_implementation_t *imp, uint32_t *bits, int stride, int bpp, int x, int y, int width, int height, uint32_t filler)
pixman_op_t op
Definition: pixman-private.h:486
int alpha_origin_x
Definition: pixman-private.h:112
pixman_fixed_48_16_t left_x
Definition: pixman-private.h:349
GLbitfield flags
Definition: glext.h:7828
pixman_implementation_t * _pixman_implementation_create_noop(pixman_implementation_t *fallback)
pixman_repeat_t repeat
Definition: pixman-private.h:354
struct horizontal_gradient horizontal_gradient_t
Definition: pixman-private.h:44
Definition: pixman-private.h:408
float r
Definition: pixman-private.h:56
void pixman_rasterize_edges_accessors(pixman_image_t *image, pixman_edge_t *l, pixman_edge_t *r, pixman_fixed_t t, pixman_fixed_t b)
struct vertical_gradient vertical_gradient_t
Definition: pixman-private.h:45
pixman_format_code_t dest_format
Definition: pixman-private.h:491
image_common_t common
Definition: pixman-private.h:126
int width
Definition: pixman-private.h:252
unsigned short uint16_t
Definition: stdint.h:125
gradient_t common
Definition: pixman-private.h:142
unsigned __int64 uint64_t
Definition: stdint.h:136
pixman_implementation_t * toplevel
Definition: pixman-private.h:498
GLdouble n
Definition: glext.h:8396
unsigned char uint8_t
Definition: stdint.h:124
unsigned int uint32_t
Definition: stdint.h:126
pixman_implementation_t * _pixman_x86_get_implementations(pixman_implementation_t *imp)
const pixman_iter_info_t * iter_info
Definition: pixman-private.h:501
float a
Definition: pixman-private.h:55
pixman_iter_initializer_t initializer
Definition: pixman-private.h:276
int32_t mask_x
Definition: pixman-private.h:416
pixman_bool_t _pixman_compute_composite_region32(pixman_region32_t *region, pixman_image_t *src_image, pixman_image_t *mask_image, pixman_image_t *dest_image, int32_t src_x, int32_t src_y, int32_t mask_x, int32_t mask_y, int32_t dest_x, int32_t dest_y, int32_t width, int32_t height)
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
void(* pixman_iter_initializer_t)(pixman_iter_t *iter, const pixman_iter_info_t *info)
Definition: pixman-private.h:269
void _pixman_bits_image_src_iter_init(pixman_image_t *image, pixman_iter_t *iter)
property_changed_func_t property_changed
Definition: pixman-private.h:115
pixman_bool_t have_clip_region
Definition: pixman-private.h:99
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
Definition: pixman-private.h:85
pixman_format_code_t format
Definition: pixman-private.h:177
pixman_implementation_t * _pixman_arm_get_implementations(pixman_implementation_t *imp)
pixman_bool_t _pixman_init_gradient(gradient_t *gradient, const pixman_gradient_stop_t *stops, int n_stops)
pixman_implementation_t * _pixman_mips_get_implementations(pixman_implementation_t *imp)