diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2021-04-28 20:34:17 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2021-05-03 12:05:05 +0100 |
commit | 2b5118c3fcb8e5cc58c9a3d87ad9fe327eece117 (patch) | |
tree | 0bff7932ad9f2ea74d30dfcb33c2b4942005ed92 /base/gsdevice.c | |
parent | 623be737dbf836d5f037f0071900f645f24cf6cc (diff) | |
download | ghostpdl-2b5118c3fcb8e5cc58c9a3d87ad9fe327eece117.tar.gz |
Remove get_bits in favour of get_bits_rectangle.
Diffstat (limited to 'base/gsdevice.c')
-rw-r--r-- | base/gsdevice.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/base/gsdevice.c b/base/gsdevice.c index 00463b77a..b5ad7a990 100644 --- a/base/gsdevice.c +++ b/base/gsdevice.c @@ -37,6 +37,7 @@ #include "gxcspace.h" #include "gsicc_manage.h" #include "gscms.h" +#include "gxgetbit.h" /* Include the extern for the device list. */ extern_gs_lib_device_list(); @@ -236,10 +237,27 @@ gs_copyscanlines(gx_device * dev, int start_y, byte * data, uint size, uint count = size / line_size; uint i; byte *dest = data; + gs_int_rect rect; + gs_get_bits_params_t params; - for (i = 0; i < count; i++, dest += line_size) { - int code = (*dev_proc(dev, get_bits)) (dev, start_y + i, dest, NULL); + rect.p.x = 0; + rect.q.x = dev->width; + params.x_offset = 0; + params.raster = bitmap_raster(dev->width * dev->color_info.depth); + for (i = 0; i < count; i++, dest += line_size) { + int code; + + rect.p.y = start_y+i; + rect.q.y = start_y+i+1; + + params.options = (GB_ALIGN_ANY | + GB_RETURN_COPY | + GB_OFFSET_0 | + GB_RASTER_STANDARD | GB_PACKING_CHUNKY | + GB_COLORS_NATIVE | GB_ALPHA_NONE); + params.data[0] = dest; + code = (*dev_proc(dev, get_bits_rectangle))(dev, &rect, ¶ms, NULL); if (code < 0) { /* Might just be an overrun. */ if (start_y + i == dev->height) |