summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-10-06 02:40:39 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2010-10-11 12:06:20 -0400
commit6ed7164de5f74b752d85834b53e89810f1d0a560 (patch)
tree7e719d547b771e5477349ff34463d5428de59ca5
parent233b27257b63ecd502c6392e5ef3a7f736f14365 (diff)
Add no-op combiners for DST and the CA versions of the HSL operators.
We already exit early for DST, but for the HSL operators with component alpha, we crash at the moment. Fix that by adding a dummy combine_dst() function.
-rw-r--r--pixman/pixman-combine.c.template31
1 files changed, 21 insertions, 10 deletions
diff --git a/pixman/pixman-combine.c.template b/pixman/pixman-combine.c.template
index 0d3b95d4..56dfb430 100644
--- a/pixman/pixman-combine.c.template
+++ b/pixman/pixman-combine.c.template
@@ -133,6 +133,17 @@ combine_clear (pixman_implementation_t *imp,
}
static void
+combine_dst (pixman_implementation_t *imp,
+ pixman_op_t op,
+ comp4_t * dest,
+ const comp4_t * src,
+ const comp4_t * mask,
+ int width)
+{
+ return;
+}
+
+static void
combine_src_u (pixman_implementation_t *imp,
pixman_op_t op,
comp4_t * dest,
@@ -2310,7 +2321,7 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
/* Unified alpha */
imp->combine_width[PIXMAN_OP_CLEAR] = combine_clear;
imp->combine_width[PIXMAN_OP_SRC] = combine_src_u;
- /* dest */
+ imp->combine_width[PIXMAN_OP_DST] = combine_dst;
imp->combine_width[PIXMAN_OP_OVER] = combine_over_u;
imp->combine_width[PIXMAN_OP_OVER_REVERSE] = combine_over_reverse_u;
imp->combine_width[PIXMAN_OP_IN] = combine_in_u;
@@ -2326,7 +2337,7 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
/* Disjoint, unified */
imp->combine_width[PIXMAN_OP_DISJOINT_CLEAR] = combine_clear;
imp->combine_width[PIXMAN_OP_DISJOINT_SRC] = combine_src_u;
- /* dest */
+ imp->combine_width[PIXMAN_OP_DISJOINT_DST] = combine_dst;
imp->combine_width[PIXMAN_OP_DISJOINT_OVER] = combine_disjoint_over_u;
imp->combine_width[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combine_saturate_u;
imp->combine_width[PIXMAN_OP_DISJOINT_IN] = combine_disjoint_in_u;
@@ -2340,7 +2351,7 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
/* Conjoint, unified */
imp->combine_width[PIXMAN_OP_CONJOINT_CLEAR] = combine_clear;
imp->combine_width[PIXMAN_OP_CONJOINT_SRC] = combine_src_u;
- /* dest */
+ imp->combine_width[PIXMAN_OP_CONJOINT_DST] = combine_dst;
imp->combine_width[PIXMAN_OP_CONJOINT_OVER] = combine_conjoint_over_u;
imp->combine_width[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combine_conjoint_over_reverse_u;
imp->combine_width[PIXMAN_OP_CONJOINT_IN] = combine_conjoint_in_u;
@@ -2386,7 +2397,7 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
/* Disjoint CA */
imp->combine_width_ca[PIXMAN_OP_DISJOINT_CLEAR] = combine_clear_ca;
imp->combine_width_ca[PIXMAN_OP_DISJOINT_SRC] = combine_src_ca;
- /* dest */
+ imp->combine_width_ca[PIXMAN_OP_DISJOINT_DST] = combine_dst;
imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER] = combine_disjoint_over_ca;
imp->combine_width_ca[PIXMAN_OP_DISJOINT_OVER_REVERSE] = combine_saturate_ca;
imp->combine_width_ca[PIXMAN_OP_DISJOINT_IN] = combine_disjoint_in_ca;
@@ -2400,7 +2411,7 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
/* Conjoint CA */
imp->combine_width_ca[PIXMAN_OP_CONJOINT_CLEAR] = combine_clear_ca;
imp->combine_width_ca[PIXMAN_OP_CONJOINT_SRC] = combine_src_ca;
- /* dest */
+ imp->combine_width_ca[PIXMAN_OP_CONJOINT_DST] = combine_dst;
imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER] = combine_conjoint_over_ca;
imp->combine_width_ca[PIXMAN_OP_CONJOINT_OVER_REVERSE] = combine_conjoint_over_reverse_ca;
imp->combine_width_ca[PIXMAN_OP_CONJOINT_IN] = combine_conjoint_in_ca;
@@ -2423,10 +2434,10 @@ _pixman_setup_combiner_functions_width (pixman_implementation_t *imp)
imp->combine_width_ca[PIXMAN_OP_DIFFERENCE] = combine_difference_ca;
imp->combine_width_ca[PIXMAN_OP_EXCLUSION] = combine_exclusion_ca;
- /* It is not clear that these make sense, so leave them out for now */
- imp->combine_width_ca[PIXMAN_OP_HSL_HUE] = NULL;
- imp->combine_width_ca[PIXMAN_OP_HSL_SATURATION] = NULL;
- imp->combine_width_ca[PIXMAN_OP_HSL_COLOR] = NULL;
- imp->combine_width_ca[PIXMAN_OP_HSL_LUMINOSITY] = NULL;
+ /* It is not clear that these make sense, so make them noops for now */
+ imp->combine_width_ca[PIXMAN_OP_HSL_HUE] = combine_dst;
+ imp->combine_width_ca[PIXMAN_OP_HSL_SATURATION] = combine_dst;
+ imp->combine_width_ca[PIXMAN_OP_HSL_COLOR] = combine_dst;
+ imp->combine_width_ca[PIXMAN_OP_HSL_LUMINOSITY] = combine_dst;
}