summaryrefslogtreecommitdiff
path: root/base/gxblend.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-10-06 14:52:03 +0100
committerRobin Watts <robin.watts@artifex.com>2017-10-06 14:55:00 +0100
commit45a826638bfc6309a829b38ecf14ff9c21f438ca (patch)
treef8dfb333f4427daeb3c76a35c6ae78327e0e95f5 /base/gxblend.c
parent7b6bce45b1a85266a40844436ea386c4129515f4 (diff)
downloadghostpdl-45a826638bfc6309a829b38ecf14ff9c21f438ca.tar.gz
Tune pdf14_compose_group inlining.
Pick specific inlinings based upon examination of the data from the TRACK_COMPOSE_GROUPS defines.
Diffstat (limited to 'base/gxblend.c')
-rw-r--r--base/gxblend.c186
1 files changed, 145 insertions, 41 deletions
diff --git a/base/gxblend.c b/base/gxblend.c
index fe19c59f5..8adaf0752 100644
--- a/base/gxblend.c
+++ b/base/gxblend.c
@@ -1760,7 +1760,7 @@ compose_group_knockout(byte *tos_ptr, bool tos_isolated, int tos_planestride, in
}
static void
-compose_group_isolated_nonknockout(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,
+compose_group_nonknockout_blend(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,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
int nos_shape_offset, int nos_tag_offset,
@@ -1769,7 +1769,7 @@ compose_group_isolated_nonknockout(byte *tos_ptr, bool tos_isolated, int tos_pla
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,
const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
{
- template_compose_group(tos_ptr, /* tos_isolated = */1, tos_planestride, tos_rowstride, alpha, shape, blend_mode, tos_has_shape,
+ template_compose_group(tos_ptr, tos_isolated, tos_planestride, tos_rowstride, alpha, shape, blend_mode, tos_has_shape,
tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,
nos_ptr, nos_isolated, nos_planestride, nos_rowstride, nos_alpha_g_ptr, /* nos_knockout = */0,
nos_shape_offset, nos_tag_offset, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
@@ -1777,7 +1777,7 @@ compose_group_isolated_nonknockout(byte *tos_ptr, bool tos_isolated, int tos_pla
}
static void
-compose_group_nonisolated_nonknockout(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,
+compose_group_nonknockout_nonblend_add_isolated_mask_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,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
int nos_shape_offset, int nos_tag_offset,
@@ -1786,15 +1786,15 @@ compose_group_nonisolated_nonknockout(byte *tos_ptr, bool tos_isolated, int tos_
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,
const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
{
- template_compose_group(tos_ptr, /* tos_isolated = */0, tos_planestride, tos_rowstride, alpha, shape, blend_mode, tos_has_shape,
- tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,
- nos_ptr, nos_isolated, nos_planestride, nos_rowstride, nos_alpha_g_ptr, /* nos_knockout = */0,
- nos_shape_offset, nos_tag_offset, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
- backdrop_ptr, has_matte, n_chan, additive, num_spots, overprint, drawn_comps, x0, y0, x1, y1, pblend_procs, pdev);
+ template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/1, maskbuf, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
}
static void
-compose_group_nonisolated_nonknockout_normal_subtractive(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,
+compose_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,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
int nos_shape_offset, int nos_tag_offset,
@@ -1803,15 +1803,15 @@ compose_group_nonisolated_nonknockout_normal_subtractive(byte *tos_ptr, bool tos
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,
const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
{
- template_compose_group(tos_ptr, /* tos_isolated = */0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, tos_has_shape,
- tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,
- nos_ptr, nos_isolated, nos_planestride, nos_rowstride, nos_alpha_g_ptr, /* nos_knockout = */0,
- nos_shape_offset, nos_tag_offset, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
- backdrop_ptr, has_matte, n_chan, /* additive = */0, num_spots, overprint, drawn_comps, x0, y0, x1, y1, pblend_procs, pdev);
+ template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/0, /*maskbuf*/NULL, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
}
static void
-compose_group_nonisolated_nonknockout_normal_additive(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,
+compose_group_nonknockout_nonblend_add_nonisolated_mask_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,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
int nos_shape_offset, int nos_tag_offset,
@@ -1820,15 +1820,66 @@ compose_group_nonisolated_nonknockout_normal_additive(byte *tos_ptr, bool tos_is
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,
const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
{
- template_compose_group(tos_ptr, /* tos_isolated = */0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, tos_has_shape,
- tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,
- nos_ptr, nos_isolated, nos_planestride, nos_rowstride, nos_alpha_g_ptr, /* nos_knockout = */0,
- nos_shape_offset, nos_tag_offset, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
- backdrop_ptr, has_matte, n_chan, /* additive = */1, num_spots, overprint, drawn_comps, x0, y0, x1, y1, pblend_procs, pdev);
+ template_compose_group(tos_ptr, /*tos_isolated*/0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/1, maskbuf, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
+}
+
+static void
+compose_group_nonknockout_nonblend_add_nonisolated_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,
+ int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
+ byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
+ int nos_shape_offset, int nos_tag_offset,
+ byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
+ byte *backdrop_ptr,
+ 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,
+ const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
+{
+ template_compose_group(tos_ptr, /*tos_isolated*/0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/0, /*maskbuf*/NULL, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/1, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
+}
+
+static void
+compose_group_nonknockout_nonblend_sub_isolated_mask_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,
+ int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
+ byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
+ int nos_shape_offset, int nos_tag_offset,
+ byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
+ byte *backdrop_ptr,
+ 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,
+ const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
+{
+ template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/1, maskbuf, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/0, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
+}
+
+static void
+compose_group_nonknockout_nonblend_sub_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,
+ int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
+ byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
+ int nos_shape_offset, int nos_tag_offset,
+ byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
+ byte *backdrop_ptr,
+ 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,
+ const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
+{
+ template_compose_group(tos_ptr, /*tos_isolated*/1, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/0, /*maskbuf*/NULL, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/0, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
}
static void
-compose_group_nonisolated_nonknockout_normal_additive_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,
+compose_group_nonknockout_nonblend_sub_nonisolated_mask_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,
int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
int nos_shape_offset, int nos_tag_offset,
@@ -1837,11 +1888,45 @@ compose_group_nonisolated_nonknockout_normal_additive_common(byte *tos_ptr, bool
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,
const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
{
- template_compose_group(tos_ptr, /* tos_isolated */0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /* tos_has_shape */0,
- tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /* tos_has_tag */0,
- nos_ptr, /* nos_isolated */0, nos_planestride, nos_rowstride, /* nos_alpha_g_ptr */NULL, /* nos_knockout */0,
- /* nos_shape_offset */0, /* nos_tag_offset */0, /* mask_row_ptr */0, /* has_mask */0, /* maskbuf */NULL, mask_bg_alpha, mask_tr_fn,
- backdrop_ptr, /* has_matte */0, n_chan, /* additive */1, /* num_spots */0, /* overprint */0, drawn_comps, x0, y0, x1, y1, pblend_procs, pdev);
+ template_compose_group(tos_ptr, /*tos_isolated*/0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/1, maskbuf, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/0, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
+}
+
+static void
+compose_group_nonknockout_nonblend_sub_nonisolated_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,
+ int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
+ byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
+ int nos_shape_offset, int nos_tag_offset,
+ byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
+ byte *backdrop_ptr,
+ 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,
+ const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
+{
+ template_compose_group(tos_ptr, /*tos_isolated*/0, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, /*tos_has_shape*/0,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, /*tos_has_tag*/0,
+ nos_ptr, /*nos_isolated*/0, nos_planestride, nos_rowstride, /*nos_alpha_g_ptr*/0, /* nos_knockout = */0,
+ /*nos_shape_offset*/0, /*nos_tag_offset*/0, mask_row_ptr, /*has_mask*/0, /*maskbuf*/NULL, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, /*has_matte*/0, n_chan, /*additive*/0, /*num_spots*/0, /*overprint*/0, /*drawn_comps*/0, x0, y0, x1, y1, pblend_procs, pdev);
+}
+
+static void
+compose_group_nonknockout_noblend_general(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,
+ int tos_shape_offset, int tos_alpha_g_offset, int tos_tag_offset, bool tos_has_tag,
+ byte *nos_ptr, bool nos_isolated, int nos_planestride, int nos_rowstride, byte *nos_alpha_g_ptr, bool nos_knockout,
+ int nos_shape_offset, int nos_tag_offset,
+ byte *mask_row_ptr, int has_mask, pdf14_buf *maskbuf, byte mask_bg_alpha, byte *mask_tr_fn,
+ byte *backdrop_ptr,
+ 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,
+ const pdf14_nonseparable_blending_procs_t *pblend_procs, pdf14_device *pdev)
+{
+ template_compose_group(tos_ptr, tos_isolated, tos_planestride, tos_rowstride, alpha, shape, BLEND_MODE_Normal, tos_has_shape,
+ tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,
+ nos_ptr, nos_isolated, nos_planestride, nos_rowstride, nos_alpha_g_ptr, /* nos_knockout = */0,
+ nos_shape_offset, nos_tag_offset, mask_row_ptr, has_mask, maskbuf, mask_bg_alpha, mask_tr_fn,
+ backdrop_ptr, has_matte, n_chan, additive, num_spots, overprint, drawn_comps, x0, y0, x1, y1, pblend_procs, pdev);
}
void
@@ -1974,23 +2059,42 @@ pdf14_compose_group(pdf14_buf *tos, pdf14_buf *nos, pdf14_buf *maskbuf,
}
#endif
+ /* We have tested the files on the cluster to see what percentage of
+ * files/devices hit the different options. */
if (nos_knockout)
- fn = &compose_group_knockout;
- else if (tos_isolated)
- fn = &compose_group_isolated_nonknockout;
+ fn = &compose_group_knockout; /* Small %ages, nothing more than 1.1% */
else if (blend_mode != 0)
- fn = &compose_group_nonisolated_nonknockout;
- else if (!additive)
- fn = &compose_group_nonisolated_nonknockout_normal_subtractive;
- else
- {
- if (tos->has_shape == 0 && tos_has_tag == 0 && nos_isolated == 0 && nos_alpha_g_ptr == NULL &&
- nos_shape_offset == 0 && nos_tag_offset == 0 && maskbuf == NULL && has_matte == 0 && num_spots == 0 &&
- overprint == 0)
- fn = &compose_group_nonisolated_nonknockout_normal_additive_common;
- else
- fn = &compose_group_nonisolated_nonknockout_normal_additive;
- }
+ fn = &compose_group_nonknockout_blend; /* Small %ages, nothing more than 2% */
+ else if (tos->has_shape == 0 && tos_has_tag == 0 && nos_isolated == 0 && nos_alpha_g_ptr == NULL &&
+ nos_shape_offset == 0 && nos_tag_offset == 0 && backdrop_ptr == NULL && has_matte == 0 && num_spots == 0 &&
+ overprint == 0) {
+ if (additive) {
+ if (tos_isolated) {
+ if (has_mask) /* 7% */
+ fn = &compose_group_nonknockout_nonblend_add_isolated_mask_common;
+ else /* 14% */
+ fn = &compose_group_nonknockout_nonblend_add_isolated_nomask_common;
+ } else {
+ if (has_mask) /* 4% */
+ fn = &compose_group_nonknockout_nonblend_add_nonisolated_mask_common;
+ else /* 15% */
+ fn = &compose_group_nonknockout_nonblend_add_nonisolated_nomask_common;
+ }
+ } else {
+ if (tos_isolated) {
+ if (has_mask) /* 3% */
+ fn = &compose_group_nonknockout_nonblend_sub_isolated_mask_common;
+ else /* 11% */
+ fn = &compose_group_nonknockout_nonblend_sub_isolated_nomask_common;
+ } else {
+ if (has_mask) /* 2% */
+ fn = &compose_group_nonknockout_nonblend_sub_nonisolated_mask_common;
+ else /* 8% */
+ fn = &compose_group_nonknockout_nonblend_sub_nonisolated_nomask_common;
+ }
+ }
+ } else
+ fn = compose_group_nonknockout_noblend_general;
fn(tos_ptr, tos_isolated, tos_planestride, tos->rowstride, alpha, shape, blend_mode, tos->has_shape,
tos_shape_offset, tos_alpha_g_offset, tos_tag_offset, tos_has_tag,