summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/gxblend.c47
1 files changed, 44 insertions, 3 deletions
diff --git a/base/gxblend.c b/base/gxblend.c
index 5ea4b576f..4b65adfd1 100644
--- a/base/gxblend.c
+++ b/base/gxblend.c
@@ -1829,6 +1829,40 @@ compose_group_nonknockout_nonblend_add_isolated_mask_common(byte *tos_ptr, bool
1829} 1829}
1830 1830
1831static void 1831static void
1832compose_group_nonknockout_nonblend_add_isolated_mask_common_solid(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape,
1833 int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
1834 byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
1835 int nos_shape_offset, int nos_tag_offset,
1836 byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
1837 byte *backdrop_ptr,
1838 bool has_matte, int n_chan, bool additive, int num_spots, bool overprint, gx_color_index drawn_comps, int x0, int y0, int x1, int y1,
1839 const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
1840{
1841 template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, 255, 255, BLEND_MODE_Normal, /*tos_has_shape*/0,
1842 tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
1843 nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
1844 /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
1845 backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev, 1);
1846}
1847
1848static void
1849compose_group_nonknockout_nonblend_add_isolated_mask_common_shape(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape,
1850 int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
1851 byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
1852 int nos_shape_offset, int nos_tag_offset,
1853 byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
1854 byte *backdrop_ptr,
1855 bool has_matte, int n_chan, bool additive, int num_spots, bool overprint, gx_color_index drawn_comps, int x0, int y0, int x1, int y1,
1856 const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
1857{
1858 template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, alpha, 255, BLEND_MODE_Normal, /*tos_has_shape*/0,
1859 tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
1860 nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
1861 /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
1862 backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev, 1);
1863}
1864
1865static void
1832compose_group_nonknockout_nonblend_add_isolated_nomask_common(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape, 1866compose_group_nonknockout_nonblend_add_isolated_nomask_common(byte *tos_ptr, bool tos_isolated, int tos_planestride, int tos_rowstride, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool tos_has_shape,
1833 int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag, 1867 int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
1834 byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout, 1868 byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
@@ -2144,9 +2178,16 @@ pdf14_compose_group(pdf14_buf *tos, pdf14_buf *nos, pdf14_buf *maskbuf,
2144 overprint == 0) { 2178 overprint == 0) {
2145 if (additive) { 2179 if (additive) {
2146 if (tos_isolated) { 2180 if (tos_isolated) {
2147 if (has_mask || maskbuf) /* 7% */ 2181 if (has_mask || maskbuf) {/* 7% */
2148 fn = &compose_group_nonknockout_nonblend_add_isolated_mask_common; 2182 if (shape == 255) {
2149 else /* 14% */ 2183 /* Airprint test case hits these two */
2184 if (alpha == 255)
2185 fn = &compose_group_nonknockout_nonblend_add_isolated_mask_common_solid;
2186 else
2187 fn = &compose_group_nonknockout_nonblend_add_isolated_mask_common_shape;
2188 } else
2189 fn = &compose_group_nonknockout_nonblend_add_isolated_mask_common;
2190 } else /* 14% */
2150 fn = &compose_group_nonknockout_nonblend_add_isolated_nomask_common; 2191 fn = &compose_group_nonknockout_nonblend_add_isolated_nomask_common;
2151 } else { 2192 } else {
2152 if (has_mask || maskbuf) /* 4% */ 2193 if (has_mask || maskbuf) /* 4% */