diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2021-04-28 11:38:39 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2021-04-28 16:16:35 +0100 |
commit | 2934891fb4cc16b37c3a5fabf34aa3bf9976c9a6 (patch) | |
tree | a71c363a81d2a18fc9c1d33c6f0186fb05e65769 | |
parent | f119cf9be003a9e05942233407b8604ce2535ae9 (diff) | |
download | ghostpdl-2934891fb4cc16b37c3a5fabf34aa3bf9976c9a6.tar.gz |
Remove strip_copy_rop in favour of strip_copy_rop2.
56 files changed, 263 insertions, 630 deletions
diff --git a/base/gdevabuf.c b/base/gdevabuf.c index ea49df987..9fdaf15e4 100644 --- a/base/gdevabuf.c +++ b/base/gdevabuf.c @@ -180,7 +180,7 @@ mem_alpha_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_rectangle, mem_abuf_fill_rectangle); set_dev_proc(dev, copy_mono, mem_abuf_copy_mono); set_dev_proc(dev, copy_color, gx_default_copy_color); - set_dev_proc(dev, strip_copy_rop, gx_no_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, gx_no_strip_copy_rop2); set_dev_proc(dev, fill_rectangle_hl_color, mem_abuf_fill_rectangle_hl_color); } diff --git a/base/gdevbbox.c b/base/gdevbbox.c index 9e2693d9c..61d264bff 100644 --- a/base/gdevbbox.c +++ b/base/gdevbbox.c @@ -52,7 +52,6 @@ static dev_proc_fill_parallelogram(bbox_fill_parallelogram); static dev_proc_fill_triangle(bbox_fill_triangle); static dev_proc_draw_thin_line(bbox_draw_thin_line); static dev_proc_strip_tile_rectangle(bbox_strip_tile_rectangle); -static dev_proc_strip_copy_rop(bbox_strip_copy_rop); static dev_proc_strip_copy_rop2(bbox_strip_copy_rop2); static dev_proc_strip_tile_rect_devn(bbox_strip_tile_rect_devn); static dev_proc_begin_typed_image(bbox_begin_typed_image); @@ -84,7 +83,6 @@ bbox_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, bbox_fill_triangle); set_dev_proc(dev, draw_thin_line, bbox_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, bbox_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, bbox_strip_copy_rop); set_dev_proc(dev, begin_typed_image, bbox_begin_typed_image); set_dev_proc(dev, composite, bbox_composite); set_dev_proc(dev, text_begin, bbox_text_begin); @@ -475,29 +473,6 @@ bbox_strip_tile_rect_devn(gx_device * dev, const gx_strip_bitmap * tiles, } static int -bbox_strip_copy_rop(gx_device * dev, - const byte * sdata, int sourcex, uint sraster, - gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - gx_device_bbox *const bdev = (gx_device_bbox *) dev; - /* gx_forward_strip_copy_rop doesn't exist */ - gx_device *tdev = bdev->target; - int code = - (tdev == 0 ? 0 : - dev_proc(tdev, strip_copy_rop) - (tdev, sdata, sourcex, sraster, id, scolors, - textures, tcolors, x, y, w, h, phase_x, phase_y, lop)); - - BBOX_ADD_INT_RECT(bdev, x, y, x + w, y + h); - return code; -} - -static int bbox_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, @@ -509,7 +484,7 @@ bbox_strip_copy_rop2(gx_device * dev, uint planar_height) { gx_device_bbox *const bdev = (gx_device_bbox *) dev; - /* gx_forward_strip_copy_rop doesn't exist */ + /* gx_forward_strip_copy_rop2 doesn't exist */ gx_device *tdev = bdev->target; int code = (tdev == 0 ? 0 : diff --git a/base/gdevdbit.c b/base/gdevdbit.c index 369973287..c4612f7c3 100644 --- a/base/gdevdbit.c +++ b/base/gdevdbit.c @@ -748,12 +748,13 @@ gx_default_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, } int -gx_no_strip_copy_rop(gx_device * dev, +gx_no_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint planar_height) { return_error(gs_error_unknownerror); /* not implemented */ } diff --git a/base/gdevdflt.c b/base/gdevdflt.c index 68a133c46..7afc1c9cd 100644 --- a/base/gdevdflt.c +++ b/base/gdevdflt.c @@ -614,7 +614,6 @@ gx_device_fill_in_procs(register gx_device * dev) fill_dev_proc(dev, draw_thin_line, gx_default_draw_thin_line); fill_dev_proc(dev, get_alpha_bits, gx_default_get_alpha_bits); fill_dev_proc(dev, strip_tile_rectangle, gx_default_strip_tile_rectangle); - fill_dev_proc(dev, strip_copy_rop, gx_default_strip_copy_rop); fill_dev_proc(dev, strip_copy_rop2, gx_default_strip_copy_rop2); fill_dev_proc(dev, strip_tile_rect_devn, gx_default_strip_tile_rect_devn); fill_dev_proc(dev, get_clipping_box, gx_default_get_clipping_box); @@ -1245,7 +1244,6 @@ int gx_copy_device_procs(gx_device *dest, const gx_device *src, const gx_device set_dev_proc(dest, fill_triangle, dev_proc(&prototype, fill_triangle)); set_dev_proc(dest, draw_thin_line, dev_proc(&prototype, draw_thin_line)); set_dev_proc(dest, strip_tile_rectangle, dev_proc(&prototype, strip_tile_rectangle)); - set_dev_proc(dest, strip_copy_rop, dev_proc(&prototype, strip_copy_rop)); set_dev_proc(dest, get_clipping_box, dev_proc(&prototype, get_clipping_box)); set_dev_proc(dest, begin_typed_image, dev_proc(&prototype, begin_typed_image)); set_dev_proc(dest, get_bits_rectangle, dev_proc(&prototype, get_bits_rectangle)); diff --git a/base/gdevdrop.c b/base/gdevdrop.c index 3e0b822c2..cc139ddf7 100644 --- a/base/gdevdrop.c +++ b/base/gdevdrop.c @@ -89,28 +89,6 @@ trace_copy_rop(const char *cname, gx_device * dev, /* ---------------- Default copy_rop implementations ---------------- */ -/* - * The default implementation for non-memory devices uses get_bits_rectangle - * to read out the pixels, the memory device implementation to do the - * operation, and copy_color to write the pixels back. - */ -int -gx_default_strip_copy_rop(gx_device * dev, - const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop) -{ - return gx_default_strip_copy_rop2(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop, 0); -} - int gx_default_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, @@ -139,7 +117,7 @@ gx_default_strip_copy_rop2(gx_device * dev, #ifdef DEBUG if (gs_debug_c('b')) - trace_copy_rop("gx_default_strip_copy_rop", + trace_copy_rop("gx_default_strip_copy_rop2", dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); @@ -222,23 +200,13 @@ gx_default_strip_copy_rop2(gx_device * dev, if (code < 0) return code; } - if (planar_height == 0) { - code = (*dev_proc(pmdev, strip_copy_rop)) - ((gx_device *)pmdev, - sdata + (py - y) * sraster, sourcex, sraster, - gx_no_bitmap_id, scolors, textures, tcolors, - 0, 0, width, block_height, - phase_x + x, phase_y + py, - lop); - } else { - code = (*dev_proc(pmdev, strip_copy_rop2)) + code = (*dev_proc(pmdev, strip_copy_rop2)) ((gx_device *)pmdev, sdata + (py - y) * sraster, sourcex, sraster, gx_no_bitmap_id, scolors, textures, tcolors, 0, 0, width, block_height, phase_x + x, phase_y + py, lop, planar_height); - } if (code < 0) break; if (is_planar) { @@ -598,24 +566,8 @@ pack_planar_from_standard(gx_device_memory * dev, int y, int destx, * operation, pack_from_standard to convert them back to the device * representation, and copy_color to write the pixels back. */ -int -mem_default_strip_copy_rop2(gx_device * dev, - const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop, - uint planar_height) -{ - dmlprintf(dev->memory, "mem_default_strip_copy_rop2 should never be called!\n"); - return_error(gs_error_Fatal); -} - -int -mem_default_strip_copy_rop(gx_device * dev, +static int +do_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, @@ -836,10 +788,10 @@ mem_default_strip_copy_rop(gx_device * dev, source_data = source_row; source_raster = source_row_raster; } - code = (*dev_proc(&mdev, strip_copy_rop)) + code = (*dev_proc(&mdev, strip_copy_rop2)) ((gx_device *)&mdev, source_data, sx, source_raster, gx_no_bitmap_id, real_scolors, real_texture, real_tcolors, - 0, 0, width, loop_height, phase_x + x, phase_y + py, lop); + 0, 0, width, loop_height, phase_x + x, phase_y + py, lop, 0); if (code < 0) break; /* Convert the result back to the device's format. */ @@ -863,17 +815,40 @@ out: return code; } +int +mem_default_strip_copy_rop2(gx_device * dev, + const byte * sdata, int sourcex, + uint sraster, gx_bitmap_id id, + const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int width, int height, + int phase_x, int phase_y, + gs_logical_operation_t lop, + uint planar_height) +{ + if (planar_height != 0) + { + dmlprintf(dev->memory, "mem_default_strip_copy_rop2 should never be called!\n"); + return_error(gs_error_Fatal); + } + return do_strip_copy_rop(dev, sdata, sourcex, sraster, id, scolors, + textures, tcolors, x, y, width, height, + phase_x, phase_y, lop); +} + /* ------ Implementation of related functions ------ */ int -gx_strip_copy_rop_unaligned(gx_device * dev, +gx_strip_copy_rop2_unaligned(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { - dev_proc_strip_copy_rop((*copy_rop)) = dev_proc(dev, strip_copy_rop); + dev_proc_strip_copy_rop2((*copy_rop2)) = dev_proc(dev, strip_copy_rop2); int depth = (scolors == 0 ? dev->color_info.depth : 1); int step = sraster & (align_bitmap_mod - 1); @@ -893,9 +868,9 @@ gx_strip_copy_rop_unaligned(gx_device * dev, if (!step || sdata == 0 || (scolors != 0 && scolors[0] == scolors[1]) ) { /* No adjustment needed. */ - return (*copy_rop) (dev, sdata, sourcex, sraster, id, scolors, + return (*copy_rop2)(dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, - phase_x, phase_y, lop); + phase_x, phase_y, lop, plane_height); } /* Do the transfer one scan line at a time. */ { @@ -908,9 +883,9 @@ gx_strip_copy_rop_unaligned(gx_device * dev, for (i = 0; i < height && code >= 0; ++i, p += sraster - step, d += dstep ) - code = (*copy_rop) (dev, p, d, sraster, gx_no_bitmap_id, scolors, + code = (*copy_rop2)(dev, p, d, sraster, gx_no_bitmap_id, scolors, textures, tcolors, x, y + i, width, 1, - phase_x, phase_y, lop); + phase_x, phase_y, lop, plane_height); return code; } } diff --git a/base/gdevepo.c b/base/gdevepo.c index 0cbdb7823..914fa32d9 100644 --- a/base/gdevepo.c +++ b/base/gdevepo.c @@ -71,7 +71,6 @@ static dev_proc_copy_color(epo_copy_color); static dev_proc_get_bits(epo_get_bits); static dev_proc_copy_alpha(epo_copy_alpha); static dev_proc_strip_tile_rectangle(epo_strip_tile_rectangle); -static dev_proc_strip_copy_rop(epo_strip_copy_rop); static dev_proc_strip_copy_rop2(epo_strip_copy_rop2); static dev_proc_copy_planes(epo_copy_planes); static dev_proc_copy_alpha_hl_color(epo_copy_alpha_hl_color); @@ -456,7 +455,6 @@ void epo_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, epo_fill_triangle); set_dev_proc(dev, draw_thin_line, epo_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, epo_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, epo_strip_copy_rop); set_dev_proc(dev, begin_typed_image, epo_begin_typed_image); set_dev_proc(dev, composite, epo_composite); set_dev_proc(dev, text_begin, epo_text_begin); @@ -549,19 +547,6 @@ int epo_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x return dev_proc(dev, strip_tile_rectangle)(dev, tiles, x, y, width, height, color0, color1, phase_x, phase_y); } -int epo_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, - const gx_color_index *scolors, - const gx_strip_bitmap *textures, const gx_color_index *tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - int code = epo_handle_erase_page(dev); - - if (code != 0) - return code; - return dev_proc(dev, strip_copy_rop)(dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); -} - int epo_strip_copy_rop2(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int width, int height, int phase_x, int phase_y, gs_logical_operation_t lop, uint planar_height) diff --git a/base/gdevflp.c b/base/gdevflp.c index be4ba801e..756e31ccc 100644 --- a/base/gdevflp.c +++ b/base/gdevflp.c @@ -75,7 +75,6 @@ static dev_proc_fill_parallelogram(flp_fill_parallelogram); static dev_proc_fill_triangle(flp_fill_triangle); static dev_proc_draw_thin_line(flp_draw_thin_line); static dev_proc_strip_tile_rectangle(flp_strip_tile_rectangle); -static dev_proc_strip_copy_rop(flp_strip_copy_rop); static dev_proc_begin_typed_image(flp_begin_typed_image); static dev_proc_get_bits_rectangle(flp_get_bits_rectangle); static dev_proc_composite(flp_composite); @@ -669,22 +668,6 @@ int flp_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles, int x return 0; } -int flp_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, - const gx_color_index *scolors, - const gx_strip_bitmap *textures, const gx_color_index *tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - int code = SkipPage(dev); - - if (code < 0) - return code; - if (!code) - return default_subclass_strip_copy_rop(dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); - - return 0; -} - typedef struct flp_image_enum_s { gx_image_enum_common; int y; @@ -1194,7 +1177,6 @@ flp_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, flp_fill_triangle); set_dev_proc(dev, draw_thin_line, flp_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, flp_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, flp_strip_copy_rop); set_dev_proc(dev, begin_typed_image, flp_begin_typed_image); set_dev_proc(dev, get_bits_rectangle, flp_get_bits_rectangle); set_dev_proc(dev, composite, flp_composite); diff --git a/base/gdevhit.c b/base/gdevhit.c index f95597536..0d4df4a44 100644 --- a/base/gdevhit.c +++ b/base/gdevhit.c @@ -47,7 +47,7 @@ hit_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, gx_default_fill_triangle); set_dev_proc(dev, draw_thin_line, gx_default_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, gx_default_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, gx_default_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, gx_default_strip_copy_rop2); set_dev_proc(dev, get_clipping_box, gx_get_largest_clipping_box); set_dev_proc(dev, begin_typed_image, gx_default_begin_typed_image); set_dev_proc(dev, map_color_rgb_alpha, gx_default_map_color_rgb_alpha); diff --git a/base/gdevm1.c b/base/gdevm1.c index 0974fca0b..f73814460 100644 --- a/base/gdevm1.c +++ b/base/gdevm1.c @@ -48,14 +48,15 @@ * functions below. In this function, rop works in terms of device pixel * values, not RGB-space values. */ int -mem_mono_strip_copy_rop_dev(gx_device * dev, const byte * sdata, - int sourcex,uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop) +mem_mono_strip_copy_rop2_dev(gx_device * dev, const byte * sdata, + int sourcex,uint sraster, gx_bitmap_id id, + const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int width, int height, + int phase_x, int phase_y, + gs_logical_operation_t lop, + uint planar_height) { gx_device_memory *mdev = (gx_device_memory *) dev; gs_rop3_t rop = (gs_rop3_t)lop; @@ -67,6 +68,11 @@ mem_mono_strip_copy_rop_dev(gx_device * dev, const byte * sdata, int ty; rop_run_op ropper; + if (planar_height != 0) { + dmlprintf(dev->memory, "mem_default_strip_copy_rop2 should never be called!\n"); + return_error(gs_error_Fatal); + } + /* Modify the raster operation according to the source palette. */ if (scolors != 0) { /* Source with palette. */ switch ((int)((scolors[1] << 1) + scolors[0])) { @@ -442,8 +448,7 @@ const gdev_mem_functions gdev_mem_fns_1 = gx_default_copy_color, gx_default_copy_alpha, mem_mono_strip_tile_rectangle, - mem_mono_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_mono_strip_copy_rop2, mem_get_bits_rectangle }; @@ -624,14 +629,15 @@ mem_mono_copy_mono(gx_device * dev, fit_copy(dev, source_data, source_x, source_raster, id, x, y, w, h); #ifdef DO_COPY_MONO_BY_COPY_ROP if (w >= 32) { - return mem_mono_strip_copy_rop_dev(dev, source_data, source_x, - source_raster, - id, NULL, NULL, NULL, - x, y, w, h, 0, 0, - ((color0 == gx_no_color_index ? rop3_D : - color0 == 0 ? rop3_0 : rop3_1) & ~rop3_S) | - ((color1 == gx_no_color_index ? rop3_D : - color1 == 0 ? rop3_0 : rop3_1) & rop3_S)); + return mem_mono_strip_copy_rop2_dev(dev, source_data, source_x, + source_raster, + id, NULL, NULL, NULL, + x, y, w, h, 0, 0, + ((color0 == gx_no_color_index ? rop3_D : + color0 == 0 ? rop3_0 : rop3_1) & ~rop3_S) | + ((color1 == gx_no_color_index ? rop3_D : + color1 == 0 ? rop3_0 : rop3_1) & rop3_S), + 0); } #endif /* !DO_COPY_MONO_BY_COPY_ROP */ #if gx_no_color_index_value != -1 /* hokey! */ @@ -874,9 +880,9 @@ int tx, int y, int tw, int th, gx_color_index color0, gx_color_index color1, if (rop == 0xAA) return gx_default_strip_tile_rectangle(dev, tiles, tx, y, tw, th, color0, color1, px, py); - return mem_mono_strip_copy_rop_dev(dev, NULL, 0, 0, tiles->id, NULL, - tiles, NULL, - tx, y, tw, th, px, py, rop); + return mem_mono_strip_copy_rop2_dev(dev, NULL, 0, 0, tiles->id, NULL, + tiles, NULL, + tx, y, tw, th, px, py, rop, 0); #else /* !USE_COPY_ROP */ gx_device_memory * const mdev = (gx_device_memory *)dev; register uint invert; @@ -1109,8 +1115,7 @@ const gdev_mem_functions gdev_mem_fns_1w = gx_default_copy_color, gx_default_copy_alpha, mem1_word_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm16.c b/base/gdevm16.c index d8e767c57..0f54f2b8d 100644 --- a/base/gdevm16.c +++ b/base/gdevm16.c @@ -43,8 +43,7 @@ const gdev_mem_functions gdev_mem_fns_16 = mem_true16_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; diff --git a/base/gdevm2.c b/base/gdevm2.c index f0ee16a4d..107e0700c 100644 --- a/base/gdevm2.c +++ b/base/gdevm2.c @@ -42,8 +42,7 @@ const gdev_mem_functions gdev_mem_fns_2 = mem_mapped2_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_gray_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_gray_strip_copy_rop2, mem_get_bits_rectangle }; @@ -199,8 +198,7 @@ const gdev_mem_functions gdev_mem_fns_2w = mem2_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm24.c b/base/gdevm24.c index 6834c18b9..913f00284 100644 --- a/base/gdevm24.c +++ b/base/gdevm24.c @@ -20,7 +20,7 @@ #include "gxdevmem.h" /* semi-public definitions */ #include "gdevmem.h" /* private definitions */ -#define mem_true24_strip_copy_rop mem_gray8_rgb24_strip_copy_rop +#define mem_true24_strip_copy_rop2 mem_gray8_rgb24_strip_copy_rop2 /* * Define whether to use the library's memset. @@ -69,8 +69,7 @@ const gdev_mem_functions gdev_mem_fns_24 = mem_true24_copy_color, mem_true24_copy_alpha, gx_default_strip_tile_rectangle, - mem_true24_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_true24_strip_copy_rop2, mem_get_bits_rectangle }; @@ -571,8 +570,7 @@ const gdev_mem_functions gdev_mem_fns_24w = mem24_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm32.c b/base/gdevm32.c index acb46cd88..7fb0746ab 100644 --- a/base/gdevm32.c +++ b/base/gdevm32.c @@ -41,8 +41,7 @@ const gdev_mem_functions gdev_mem_fns_32 = mem_true32_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; @@ -269,8 +268,7 @@ const gdev_mem_functions gdev_mem_fns_32w = mem32_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm4.c b/base/gdevm4.c index 6d9dfac80..d4832eec3 100644 --- a/base/gdevm4.c +++ b/base/gdevm4.c @@ -42,8 +42,7 @@ const gdev_mem_functions gdev_mem_fns_4 = mem_mapped4_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_gray_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_gray_strip_copy_rop2, mem_get_bits_rectangle }; @@ -258,8 +257,7 @@ const gdev_mem_functions gdev_mem_fns_4w = mem4_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm40.c b/base/gdevm40.c index 5aab20e5f..31425f1a6 100644 --- a/base/gdevm40.c +++ b/base/gdevm40.c @@ -57,8 +57,7 @@ const gdev_mem_functions gdev_mem_fns_40 = mem_true40_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; @@ -436,8 +435,7 @@ const gdev_mem_functions gdev_mem_fns_40w = mem40_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm48.c b/base/gdevm48.c index 3aecea654..0a3d8a29c 100644 --- a/base/gdevm48.c +++ b/base/gdevm48.c @@ -57,8 +57,7 @@ const gdev_mem_functions gdev_mem_fns_48 = mem_true48_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; @@ -405,8 +404,7 @@ const gdev_mem_functions gdev_mem_fns_48w = mem48_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm56.c b/base/gdevm56.c index d0f967d12..70cfd942e 100644 --- a/base/gdevm56.c +++ b/base/gdevm56.c @@ -57,8 +57,7 @@ const gdev_mem_functions gdev_mem_fns_56 = mem_true56_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; @@ -460,8 +459,7 @@ const gdev_mem_functions gdev_mem_fns_56w = mem56_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm64.c b/base/gdevm64.c index 46da84ab5..a66c3c165 100644 --- a/base/gdevm64.c +++ b/base/gdevm64.c @@ -57,8 +57,7 @@ const gdev_mem_functions gdev_mem_fns_64 = mem_true64_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_default_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_default_strip_copy_rop2, mem_get_bits_rectangle }; @@ -363,8 +362,7 @@ const gdev_mem_functions gdev_mem_fns_64w = mem64_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevm8.c b/base/gdevm8.c index 82cc4e8fb..6717c5856 100644 --- a/base/gdevm8.c +++ b/base/gdevm8.c @@ -20,7 +20,7 @@ #include "gxdevmem.h" /* semi-public definitions */ #include "gdevmem.h" /* private definitions */ -#define mem_gray8_strip_copy_rop mem_gray8_rgb24_strip_copy_rop +#define mem_gray8_strip_copy_rop2 mem_gray8_rgb24_strip_copy_rop2 /* ================ Standard (byte-oriented) device ================ */ @@ -43,8 +43,7 @@ const gdev_mem_functions gdev_mem_fns_8 = mem_mapped8_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - mem_gray8_strip_copy_rop, - gx_default_strip_copy_rop2, + mem_gray8_strip_copy_rop2, mem_get_bits_rectangle }; @@ -352,8 +351,7 @@ const gdev_mem_functions gdev_mem_fns_8w = mem8_word_copy_color, gx_default_copy_alpha, gx_default_strip_tile_rectangle, - gx_no_strip_copy_rop, - gx_default_strip_copy_rop2, + gx_no_strip_copy_rop2, mem_word_get_bits_rectangle }; diff --git a/base/gdevmem.c b/base/gdevmem.c index a8c31ba70..05ec296ed 100644 --- a/base/gdevmem.c +++ b/base/gdevmem.c @@ -933,7 +933,6 @@ void mem_dev_initialize_device_procs(gx_device *dev) set_dev_proc(dev, copy_mono, fns->copy_mono); set_dev_proc(dev, copy_color, fns->copy_color); set_dev_proc(dev, copy_alpha, fns->copy_alpha); - set_dev_proc(dev, strip_copy_rop, fns->strip_copy_rop); set_dev_proc(dev, strip_copy_rop2, fns->strip_copy_rop2); set_dev_proc(dev, strip_tile_rectangle, fns->strip_tile_rectangle); } @@ -951,7 +950,6 @@ void mem_word_dev_initialize_device_procs(gx_device *dev) set_dev_proc(dev, copy_mono, fns->copy_mono); set_dev_proc(dev, copy_color, fns->copy_color); set_dev_proc(dev, copy_alpha, fns->copy_alpha); - set_dev_proc(dev, strip_copy_rop, fns->strip_copy_rop); set_dev_proc(dev, strip_copy_rop2, fns->strip_copy_rop2); set_dev_proc(dev, strip_tile_rectangle, fns->strip_tile_rectangle); } diff --git a/base/gdevmem.h b/base/gdevmem.h index 8fed11b71..ef2b7c606 100644 --- a/base/gdevmem.h +++ b/base/gdevmem.h @@ -101,7 +101,6 @@ dev_proc_get_bits_rectangle(mem_word_get_bits_rectangle); dev_proc_map_rgb_color(mem_mapped_map_rgb_color); dev_proc_map_color_rgb(mem_mapped_map_color_rgb); /* Default implementations */ -dev_proc_strip_copy_rop(mem_default_strip_copy_rop); dev_proc_strip_copy_rop2(mem_default_strip_copy_rop2); dev_proc_transform_pixel_region(mem_transform_pixel_region); @@ -170,10 +169,10 @@ extern const gx_device_memory mem_planar_device; * We declare the RasterOp implementation procedures here because they are * referenced in several implementation modules. */ -dev_proc_strip_copy_rop(mem_mono_strip_copy_rop); -dev_proc_strip_copy_rop(mem_mono_strip_copy_rop_dev); -dev_proc_strip_copy_rop(mem_gray_strip_copy_rop); -dev_proc_strip_copy_rop(mem_gray8_rgb24_strip_copy_rop); +dev_proc_strip_copy_rop2(mem_mono_strip_copy_rop2); +dev_proc_strip_copy_rop2(mem_mono_strip_copy_rop2_dev); +dev_proc_strip_copy_rop2(mem_gray_strip_copy_rop2); +dev_proc_strip_copy_rop2(mem_gray8_rgb24_strip_copy_rop2); dev_proc_copy_mono(mem_mono_copy_mono); dev_proc_fill_rectangle(mem_mono_fill_rectangle); diff --git a/base/gdevmpla.c b/base/gdevmpla.c index 81c5bfffd..36772748c 100644 --- a/base/gdevmpla.c +++ b/base/gdevmpla.c @@ -37,7 +37,6 @@ static dev_proc_copy_planes(mem_planar_copy_planes); /* Not static due to an optimized case in tile_clip_fill_rectangle_hl_color*/ static dev_proc_strip_tile_rectangle(mem_planar_strip_tile_rectangle); static dev_proc_strip_tile_rect_devn(mem_planar_strip_tile_rect_devn); -static dev_proc_strip_copy_rop(mem_planar_strip_copy_rop); static dev_proc_strip_copy_rop2(mem_planar_strip_copy_rop2); static dev_proc_get_bits_rectangle(mem_planar_get_bits_rectangle); static dev_proc_fill_rectangle_hl_color(mem_planar_fill_rectangle_hl_color); @@ -142,7 +141,6 @@ gdev_mem_set_planar_interleaved(gx_device_memory * mdev, int num_planes, set_dev_proc(mdev, copy_color, fns->copy_color); set_dev_proc(mdev, copy_alpha, fns->copy_alpha); set_dev_proc(mdev, strip_tile_rectangle, fns->strip_tile_rectangle); - set_dev_proc(mdev, strip_copy_rop, fns->strip_copy_rop); set_dev_proc(mdev, strip_copy_rop2, fns->strip_copy_rop2); set_dev_proc(mdev, get_bits_rectangle, fns->get_bits_rectangle); } else { @@ -176,7 +174,6 @@ gdev_mem_set_planar_interleaved(gx_device_memory * mdev, int num_planes, set_dev_proc(mdev, copy_alpha, gx_default_copy_alpha); set_dev_proc(mdev, strip_tile_rectangle, mem_planar_strip_tile_rectangle); set_dev_proc(mdev, strip_tile_rect_devn, mem_planar_strip_tile_rect_devn); - set_dev_proc(mdev, strip_copy_rop, mem_planar_strip_copy_rop); set_dev_proc(mdev, strip_copy_rop2, mem_planar_strip_copy_rop2); set_dev_proc(mdev, get_bits_rectangle, mem_planar_get_bits_rectangle); } @@ -1097,14 +1094,15 @@ mem_planar_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, } static int -planar_cmyk4bit_strip_copy_rop(gx_device_memory * mdev, - const byte * srow, int sourcex, uint sraster, - gx_bitmap_id id, const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop) +planar_cmyk4bit_strip_copy_rop2(gx_device_memory * mdev, + const byte * srow, int sourcex, uint sraster, + gx_bitmap_id id, const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int width, int height, + int phase_x, int phase_y, + gs_logical_operation_t lop, + uint planar_height) { gs_rop3_t rop = (gs_rop3_t)lop; uint draster = mdev->raster; @@ -1117,6 +1115,8 @@ planar_cmyk4bit_strip_copy_rop(gx_device_memory * mdev, int ctcolor = 0, mtcolor = 0, ytcolor = 0, ktcolor = 0; int constant_s = 0; + /* assert(planar_height == 0) */ + /* Modify the raster operation according to the source palette. */ fit_copy(mdev, srow, sourcex, sraster, id, x, y, width, height); @@ -1709,32 +1709,35 @@ planar_cmyk4bit_strip_copy_rop(gx_device_memory * mdev, } static int -plane_strip_copy_rop(gx_device_memory * mdev, - const byte * sdata, int sourcex, uint sraster, - gx_bitmap_id id, const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop, int plane) +plane_strip_copy_rop2(gx_device_memory * mdev, + const byte * sdata, int sourcex, uint sraster, + gx_bitmap_id id, const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int width, int height, + int phase_x, int phase_y, + gs_logical_operation_t lop, int plane, + uint planar_height) { mem_save_params_t save; int code; const gdev_mem_functions *fns; + /* assert(planar_height == 0); */ + MEM_SAVE_PARAMS(mdev, save); mdev->line_ptrs += mdev->height * plane; fns = gdev_mem_functions_for_bits(mdev->planes[plane].depth); - /* strip_copy_rop might end up calling get_bits_rectangle or fill_rectangle, + /* strip_copy_rop2 might end up calling get_bits_rectangle or fill_rectangle, * so ensure we have the right ones in there. */ set_dev_proc(mdev, get_bits_rectangle, fns->get_bits_rectangle); set_dev_proc(mdev, fill_rectangle, fns->fill_rectangle); /* mdev->color_info.depth is restored by MEM_RESTORE_PARAMS below. */ mdev->color_info.depth = mdev->planes[plane].depth; - code = fns->strip_copy_rop((gx_device *)mdev, sdata, sourcex, sraster, - id, scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop); + code = fns->strip_copy_rop2((gx_device *)mdev, sdata, sourcex, sraster, + id, scolors, textures, tcolors, + x, y, width, height, + phase_x, phase_y, lop, planar_height); set_dev_proc(mdev, get_bits_rectangle, mem_planar_get_bits_rectangle); set_dev_proc(mdev, fill_rectangle, mem_planar_fill_rectangle); /* The following effectively does: mdev->line_ptrs -= mdev->height * plane; */ @@ -1868,22 +1871,6 @@ static byte cmykrop[256] = }; static int -mem_planar_strip_copy_rop(gx_device * dev, - const byte * sdata, int sourcex, uint sraster, - gx_bitmap_id id, const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop) -{ - return mem_planar_strip_copy_rop2(dev, sdata, sourcex, sraster, - id, scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop, 0); -} - -static int mem_planar_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, @@ -2030,11 +2017,11 @@ mem_planar_strip_copy_rop2(gx_device * dev, scolors2[0] = (scolors[0] >> shift) & mask; scolors2[1] = (scolors[1] >> shift) & mask; } - code = plane_strip_copy_rop(mdev, sdata, sourcex, sraster, - id, (scolors ? scolors2 : NULL), - textures, (tcolors ? tcolors2 : NULL), - x, y, width, height, - phase_x, phase_y, lop, plane); + code = plane_strip_copy_rop2(mdev, sdata, sourcex, sraster, + id, (scolors ? scolors2 : NULL), + textures, (tcolors ? tcolors2 : NULL), + x, y, width, height, + phase_x, phase_y, lop, plane, 0); if (code < 0) return code; } @@ -2043,30 +2030,30 @@ mem_planar_strip_copy_rop2(gx_device * dev, if ((mdev->color_info.num_components == 4) && (mdev->plane_depth == 1)) { lop = cmykrop[lop & 0xff] | (lop & ~0xff); - return planar_cmyk4bit_strip_copy_rop(mdev, sdata, sourcex, - sraster, id, scolors, - textures, tcolors, - x, y, width, height, - phase_x, phase_y, - lop); + return planar_cmyk4bit_strip_copy_rop2(mdev, sdata, sourcex, + sraster, id, scolors, + textures, tcolors, + x, y, width, height, + phase_x, phase_y, + lop, 0); } } if (!tcolors && !scolors && (mdev->color_info.num_components == 4) && (mdev->plane_depth == 1)) { lop = cmykrop[lop & 0xff] | (lop & ~0xff); - return planar_cmyk4bit_strip_copy_rop(mdev, sdata, sourcex, - sraster, id, scolors, - textures, tcolors, - x, y, width, height, - phase_x, phase_y, - lop); + return planar_cmyk4bit_strip_copy_rop2(mdev, sdata, sourcex, + sraster, id, scolors, + textures, tcolors, + x, y, width, height, + phase_x, phase_y, + lop, 0); } /* Fall back to the default implementation (the only one that * guarantees to properly cope with D being planar). */ - return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, - id, scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop); + return mem_default_strip_copy_rop2(dev, sdata, sourcex, sraster, + id, scolors, textures, tcolors, + x, y, width, height, + phase_x, phase_y, lop, 0); } /* Copy bits back from a planar memory device. */ diff --git a/base/gdevmr1.c b/base/gdevmr1.c index ed2faab93..7a69814f8 100644 --- a/base/gdevmr1.c +++ b/base/gdevmr1.c @@ -35,19 +35,22 @@ * does everything in device space. */ int -mem_mono_strip_copy_rop(gx_device * dev, const byte * sdata, - int sourcex,uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, - gs_logical_operation_t lop) +mem_mono_strip_copy_rop2(gx_device * dev, const byte * sdata, + int sourcex,uint sraster, gx_bitmap_id id, + const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int width, int height, + int phase_x, int phase_y, + gs_logical_operation_t lop, + uint planar_height) { gx_device_memory *mdev = (gx_device_memory *) dev; gs_rop3_t rop = lop_sanitize(lop); /* handle transparency */ bool invert; + /* assert(planar_height == 0); */ + /* If map_rgb_color isn't the default one for monobit memory */ /* devices, palette might not be set; set it now if needed. */ if (mdev->palette.data == 0) { @@ -80,8 +83,8 @@ mem_mono_strip_copy_rop(gx_device * dev, const byte * sdata, if (invert) rop = byte_reverse_bits[rop & 0xff] ^ 0xff; - return mem_mono_strip_copy_rop_dev(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, x, y, - width, height, phase_x, phase_y, - (gs_logical_operation_t)rop); + return mem_mono_strip_copy_rop2_dev(dev, sdata, sourcex, sraster, id, + scolors, textures, tcolors, x, y, + width, height, phase_x, phase_y, + (gs_logical_operation_t)rop, 0); } diff --git a/base/gdevmr2n.c b/base/gdevmr2n.c index a19b9f69d..2bad76954 100644 --- a/base/gdevmr2n.c +++ b/base/gdevmr2n.c @@ -65,12 +65,13 @@ mem_gray_rop_strip_tile_rectangle(gx_device * dev, } int -mem_gray_strip_copy_rop(gx_device * dev, +mem_gray_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint planar_height) { gx_color_index scolors2[2]; const gx_color_index *real_scolors = scolors; @@ -84,6 +85,8 @@ mem_gray_strip_copy_rop(gx_device * dev, gx_color_index max_pixel = ((gx_color_index)1 << depth) - 1; int code; + /* assert(planar_height == 0); */ + #ifdef DEBUG if (gs_debug_c('b')) trace_copy_rop("mem_gray_strip_copy_rop", @@ -99,10 +102,10 @@ mem_gray_strip_copy_rop(gx_device * dev, (tcolors && (tcolors[0] != tcolors[1])) ) { /* We can't fake it: do it the slow, painful way. */ - return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop); + return mem_default_strip_copy_rop2(dev, sdata, sourcex, sraster, id, + scolors, textures, tcolors, + x, y, width, height, + phase_x, phase_y, lop, 0); } if (scolors) { /* Must be a solid color: see above. */ scolors2[0] = scolors2[1] = scolors[0] & 1; @@ -154,14 +157,15 @@ mem_gray_strip_copy_rop(gx_device * dev, set_dev_proc(dev, strip_tile_rectangle, mem_gray_rop_strip_tile_rectangle); dev->width <<= log2_depth; - code = mem_mono_strip_copy_rop(dev, sdata, - (real_scolors == NULL ? - sourcex << log2_depth : sourcex), - sraster, id, real_scolors, - real_texture, real_tcolors, - x << log2_depth, y, - width << log2_depth, height, - phase_x << log2_depth, phase_y, lop); + code = mem_mono_strip_copy_rop2(dev, sdata, + (real_scolors == NULL ? + sourcex << log2_depth : sourcex), + sraster, id, real_scolors, + real_texture, real_tcolors, + x << log2_depth, y, + width << log2_depth, height, + phase_x << log2_depth, phase_y, + lop, 0); set_dev_proc(dev, fill_rectangle, fill_rectangle); set_dev_proc(dev, copy_mono, copy_mono); set_dev_proc(dev, strip_tile_rectangle, strip_tile_rectangle); @@ -169,9 +173,9 @@ mem_gray_strip_copy_rop(gx_device * dev, } /* If we punted, use the general procedure. */ if (code < 0) - return mem_default_strip_copy_rop(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop); + return mem_default_strip_copy_rop2(dev, sdata, sourcex, sraster, id, + scolors, textures, tcolors, + x, y, width, height, + phase_x, phase_y, lop, 0); return code; } diff --git a/base/gdevmr8n.c b/base/gdevmr8n.c index e90bb1513..1ce617711 100644 --- a/base/gdevmr8n.c +++ b/base/gdevmr8n.c @@ -47,12 +47,13 @@ /* ---------------- RasterOp with 8-bit gray / 24-bit RGB ---------------- */ int -mem_gray8_rgb24_strip_copy_rop(gx_device * dev, +mem_gray8_rgb24_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t dirty_lop) + int phase_x, int phase_y, + gs_logical_operation_t dirty_lop, uint planar_height) { gx_device_memory *mdev = (gx_device_memory *) dev; gs_logical_operation_t lop = lop_sanitize(dirty_lop); @@ -77,6 +78,8 @@ mem_gray8_rgb24_strip_copy_rop(gx_device * dev, #endif #endif + /* assert(planar_height == 0); */ + /* Check for constant source. */ if (!rop3_uses_S(lop)) { const_source = 0; /* arbitrary */ @@ -136,11 +139,11 @@ bw: if (bw_pixel == 0x00) case rop3_T: break; default: -df: return mem_default_strip_copy_rop(dev, - sdata, sourcex, sraster, id, - scolors, textures, tcolors, - x, y, width, height, - phase_x, phase_y, lop); +df: return mem_default_strip_copy_rop2(dev, + sdata, sourcex, sraster, id, + scolors, textures, tcolors, + x, y, width, height, + phase_x, phase_y, lop, 0); } /* Put the updated rop back into the lop */ lop = rop; diff --git a/base/gdevmrun.c b/base/gdevmrun.c index fa16ffbc8..f077f8a96 100644 --- a/base/gdevmrun.c +++ b/base/gdevmrun.c @@ -165,7 +165,7 @@ static dev_proc_copy_color(run_copy_color); static dev_proc_fill_rectangle(run_fill_rectangle); static dev_proc_copy_alpha(run_copy_alpha); static dev_proc_strip_tile_rectangle(run_strip_tile_rectangle); -static dev_proc_strip_copy_rop(run_strip_copy_rop); +static dev_proc_strip_copy_rop2(run_strip_copy_rop2); static dev_proc_get_bits_rectangle(run_get_bits_rectangle); /* @@ -211,7 +211,7 @@ gdev_run_from_mem(gx_device_run *rdev, gx_device_memory *mdev) REPLACE(fill_rectangle, run_fill_rectangle); REPLACE(copy_alpha, run_copy_alpha); REPLACE(strip_tile_rectangle, run_strip_tile_rectangle); - REPLACE(strip_copy_rop, run_strip_copy_rop); + REPLACE(strip_copy_rop2, run_strip_copy_rop2); REPLACE(get_bits_rectangle, run_get_bits_rectangle); #undef REPLACE return 0; @@ -334,21 +334,23 @@ run_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, color0, color1, px, py); } static int -run_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int w, int h, int px, int py, - gs_logical_operation_t lop) +run_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, + uint sraster, gx_bitmap_id id, + const gx_color_index * scolors, + const gx_strip_bitmap * textures, + const gx_color_index * tcolors, + int x, int y, int w, int h, int px, int py, + gs_logical_operation_t lop, + uint planar_height) { gx_device_run *const rdev = (gx_device_run *)dev; run_standardize(rdev, y, h); - return rdev->save_procs.strip_copy_rop((gx_device *)&rdev->md, - sdata, sourcex, sraster, - id, scolors, textures, tcolors, - x, y, w, h, px, py, lop); + return rdev->save_procs.strip_copy_rop2((gx_device *)&rdev->md, + sdata, sourcex, sraster, + id, scolors, textures, tcolors, + x, y, w, h, px, py, lop, + planar_height); } static int run_get_bits_rectangle(gx_device * dev, const gs_int_rect * prect, diff --git a/base/gdevmrun.h b/base/gdevmrun.h index 15ee2f79c..ff6666d38 100644 --- a/base/gdevmrun.h +++ b/base/gdevmrun.h @@ -44,7 +44,7 @@ typedef struct gx_device_run_s { dev_proc_fill_rectangle((*fill_rectangle)); dev_proc_copy_alpha((*copy_alpha)); dev_proc_strip_tile_rectangle((*strip_tile_rectangle)); - dev_proc_strip_copy_rop((*strip_copy_rop)); + dev_proc_strip_copy_rop2((*strip_copy_rop2)); dev_proc_get_bits_rectangle((*get_bits_rectangle)); } save_procs; } gx_device_run; diff --git a/base/gdevnfwd.c b/base/gdevnfwd.c index 27fe2872c..4bc81628d 100644 --- a/base/gdevnfwd.c +++ b/base/gdevnfwd.c @@ -82,7 +82,6 @@ gx_device_forward_fill_in_procs(register gx_device_forward * dev) fill_dev_proc(dev, fill_triangle, gx_forward_fill_triangle); fill_dev_proc(dev, draw_thin_line, gx_forward_draw_thin_line); /* NOT strip_tile_rectangle */ - fill_dev_proc(dev, strip_copy_rop, gx_forward_strip_copy_rop); fill_dev_proc(dev, get_clipping_box, gx_forward_get_clipping_box); fill_dev_proc(dev, begin_typed_image, gx_forward_begin_typed_image); fill_dev_proc(dev, get_bits_rectangle, gx_forward_get_bits_rectangle); @@ -498,26 +497,6 @@ gx_forward_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, } int -gx_forward_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - gx_device_forward * const fdev = (gx_device_forward *)dev; - gx_device *tdev = fdev->target; - dev_proc_strip_copy_rop((*proc)) = - (tdev == 0 ? (tdev = dev, gx_default_strip_copy_rop) : - dev_proc(tdev, strip_copy_rop)); - - return proc(tdev, sdata, sourcex, sraster, id, scolors, - textures, tcolors, x, y, width, height, - phase_x, phase_y, lop); -} - -int gx_forward_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, @@ -530,23 +509,13 @@ gx_forward_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, gx_device_forward * const fdev = (gx_device_forward *)dev; gx_device *tdev = fdev->target; - if (planar_height != 0) { - dev_proc_strip_copy_rop2((*proc2)) = + dev_proc_strip_copy_rop2((*proc2)) = (tdev == 0 ? (tdev = dev, gx_default_strip_copy_rop2) : dev_proc(tdev, strip_copy_rop2)); - return proc2(tdev, sdata, sourcex, sraster, id, scolors, - textures, tcolors, x, y, width, height, - phase_x, phase_y, lop, planar_height); - } else { - dev_proc_strip_copy_rop((*proc)) = - (tdev == 0 ? (tdev = dev, gx_default_strip_copy_rop) : - dev_proc(tdev, strip_copy_rop)); - - return proc(tdev, sdata, sourcex, sraster, id, scolors, - textures, tcolors, x, y, width, height, - phase_x, phase_y, lop); - } + return proc2(tdev, sdata, sourcex, sraster, id, scolors, + textures, tcolors, x, y, width, height, + phase_x, phase_y, lop, planar_height); } int @@ -1009,7 +978,6 @@ static dev_proc_decode_color(null_decode_color); /* We would like to have null implementations of begin/data/end image, */ /* but we can't do this, because image_data must keep track of the */ /* Y position so it can return 1 when done. */ -static dev_proc_strip_copy_rop(null_strip_copy_rop); static dev_proc_strip_copy_rop2(null_strip_copy_rop2); static dev_proc_strip_tile_rect_devn(null_strip_tile_rect_devn); static dev_proc_fill_rectangle_hl_color(null_fill_rectangle_hl_color); @@ -1037,7 +1005,6 @@ null_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_parallelogram, null_fill_parallelogram); set_dev_proc(dev, fill_triangle, null_fill_triangle); set_dev_proc(dev, draw_thin_line, null_draw_thin_line); - set_dev_proc(dev, strip_copy_rop, null_strip_copy_rop); set_dev_proc(dev, map_color_rgb_alpha, gx_forward_map_color_rgb_alpha); set_dev_proc(dev, composite, gx_non_imaging_composite); set_dev_proc(dev, get_hardware_params, gx_forward_get_hardware_params); @@ -1196,17 +1163,6 @@ null_draw_thin_line(gx_device * dev, return 0; } static int -null_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - return 0; -} -static int null_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, @@ -1310,7 +1266,6 @@ void gx_forward_device_initialize_procs(gx_device *dev) fill_dev_proc(dev, fill_triangle, gx_forward_fill_triangle); fill_dev_proc(dev, draw_thin_line, gx_forward_draw_thin_line); fill_dev_proc(dev, strip_tile_rectangle, gx_forward_strip_tile_rectangle); - fill_dev_proc(dev, strip_copy_rop, gx_forward_strip_copy_rop); fill_dev_proc(dev, get_clipping_box, gx_forward_get_clipping_box); fill_dev_proc(dev, begin_typed_image, gx_forward_begin_typed_image); fill_dev_proc(dev, get_bits_rectangle, gx_forward_get_bits_rectangle); diff --git a/base/gdevoflt.c b/base/gdevoflt.c index 72958467b..870578595 100644 --- a/base/gdevoflt.c +++ b/base/gdevoflt.c @@ -52,7 +52,6 @@ static dev_proc_fill_parallelogram(obj_filter_fill_parallelogram); static dev_proc_fill_triangle(obj_filter_fill_triangle); static dev_proc_draw_thin_line(obj_filter_draw_thin_line); static dev_proc_strip_tile_rectangle(obj_filter_strip_tile_rectangle); -static dev_proc_strip_copy_rop(obj_filter_strip_copy_rop); static dev_proc_begin_typed_image(obj_filter_begin_typed_image); static dev_proc_text_begin(obj_filter_text_begin); static dev_proc_fill_rectangle_hl_color(obj_filter_fill_rectangle_hl_color); @@ -101,7 +100,6 @@ obj_filter_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, obj_filter_fill_triangle); set_dev_proc(dev, draw_thin_line, obj_filter_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, obj_filter_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, obj_filter_strip_copy_rop); set_dev_proc(dev, begin_typed_image, obj_filter_begin_typed_image); set_dev_proc(dev, text_begin, obj_filter_text_begin); set_dev_proc(dev, fill_rectangle_hl_color, obj_filter_fill_rectangle_hl_color); @@ -219,17 +217,6 @@ int obj_filter_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap *tiles return 0; } -int obj_filter_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, - const gx_color_index *scolors, - const gx_strip_bitmap *textures, const gx_color_index *tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - if ((dev->ObjectFilter & FILTERIMAGE) == 0) - return default_subclass_strip_copy_rop(dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); - return 0; -} - typedef struct obj_filter_image_enum_s { gx_image_enum_common; int y; diff --git a/base/gdevp14.c b/base/gdevp14.c index fb6cd2aa7..8317133f3 100644 --- a/base/gdevp14.c +++ b/base/gdevp14.c @@ -9591,7 +9591,7 @@ pdf14_clist_init_procs(gx_device *dev, set_dev_proc(dev, fill_triangle, gx_forward_fill_triangle); set_dev_proc(dev, draw_thin_line, gx_forward_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, gx_forward_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, gx_forward_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, gx_forward_strip_copy_rop2); set_dev_proc(dev, get_clipping_box, gx_forward_get_clipping_box); set_dev_proc(dev, begin_typed_image, pdf14_clist_begin_typed_image); set_dev_proc(dev, get_bits_rectangle, gx_forward_get_bits_rectangle); diff --git a/base/gdevplnx.c b/base/gdevplnx.c index 0c852c35b..870112f66 100644 --- a/base/gdevplnx.c +++ b/base/gdevplnx.c @@ -64,7 +64,7 @@ static dev_proc_fill_mask(plane_fill_mask); static dev_proc_fill_parallelogram(plane_fill_parallelogram); static dev_proc_fill_triangle(plane_fill_triangle); static dev_proc_strip_tile_rectangle(plane_strip_tile_rectangle); -static dev_proc_strip_copy_rop(plane_strip_copy_rop); +static dev_proc_strip_copy_rop2(plane_strip_copy_rop2); static dev_proc_begin_typed_image(plane_begin_typed_image); static dev_proc_get_bits_rectangle(plane_get_bits_rectangle); @@ -83,7 +83,7 @@ plane_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_parallelogram, plane_fill_parallelogram); set_dev_proc(dev, fill_triangle, plane_fill_triangle); set_dev_proc(dev, strip_tile_rectangle, plane_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, plane_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, plane_strip_copy_rop2); set_dev_proc(dev, begin_typed_image, plane_begin_typed_image); set_dev_proc(dev, get_bits_rectangle, plane_get_bits_rectangle); set_dev_proc(dev, composite, gx_no_composite); /* WRONG */ @@ -103,7 +103,6 @@ plane_initialize_device_procs(gx_device *dev) set_dev_proc(dev, update_spot_equivalent_colors, gx_default_update_spot_equivalent_colors); set_dev_proc(dev, ret_devn_params, gx_default_ret_devn_params); set_dev_proc(dev, fillpage, gx_default_fillpage); - set_dev_proc(dev, strip_copy_rop2, gx_default_strip_copy_rop2); set_dev_proc(dev, strip_tile_rect_devn, gx_default_strip_tile_rect_devn); set_dev_proc(dev, copy_alpha_hl_color, gx_default_copy_alpha_hl_color); } @@ -714,12 +713,13 @@ plane_strip_tile_rectangle(gx_device *dev, } static int -plane_strip_copy_rop(gx_device *dev, +plane_strip_copy_rop2(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index *scolors, const gx_strip_bitmap *textures, const gx_color_index *tcolors, int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { gx_device_plane_extract * const edev = (gx_device_plane_extract *)dev; gx_device * const plane_dev = edev->plane_dev; @@ -765,9 +765,10 @@ plane_strip_copy_rop(gx_device *dev, code = begin_tiling(&source.state, edev, sdata, sourcex, sraster, w, y, (byte *)sbuf, sizeof(sbuf), true); if (code < 0) - return gx_default_strip_copy_rop(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, - x, y, w, h, phase_x, phase_y, rop); + return gx_default_strip_copy_rop2(dev, sdata, sourcex, sraster, id, + scolors, textures, tcolors, + x, y, w, h, phase_x, phase_y, rop, + plane_height); plane_source = source.state.buffer.data; plane_raster = source.state.buffer.raster; } else @@ -792,10 +793,10 @@ plane_strip_copy_rop(gx_device *dev, do { if (sdata) extract_partial_tile(&source.state); - code = dev_proc(plane_dev, strip_copy_rop) + code = dev_proc(plane_dev, strip_copy_rop2) (plane_dev, plane_source, sourcex, plane_raster, gx_no_bitmap_id, source.colors, plane_textures, texture.colors, - x, y, w, h, phase_x, phase_y, rop); + x, y, w, h, phase_x, phase_y, rop, plane_height); } while (code >= 0 && sdata && next_tile(&source.state)); if (textures) end_tiling(&texture.state); diff --git a/base/gdevsclass.c b/base/gdevsclass.c index 0658e460d..7b7ea50f2 100644 --- a/base/gdevsclass.c +++ b/base/gdevsclass.c @@ -354,18 +354,6 @@ int default_subclass_strip_tile_rectangle(gx_device *dev, const gx_strip_bitmap return gx_default_strip_tile_rectangle(dev, tiles, x, y, width, height, color0, color1, phase_x, phase_y); } -int default_subclass_strip_copy_rop(gx_device *dev, const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id, - const gx_color_index *scolors, - const gx_strip_bitmap *textures, const gx_color_index *tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - if (dev->child) - return dev_proc(dev->child, strip_copy_rop)(dev->child, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); - /* else */ - return gx_default_strip_copy_rop(dev, sdata, sourcex, sraster, id, scolors, textures, tcolors, x, y, width, height, phase_x, phase_y, lop); -} - void default_subclass_get_clipping_box(gx_device *dev, gs_fixed_rect *pbox) { if (dev->child) { @@ -871,7 +859,6 @@ void default_subclass_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, default_subclass_fill_triangle); set_dev_proc(dev, draw_thin_line, default_subclass_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, default_subclass_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, default_subclass_strip_copy_rop); set_dev_proc(dev, get_clipping_box, default_subclass_get_clipping_box); set_dev_proc(dev, begin_typed_image, default_subclass_begin_typed_image); set_dev_proc(dev, get_bits_rectangle, default_subclass_get_bits_rectangle); diff --git a/base/gdevsclass.h b/base/gdevsclass.h index 00d2fdf91..8d62bb7b0 100644 --- a/base/gdevsclass.h +++ b/base/gdevsclass.h @@ -55,7 +55,6 @@ dev_proc_fill_parallelogram(default_subclass_fill_parallelogram); dev_proc_fill_triangle(default_subclass_fill_triangle); dev_proc_draw_thin_line(default_subclass_draw_thin_line); dev_proc_strip_tile_rectangle(default_subclass_strip_tile_rectangle); -dev_proc_strip_copy_rop(default_subclass_strip_copy_rop); dev_proc_get_clipping_box(default_subclass_get_clipping_box); dev_proc_begin_typed_image(default_subclass_begin_typed_image); dev_proc_get_bits_rectangle(default_subclass_get_bits_rectangle); diff --git a/base/gsovrc.c b/base/gsovrc.c index 0beffe93e..ce44225c4 100644 --- a/base/gsovrc.c +++ b/base/gsovrc.c @@ -482,7 +482,7 @@ generic_overprint_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, gx_default_fill_triangle); set_dev_proc(dev, draw_thin_line, gx_default_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, gx_default_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, gx_default_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, gx_default_strip_copy_rop2); set_dev_proc(dev, begin_typed_image, gx_default_begin_typed_image); set_dev_proc(dev, composite, overprint_composite); set_dev_proc(dev, text_begin, overprint_text_begin); @@ -518,7 +518,7 @@ sep_overprint_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, gx_default_fill_triangle); set_dev_proc(dev, draw_thin_line, gx_default_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, gx_default_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, gx_default_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, gx_default_strip_copy_rop2); set_dev_proc(dev, begin_typed_image, gx_default_begin_typed_image); set_dev_proc(dev, composite, overprint_composite); set_dev_proc(dev, text_begin, overprint_text_begin); diff --git a/base/gxcht.c b/base/gxcht.c index 2fe34bbb2..6625601aa 100644 --- a/base/gxcht.c +++ b/base/gxcht.c @@ -703,18 +703,7 @@ gx_dc_ht_colored_fill_rectangle(const gx_device_color * pdevc, gx_no_color_index, pdevc->phase.x, pdevc->phase.y); - if (source->planar_height == 0) - return (*dev_proc(dev, strip_copy_rop)) - (dev, - source->sdata + (y - origy) * source->sraster, - source->sourcex + (x - origx), - source->sraster, source->id, - (source->use_scolors ? source->scolors : NULL), - &tiles, NULL, - x, y, w, h, - pdevc->phase.x, pdevc->phase.y, lop); - else - return (*dev_proc(dev, strip_copy_rop2)) + return (*dev_proc(dev, strip_copy_rop2)) (dev, source->sdata + (y - origy) * source->sraster, source->sourcex + (x - origx), @@ -779,16 +768,7 @@ fit: /* Now the tile will definitely fit. */ x, cy, dw, ch); } else { tiles.rep_height = tiles.size.y = ch; - if (source->planar_height == 0) - code = (*dev_proc(dev, strip_copy_rop)) - (dev, source->sdata + source->sraster * (cy-origy), - source->sourcex + (x - origx), - source->sraster, - source->id, - (source->use_scolors ? source->scolors : NULL), - &tiles, NULL, x, cy, dw, ch, 0, 0, lop); - else - code = (*dev_proc(dev, strip_copy_rop2)) + code = (*dev_proc(dev, strip_copy_rop2)) (dev, source->sdata + source->sraster * (cy-origy), source->sourcex + (x - origx), source->sraster, diff --git a/base/gxcldev.h b/base/gxcldev.h index 3879b71f0..012c5bf69 100644 --- a/base/gxcldev.h +++ b/base/gxcldev.h @@ -316,7 +316,6 @@ dev_proc_copy_color(clist_copy_color); dev_proc_copy_alpha(clist_copy_alpha); dev_proc_strip_tile_rectangle(clist_strip_tile_rectangle); dev_proc_strip_tile_rect_devn(clist_strip_tile_rect_devn); -dev_proc_strip_copy_rop(clist_strip_copy_rop); dev_proc_strip_copy_rop2(clist_strip_copy_rop2); dev_proc_fill_trapezoid(clist_fill_trapezoid); dev_proc_fill_linear_color_trapezoid(clist_fill_linear_color_trapezoid); diff --git a/base/gxclip.c b/base/gxclip.c index dc37760c1..d5bf64677 100644 --- a/base/gxclip.c +++ b/base/gxclip.c @@ -41,7 +41,6 @@ static dev_proc_copy_alpha_hl_color(clip_copy_alpha_hl_color); static dev_proc_fill_mask(clip_fill_mask); static dev_proc_strip_tile_rectangle(clip_strip_tile_rectangle); static dev_proc_strip_tile_rect_devn(clip_strip_tile_rect_devn); -static dev_proc_strip_copy_rop(clip_strip_copy_rop); static dev_proc_strip_copy_rop2(clip_strip_copy_rop2); static dev_proc_get_clipping_box(clip_get_clipping_box); static dev_proc_get_bits_rectangle(clip_get_bits_rectangle); @@ -71,7 +70,6 @@ clipper_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_path, clip_fill_path); set_dev_proc(dev, fill_mask, clip_fill_mask); set_dev_proc(dev, strip_tile_rectangle, clip_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, clip_strip_copy_rop); set_dev_proc(dev, get_clipping_box, clip_get_clipping_box); set_dev_proc(dev, get_bits_rectangle, clip_get_bits_rectangle); set_dev_proc(dev, map_color_rgb_alpha, gx_forward_map_color_rgb_alpha); @@ -1339,35 +1337,6 @@ clip_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, /* Copy a rectangle with RasterOp and strip texture. */ int -clip_call_strip_copy_rop(clip_callback_data_t * pccd, int xc, int yc, int xec, int yec) -{ - return (*dev_proc(pccd->tdev, strip_copy_rop)) - (pccd->tdev, pccd->data + (yc - pccd->y) * pccd->raster, - pccd->sourcex + xc - pccd->x, pccd->raster, gx_no_bitmap_id, - pccd->scolors, pccd->textures, pccd->tcolors, - xc, yc, xec - xc, yec - yc, pccd->phase.x, pccd->phase.y, - pccd->lop); -} -static int -clip_strip_copy_rop(gx_device * dev, - const byte * sdata, int sourcex, uint raster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, const gx_color_index * tcolors, - int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - gx_device_clip *rdev = (gx_device_clip *) dev; - clip_callback_data_t ccdata; - - ccdata.data = sdata, ccdata.sourcex = sourcex, ccdata.raster = raster; - ccdata.scolors = scolors, ccdata.textures = textures, - ccdata.tcolors = tcolors; - ccdata.phase.x = phase_x, ccdata.phase.y = phase_y, ccdata.lop = lop; - return clip_enumerate(rdev, x, y, w, h, clip_call_strip_copy_rop, &ccdata); -} - -/* Copy a rectangle with RasterOp and strip texture. */ -int clip_call_strip_copy_rop2(clip_callback_data_t * pccd, int xc, int yc, int xec, int yec) { return (*dev_proc(pccd->tdev, strip_copy_rop2)) diff --git a/base/gxclip.h b/base/gxclip.h index 5d44bc00a..f071864fe 100644 --- a/base/gxclip.h +++ b/base/gxclip.h @@ -78,8 +78,6 @@ int int xc, int yc, int xec, int yec), clip_call_strip_tile_rect_devn(clip_callback_data_t * pccd, int xc, int yc, int xec, int yec), - clip_call_strip_copy_rop(clip_callback_data_t * pccd, - int xc, int yc, int xec, int yec), clip_call_strip_copy_rop2(clip_callback_data_t * pccd, int xc, int yc, int xec, int yec), clip_call_fill_rectangle_hl_color(clip_callback_data_t * pccd, diff --git a/base/gxclip2.c b/base/gxclip2.c index 28b6fd343..0802e2b4b 100644 --- a/base/gxclip2.c +++ b/base/gxclip2.c @@ -36,7 +36,6 @@ static dev_proc_copy_color(tile_clip_copy_color); static dev_proc_copy_planes(tile_clip_copy_planes); static dev_proc_copy_alpha(tile_clip_copy_alpha); static dev_proc_copy_alpha_hl_color(tile_clip_copy_alpha_hl_color); -static dev_proc_strip_copy_rop(tile_clip_strip_copy_rop); static dev_proc_strip_copy_rop2(tile_clip_strip_copy_rop2); /* The device descriptor. */ @@ -58,7 +57,6 @@ tile_clipper_initialize_device_procs(gx_device *dev) set_dev_proc(dev, get_alpha_bits, gx_forward_get_alpha_bits); set_dev_proc(dev, copy_alpha, tile_clip_copy_alpha); set_dev_proc(dev, get_band, gx_forward_get_band); - set_dev_proc(dev, strip_copy_rop, tile_clip_strip_copy_rop); set_dev_proc(dev, get_clipping_box, gx_forward_get_clipping_box); set_dev_proc(dev, get_bits_rectangle, gx_forward_get_bits_rectangle); set_dev_proc(dev, map_color_rgb_alpha, gx_forward_map_color_rgb_alpha); @@ -389,34 +387,6 @@ tile_clip_copy_alpha_hl_color(gx_device * dev, return 0; } -/* Copy a RasterOp rectangle similarly. */ -static int -tile_clip_strip_copy_rop(gx_device * dev, - const byte * data, int sourcex, uint raster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, const gx_color_index * tcolors, - int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - gx_device_tile_clip *cdev = (gx_device_tile_clip *) dev; - - fit_copy(dev, data, sourcex, raster, id, x, y, w, h); - { - FOR_RUNS(data_row, txrun, tx, ty) { - /* Copy the run. */ - int code = (*dev_proc(cdev->target, strip_copy_rop)) - (cdev->target, data_row, sourcex + txrun - x, raster, - gx_no_bitmap_id, scolors, textures, tcolors, - txrun, ty, tx - txrun, 1, phase_x, phase_y, lop); - - if (code < 0) - return code; - } - END_FOR_RUNS(); - } - return 0; -} - static int tile_clip_strip_copy_rop2(gx_device * dev, const byte * data, int sourcex, uint raster, gx_bitmap_id id, diff --git a/base/gxclipm.c b/base/gxclipm.c index e023d1f2b..2166f102f 100644 --- a/base/gxclipm.c +++ b/base/gxclipm.c @@ -32,7 +32,6 @@ static dev_proc_copy_alpha(mask_clip_copy_alpha); static dev_proc_copy_alpha_hl_color(mask_clip_copy_alpha_hl_color); static dev_proc_strip_tile_rectangle(mask_clip_strip_tile_rectangle); static dev_proc_strip_tile_rect_devn(mask_clip_strip_tile_rect_devn); -static dev_proc_strip_copy_rop(mask_clip_strip_copy_rop); static dev_proc_strip_copy_rop2(mask_clip_strip_copy_rop2); static dev_proc_get_clipping_box(mask_clip_get_clipping_box); @@ -57,7 +56,6 @@ mask_clip_initialize_device_procs(gx_device *dev) set_dev_proc(dev, copy_alpha, mask_clip_copy_alpha); set_dev_proc(dev, get_band, gx_forward_get_band); set_dev_proc(dev, strip_tile_rectangle, mask_clip_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, mask_clip_strip_copy_rop); set_dev_proc(dev, get_clipping_box, mask_clip_get_clipping_box); set_dev_proc(dev, get_bits_rectangle, gx_forward_get_bits_rectangle); set_dev_proc(dev, map_color_rgb_alpha, gx_forward_map_color_rgb_alpha); @@ -443,26 +441,6 @@ mask_clip_strip_tile_rect_devn(gx_device * dev, const gx_strip_bitmap * tiles, } static int -mask_clip_strip_copy_rop(gx_device * dev, - const byte * data, int sourcex, uint raster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, const gx_color_index * tcolors, - int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - gx_device_mask_clip *cdev = (gx_device_mask_clip *) dev; - clip_callback_data_t ccdata; - - ccdata.tdev = cdev->target; - ccdata.x = x, ccdata.y = y, ccdata.w = w, ccdata.h = h; - ccdata.data = data, ccdata.sourcex = sourcex, ccdata.raster = raster; - ccdata.scolors = scolors, ccdata.textures = textures, - ccdata.tcolors = tcolors; - ccdata.phase.x = phase_x, ccdata.phase.y = phase_y, ccdata.lop = lop; - return clip_runs_enumerate(cdev, clip_call_strip_copy_rop, &ccdata); -} - -static int mask_clip_strip_copy_rop2(gx_device * dev, const byte * data, int sourcex, uint raster, gx_bitmap_id id, const gx_color_index * scolors, diff --git a/base/gxclist.c b/base/gxclist.c index 73c62e930..e5f1c1b67 100644 --- a/base/gxclist.c +++ b/base/gxclist.c @@ -155,7 +155,6 @@ clist_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_parallelogram, clist_fill_parallelogram); set_dev_proc(dev, fill_triangle, clist_fill_triangle); set_dev_proc(dev, strip_tile_rectangle, clist_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, clist_strip_copy_rop); set_dev_proc(dev, get_clipping_box, gx_forward_get_clipping_box); set_dev_proc(dev, begin_typed_image, clist_begin_typed_image); set_dev_proc(dev, get_bits_rectangle, clist_get_bits_rectangle); diff --git a/base/gxclrast.c b/base/gxclrast.c index 0abdb0fac..ce683a94f 100644 --- a/base/gxclrast.c +++ b/base/gxclrast.c @@ -2258,18 +2258,7 @@ idata: data_size = 0; colors[0] = colors[1] = state.colors[1]; log_op = state.lop; pcolor = colors; - do_rop:if (plane_height == 0) { - code = (*dev_proc(tdev, strip_copy_rop)) - (tdev, source, data_x, raster, gx_no_bitmap_id, - pcolor, &state_tile, - (state.tile_colors[0] == gx_no_color_index && - state.tile_colors[1] == gx_no_color_index ? - NULL : state.tile_colors), - state.rect.x - x0, state.rect.y - y0, - state.rect.width - data_x, state.rect.height, - tile_phase.x, tile_phase.y, log_op); - } else { - code = (*dev_proc(tdev, strip_copy_rop2)) + do_rop:code = (*dev_proc(tdev, strip_copy_rop2)) (tdev, source, data_x, raster, gx_no_bitmap_id, pcolor, &state_tile, (state.tile_colors[0] == gx_no_color_index && @@ -2280,7 +2269,6 @@ idata: data_size = 0; tile_phase.x, tile_phase.y, log_op, plane_height); plane_height = 0; - } data_x = 0; break; case cmd_op_tile_rect >> 4: diff --git a/base/gxclrect.c b/base/gxclrect.c index da6dda6bf..a97cf0f66 100644 --- a/base/gxclrect.c +++ b/base/gxclrect.c @@ -1421,20 +1421,6 @@ copy:{ } int -clist_strip_copy_rop(gx_device * dev, - const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, const gx_color_index * tcolors, - int rx, int ry, int rwidth, int rheight, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - return clist_strip_copy_rop2(dev, sdata, sourcex, sraster, id, - scolors, textures, tcolors, - rx, ry, rwidth, rheight, phase_x, phase_y, - lop, 0); -} - -int clist_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, diff --git a/base/gxdcolor.c b/base/gxdcolor.c index c0f0c1d45..cead03096 100644 --- a/base/gxdcolor.c +++ b/base/gxdcolor.c @@ -826,13 +826,7 @@ gx_dc_pure_fill_rectangle(const gx_device_color * pdevc, int x, int y, colors[0] = colors[1] = pdevc->colors.pure; if (source == NULL) set_rop_no_source(source, no_source, dev); - if (source->planar_height == 0) - return (*dev_proc(dev, strip_copy_rop)) - (dev, source->sdata, source->sourcex, source->sraster, - source->id, (source->use_scolors ? source->scolors : NULL), - NULL /*arbitrary */ , colors, x, y, w, h, 0, 0, lop); - else - return (*dev_proc(dev, strip_copy_rop2)) + return (*dev_proc(dev, strip_copy_rop2)) (dev, source->sdata, source->sourcex, source->sraster, source->id, (source->use_scolors ? source->scolors : NULL), NULL /*arbitrary */ , colors, x, y, w, h, 0, 0, lop, source->planar_height); @@ -874,10 +868,10 @@ gx_dc_pure_fill_masked(const gx_device_color * pdevc, const byte * data, if (!rop3_uses_S(lop)) lop |= rop3_S; - return (*dev_proc(dev, strip_copy_rop)) + return (*dev_proc(dev, strip_copy_rop2)) (dev, data, data_x, raster, id, scolors, NULL, tcolors, x, y, w, h, 0, 0, - lop_sanitize(lop | lop_S_transparent)); + lop_sanitize(lop | lop_S_transparent), 0); } } diff --git a/base/gxdevcli.h b/base/gxdevcli.h index 09495f649..ffaeb9881 100644 --- a/base/gxdevcli.h +++ b/base/gxdevcli.h @@ -1082,16 +1082,6 @@ typedef enum FILTER_FLAGS { #define dev_proc_strip_tile_rectangle(proc)\ dev_t_proc_strip_tile_rectangle(proc, gx_device) -#define dev_t_proc_strip_copy_rop(proc, dev_t)\ - int proc(dev_t *dev,\ - const byte *sdata, int sourcex, uint sraster, gx_bitmap_id id,\ - const gx_color_index *scolors,\ - const gx_strip_bitmap *textures, const gx_color_index *tcolors,\ - int x, int y, int width, int height,\ - int phase_x, int phase_y, gs_logical_operation_t lop) -#define dev_proc_strip_copy_rop(proc)\ - dev_t_proc_strip_copy_rop(proc, gx_device) - /* Added in release 4.20 */ #define dev_t_proc_get_clipping_box(proc, dev_t)\ @@ -1516,7 +1506,6 @@ typedef struct { dev_t_proc_fill_triangle((*fill_triangle), dev_t);\ dev_t_proc_draw_thin_line((*draw_thin_line), dev_t);\ dev_t_proc_strip_tile_rectangle((*strip_tile_rectangle), dev_t);\ - dev_t_proc_strip_copy_rop((*strip_copy_rop), dev_t);\ dev_t_proc_get_clipping_box((*get_clipping_box), dev_t);\ dev_t_proc_begin_typed_image((*begin_typed_image), dev_t);\ dev_t_proc_get_bits_rectangle((*get_bits_rectangle), dev_t);\ diff --git a/base/gxdevice.h b/base/gxdevice.h index 9253bc012..2453ffc1a 100644 --- a/base/gxdevice.h +++ b/base/gxdevice.h @@ -274,8 +274,7 @@ dev_proc_fill_parallelogram(gx_default_fill_parallelogram); dev_proc_fill_triangle(gx_default_fill_triangle); dev_proc_draw_thin_line(gx_default_draw_thin_line); dev_proc_strip_tile_rectangle(gx_default_strip_tile_rectangle); -dev_proc_strip_copy_rop(gx_no_strip_copy_rop); /* gives error */ -dev_proc_strip_copy_rop(gx_default_strip_copy_rop); +dev_proc_strip_copy_rop2(gx_no_strip_copy_rop2); dev_proc_get_clipping_box(gx_default_get_clipping_box); dev_proc_get_clipping_box(gx_get_largest_clipping_box); dev_proc_begin_typed_image(gx_default_begin_typed_image); @@ -376,7 +375,6 @@ dev_proc_fill_parallelogram(gx_forward_fill_parallelogram); dev_proc_fill_triangle(gx_forward_fill_triangle); dev_proc_draw_thin_line(gx_forward_draw_thin_line); dev_proc_strip_tile_rectangle(gx_forward_strip_tile_rectangle); -dev_proc_strip_copy_rop(gx_forward_strip_copy_rop); dev_proc_get_clipping_box(gx_forward_get_clipping_box); dev_proc_begin_typed_image(gx_forward_begin_typed_image); dev_proc_get_bits_rectangle(gx_forward_get_bits_rectangle); diff --git a/base/gxdevmem.h b/base/gxdevmem.h index 721815f45..a397e88dc 100644 --- a/base/gxdevmem.h +++ b/base/gxdevmem.h @@ -211,7 +211,6 @@ typedef struct dev_proc_copy_color((*copy_color)); dev_proc_copy_alpha((*copy_alpha)); dev_proc_strip_tile_rectangle((*strip_tile_rectangle)); - dev_proc_strip_copy_rop((*strip_copy_rop)); dev_proc_strip_copy_rop2((*strip_copy_rop2)); dev_proc_get_bits_rectangle((*get_bits_rectangle)); } gdev_mem_functions; diff --git a/base/gxdevrop.h b/base/gxdevrop.h index c3472cf56..14fc3decd 100644 --- a/base/gxdevrop.h +++ b/base/gxdevrop.h @@ -22,6 +22,6 @@ #include "gxdevcli.h" /* Define an unaligned implementation of [strip_]copy_rop. */ -dev_proc_strip_copy_rop(gx_strip_copy_rop_unaligned); +dev_proc_strip_copy_rop2(gx_strip_copy_rop2_unaligned); #endif /* gxdevrop_INCLUDED */ diff --git a/base/gxht.c b/base/gxht.c index aeb23362b..b2322a237 100644 --- a/base/gxht.c +++ b/base/gxht.c @@ -301,17 +301,7 @@ gx_dc_ht_binary_fill_rectangle(const gx_device_color * pdevc, int x, int y, lop = rop3_use_D_when_T_1(lop); if (source == NULL) set_rop_no_source(source, no_source, dev); - if (source->planar_height == 0) - return (*dev_proc(dev, strip_copy_rop)) - (dev, source->sdata, - source->sourcex, source->sraster, source->id, - (source->use_scolors ? source->scolors : NULL), - &pdevc->colors.binary.b_tile->tiles, - pdevc->colors.binary.color, - x, y, w, h, pdevc->phase.x, pdevc->phase.y, - lop); - else - return (*dev_proc(dev, strip_copy_rop2)) + return (*dev_proc(dev, strip_copy_rop2)) (dev, source->sdata, source->sourcex, source->sraster, source->id, (source->use_scolors ? source->scolors : NULL), diff --git a/base/gxp1fill.c b/base/gxp1fill.c index dab8c3336..99f05f5cd 100644 --- a/base/gxp1fill.c +++ b/base/gxp1fill.c @@ -286,20 +286,7 @@ tile_colored_fill(const tile_fill_state_t * ptfs, data_tile.id = bits->id; data_tile.shift = data_tile.rep_shift = 0; data_tile.num_planes = (ptfs->num_planes > 1 ? ptfs->num_planes : 1); - if (source->planar_height == 0) { - code = (*dev_proc(ptfs->pcdev, strip_copy_rop)) - (ptfs->pcdev, - source->sdata + (y - ptfs->y0) * source->sraster, - source->sourcex + (x - ptfs->x0), - source->sraster, source_id, - (source->use_scolors ? source->scolors : NULL), - &data_tile, NULL, - x, y, w, h, - imod(xoff - x, data_tile.rep_width), - imod(yoff - y, data_tile.rep_height), - lop); - } else { - code = (*dev_proc(ptfs->pcdev, strip_copy_rop2)) + code = (*dev_proc(ptfs->pcdev, strip_copy_rop2)) (ptfs->pcdev, source->sdata + (y - ptfs->y0) * source->sraster, source->sourcex + (x - ptfs->x0), @@ -311,7 +298,6 @@ tile_colored_fill(const tile_fill_state_t * ptfs, imod(yoff - y, data_tile.rep_height), lop, source->planar_height); - } } return code; } @@ -393,13 +379,6 @@ gx_dc_pattern_fill_rectangle(const gx_device_color * pdevc, int x, int y, code = (*dev_proc(state.pcdev, strip_tile_rectangle)) (state.pcdev, bits, x, y, w, h, gx_no_color_index, gx_no_color_index, px, py); - else if (rop_source->planar_height == 0) - code = (*dev_proc(state.pcdev, strip_copy_rop)) - (state.pcdev, - rop_source->sdata, rop_source->sourcex, - rop_source->sraster, rop_source->id, - (rop_source->use_scolors ? rop_source->scolors : NULL), - bits, NULL, x, y, w, h, px, py, lop); else code = (*dev_proc(state.pcdev, strip_copy_rop2)) (state.pcdev, diff --git a/base/gxpcmap.c b/base/gxpcmap.c index 521190a47..6458c37d4 100644 --- a/base/gxpcmap.c +++ b/base/gxpcmap.c @@ -127,7 +127,6 @@ pattern_accum_initialize_device_procs(gx_device *dev) set_dev_proc(dev, fill_triangle, gx_default_fill_triangle); set_dev_proc(dev, draw_thin_line, gx_default_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, gx_default_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, gx_default_strip_copy_rop); set_dev_proc(dev, begin_typed_image, gx_default_begin_typed_image); set_dev_proc(dev, composite, gx_default_composite); set_dev_proc(dev, text_begin, gx_default_text_begin); diff --git a/devices/gdevtrac.c b/devices/gdevtrac.c index 866c8d06d..d5ff53a2b 100644 --- a/devices/gdevtrac.c +++ b/devices/gdevtrac.c @@ -260,19 +260,6 @@ trace_draw_thin_line(gx_device * dev, } static int -trace_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, - uint sraster, gx_bitmap_id id, - const gx_color_index * scolors, - const gx_strip_bitmap * textures, - const gx_color_index * tcolors, - int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) -{ - dmputs(dev->memory,"**strip_copy_rop**\n"); - return 0; -} - -static int trace_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, @@ -612,7 +599,6 @@ tr_base_initialize_device_procs(gx_device *dev, set_dev_proc(dev, fill_triangle, trace_fill_triangle); set_dev_proc(dev, draw_thin_line, trace_draw_thin_line); set_dev_proc(dev, strip_tile_rectangle, trace_strip_tile_rectangle); - set_dev_proc(dev, strip_copy_rop, trace_strip_copy_rop); set_dev_proc(dev, begin_typed_image, trace_begin_typed_image); set_dev_proc(dev, text_begin, trace_text_begin); set_dev_proc(dev, strip_copy_rop2, trace_strip_copy_rop2); diff --git a/devices/gdevxini.c b/devices/gdevxini.c index b87e5af6d..1944c9a9d 100644 --- a/devices/gdevxini.c +++ b/devices/gdevxini.c @@ -678,7 +678,6 @@ x_set_buffer(gx_device_X * xdev) COPY_PROC(fill_triangle); COPY_PROC(draw_thin_line); COPY_PROC(strip_tile_rectangle); - COPY_PROC(strip_copy_rop); COPY_PROC(begin_typed_image); COPY_PROC(text_begin); #undef COPY_PROC diff --git a/devices/vector/gdevdocxw.c b/devices/vector/gdevdocxw.c index c7d7a8a54..57e5468b0 100644 --- a/devices/vector/gdevdocxw.c +++ b/devices/vector/gdevdocxw.c @@ -117,7 +117,7 @@ static dev_proc_put_params(docxwrite_put_params); static dev_proc_fill_path(docxwrite_fill_path); static dev_proc_stroke_path(docxwrite_stroke_path); static dev_proc_text_begin(docxwrite_text_begin); -static dev_proc_strip_copy_rop(docxwrite_strip_copy_rop); +static dev_proc_strip_copy_rop2(docxwrite_strip_copy_rop2); static dev_proc_dev_spec_op(docxwrite_dev_spec_op); @@ -156,7 +156,7 @@ docxwrite_initialize_device_procs(gx_device *dev) set_dev_proc(dev, get_page_device, gx_page_device_get_page_device); set_dev_proc(dev, fill_path, docxwrite_fill_path); set_dev_proc(dev, stroke_path, docxwrite_stroke_path); - set_dev_proc(dev, strip_copy_rop, docxwrite_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, docxwrite_strip_copy_rop2); set_dev_proc(dev, composite, gx_null_composite); set_dev_proc(dev, text_begin, docxwrite_text_begin); set_dev_proc(dev, dev_spec_op, docxwrite_dev_spec_op); @@ -431,14 +431,15 @@ docxwrite_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, } static int -docxwrite_strip_copy_rop(gx_device * dev, +docxwrite_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { return 0; }*/ @@ -1296,14 +1297,15 @@ docxwrite_text_begin(gx_device * dev, gs_gstate * pgs, } static int -docxwrite_strip_copy_rop(gx_device * dev, +docxwrite_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { return 0; } diff --git a/devices/vector/gdevpx.c b/devices/vector/gdevpx.c index 960d18ae7..fad8727c3 100644 --- a/devices/vector/gdevpx.c +++ b/devices/vector/gdevpx.c @@ -144,7 +144,7 @@ static dev_proc_put_params(pclxl_put_params); /*static dev_proc_draw_thin_line(pclxl_draw_thin_line); */ static dev_proc_begin_typed_image(pclxl_begin_typed_image); -static dev_proc_strip_copy_rop(pclxl_strip_copy_rop); +static dev_proc_strip_copy_rop2(pclxl_strip_copy_rop2); static void pclxl_initialize_device_procs(gx_device *dev, @@ -169,7 +169,7 @@ pclxl_initialize_device_procs(gx_device *dev, set_dev_proc(dev, fill_parallelogram, gdev_vector_fill_parallelogram); set_dev_proc(dev, fill_triangle, gdev_vector_fill_triangle); set_dev_proc(dev, begin_typed_image, pclxl_begin_typed_image); - set_dev_proc(dev, strip_copy_rop, pclxl_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, pclxl_strip_copy_rop2); } static void @@ -1971,25 +1971,27 @@ pclxl_fill_mask(gx_device * dev, /* Do a RasterOp. */ static int -pclxl_strip_copy_rop(gx_device * dev, const byte * sdata, int sourcex, +pclxl_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int width, int height, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { lop = lop_sanitize(lop); /* Improvements possible here using PXL ROP3 for some combinations of args; use gx_default for now */ if (!rop3_uses_D(lop)) /* gx_default() cannot cope with D ops */ - return gx_default_strip_copy_rop(dev, sdata, sourcex, - sraster, id, - scolors, - textures, - tcolors, - x, y, width, height, - phase_x, phase_y, lop); + return gx_default_strip_copy_rop2(dev, sdata, sourcex, + sraster, id, + scolors, + textures, + tcolors, + x, y, width, height, + phase_x, phase_y, lop, + plane_height); return 0; } diff --git a/devices/vector/gdevtxtw.c b/devices/vector/gdevtxtw.c index e256d1026..bcf52a6c0 100644 --- a/devices/vector/gdevtxtw.c +++ b/devices/vector/gdevtxtw.c @@ -112,7 +112,7 @@ static dev_proc_put_params(txtwrite_put_params); static dev_proc_fill_path(txtwrite_fill_path); static dev_proc_stroke_path(txtwrite_stroke_path); static dev_proc_text_begin(txtwrite_text_begin); -static dev_proc_strip_copy_rop(txtwrite_strip_copy_rop); +static dev_proc_strip_copy_rop2(txtwrite_strip_copy_rop2); static dev_proc_dev_spec_op(txtwrite_dev_spec_op); @@ -157,7 +157,7 @@ txtwrite_initialize_device_procs(gx_device *dev) set_dev_proc(dev, get_page_device, gx_page_device_get_page_device); set_dev_proc(dev, fill_path, txtwrite_fill_path); set_dev_proc(dev, stroke_path, txtwrite_stroke_path); - set_dev_proc(dev, strip_copy_rop, txtwrite_strip_copy_rop); + set_dev_proc(dev, strip_copy_rop2, txtwrite_strip_copy_rop2); set_dev_proc(dev, composite, gx_null_composite); set_dev_proc(dev, text_begin, txtwrite_text_begin); set_dev_proc(dev, dev_spec_op, txtwrite_dev_spec_op); @@ -1038,14 +1038,15 @@ txtwrite_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, } static int -txtwrite_strip_copy_rop(gx_device * dev, +txtwrite_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { return 0; }*/ @@ -2085,14 +2086,15 @@ txtwrite_text_begin(gx_device * dev, gs_gstate * pgs, } static int -txtwrite_strip_copy_rop(gx_device * dev, +txtwrite_strip_copy_rop2(gx_device * dev, const byte * sdata, int sourcex, uint sraster, gx_bitmap_id id, const gx_color_index * scolors, const gx_strip_bitmap * textures, const gx_color_index * tcolors, int x, int y, int w, int h, - int phase_x, int phase_y, gs_logical_operation_t lop) + int phase_x, int phase_y, gs_logical_operation_t lop, + uint plane_height) { return 0; } |