aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/pixman/pixman-private.h')
-rw-r--r--pixman/pixman/pixman-private.h79
1 files changed, 43 insertions, 36 deletions
diff --git a/pixman/pixman/pixman-private.h b/pixman/pixman/pixman-private.h
index b9c8319df..dd03a939b 100644
--- a/pixman/pixman/pixman-private.h
+++ b/pixman/pixman/pixman-private.h
@@ -45,6 +45,16 @@ typedef struct radial_gradient radial_gradient_t;
typedef struct bits_image bits_image_t;
typedef struct circle circle_t;
+typedef struct argb_t argb_t;
+
+struct argb_t
+{
+ float a;
+ float r;
+ float g;
+ float b;
+};
+
typedef void (*fetch_scanline_t) (pixman_image_t *image,
int x,
int y,
@@ -56,9 +66,9 @@ typedef uint32_t (*fetch_pixel_32_t) (bits_image_t *image,
int x,
int y);
-typedef uint64_t (*fetch_pixel_64_t) (bits_image_t *image,
- int x,
- int y);
+typedef argb_t (*fetch_pixel_float_t) (bits_image_t *image,
+ int x,
+ int y);
typedef void (*store_scanline_t) (bits_image_t * image,
int x,
@@ -112,9 +122,9 @@ struct solid_fill
{
image_common_t common;
pixman_color_t color;
-
+
uint32_t color_32;
- uint64_t color_64;
+ argb_t color_float;
};
struct gradient
@@ -173,9 +183,9 @@ struct bits_image
fetch_pixel_32_t fetch_pixel_32;
store_scanline_t store_scanline_32;
- fetch_scanline_t fetch_scanline_64;
- fetch_pixel_64_t fetch_pixel_64;
- store_scanline_t store_scanline_64;
+ fetch_scanline_t fetch_scanline_float;
+ fetch_pixel_float_t fetch_pixel_float;
+ store_scanline_t store_scanline_float;
/* Used for indirect access to the bits */
pixman_read_memory_func_t read_func;
@@ -414,12 +424,12 @@ typedef void (*pixman_combine_32_func_t) (pixman_implementation_t *imp,
const uint32_t * mask,
int width);
-typedef void (*pixman_combine_64_func_t) (pixman_implementation_t *imp,
- pixman_op_t op,
- uint64_t * dest,
- const uint64_t * src,
- const uint64_t * mask,
- int width);
+typedef 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);
typedef void (*pixman_composite_func_t) (pixman_implementation_t *imp,
pixman_composite_info_t *info);
@@ -449,7 +459,7 @@ typedef pixman_bool_t (*pixman_iter_init_func_t) (pixman_implementation_t *imp,
pixman_iter_t *iter);
void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp);
-void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp);
+void _pixman_setup_combiner_functions_float (pixman_implementation_t *imp);
typedef struct
{
@@ -476,8 +486,8 @@ struct pixman_implementation_t
pixman_combine_32_func_t combine_32[PIXMAN_N_OPERATORS];
pixman_combine_32_func_t combine_32_ca[PIXMAN_N_OPERATORS];
- pixman_combine_64_func_t combine_64[PIXMAN_N_OPERATORS];
- pixman_combine_64_func_t combine_64_ca[PIXMAN_N_OPERATORS];
+ pixman_combine_float_func_t combine_float[PIXMAN_N_OPERATORS];
+ pixman_combine_float_func_t combine_float_ca[PIXMAN_N_OPERATORS];
};
uint32_t
@@ -754,6 +764,12 @@ get_implementation (void)
return global_implementation;
}
+/* This function is exported for the sake of the test suite and not part
+ * of the ABI.
+ */
+PIXMAN_EXPORT pixman_implementation_t *
+_pixman_internal_only_get_implementation (void);
+
/* Memory allocation helpers */
void *
pixman_malloc_ab (unsigned int n, unsigned int b);
@@ -772,15 +788,15 @@ _pixman_addition_overflows_int (unsigned int a, unsigned int b);
/* Compositing utilities */
void
-pixman_expand (uint64_t * dst,
- const uint32_t * src,
- pixman_format_code_t format,
- int width);
+pixman_expand_to_float (argb_t *dst,
+ const uint32_t *src,
+ pixman_format_code_t format,
+ int width);
void
-pixman_contract (uint32_t * dst,
- const uint64_t *src,
- int width);
+pixman_contract_from_float (uint32_t *dst,
+ const argb_t *src,
+ int width);
/* Region Helpers */
pixman_bool_t
@@ -941,6 +957,9 @@ unorm_to_unorm (uint32_t val, int from_bits, int to_bits)
return result;
}
+uint16_t pixman_float_to_unorm (float f, int n_bits);
+float pixman_unorm_to_float (uint16_t u, int n_bits);
+
/*
* Various debugging code
*/
@@ -1089,18 +1108,6 @@ void pixman_timer_register (pixman_timer_t *timer);
#endif /* PIXMAN_TIMERS */
-/* sRGB<->linear conversion tables. Linear color space is the same
- * as sRGB but the components are in linear light (gamma 1.0).
- *
- * linear_to_srgb maps linear value from 0 to 4095 ([0.0, 1.0])
- * and returns 8-bit sRGB value.
- *
- * srgb_to_linear maps 8-bit sRGB value to 16-bit linear value
- * with range 0 to 65535 ([0.0, 1.0]).
- */
-extern const uint8_t linear_to_srgb[4096];
-extern const uint16_t srgb_to_linear[256];
-
#endif /* __ASSEMBLER__ */
#endif /* PIXMAN_PRIVATE_H */