~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/gxifast.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: gxifast.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: gxifast.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* Fast monochrome image rendering */
16
16
#include "gx.h"
17
17
#include "memory_.h"
45
45
iclass_proc(gs_image_class_1_simple);
46
46
 
47
47
/* Use special fast logic for portrait or landscape black-and-white images. */
48
 
private irender_proc(image_render_skip);
49
 
private irender_proc(image_render_simple);
50
 
private irender_proc(image_render_landscape);
 
48
static irender_proc(image_render_skip);
 
49
static irender_proc(image_render_simple);
 
50
static irender_proc(image_render_landscape);
51
51
irender_proc_t
52
52
gs_image_class_1_simple(gx_image_enum * penum)
53
53
{
171
171
  (gx_dc_is_pure(pdc) && (pdc)->colors.pure == gx_no_color_index)
172
172
 
173
173
/* Skip over a completely transparent image. */
174
 
private int
 
174
static int
175
175
image_render_skip(gx_image_enum * penum, const byte * buffer, int data_x,
176
176
                  uint w, int h, gx_device * dev)
177
177
{
206
206
#  define INCS(stat) DO_NOTHING
207
207
#  define ADDS(stat, n) DO_NOTHING
208
208
#endif
209
 
inline private void
 
209
static inline void
210
210
fill_row(byte *line, int line_x, uint raster, int value)
211
211
{
212
212
    memset(line + (line_x >> 3), value, raster - (line_x >> 3));
213
213
}
214
 
private void
 
214
static void
215
215
image_simple_expand(byte * line, int line_x, uint raster,
216
216
                    const byte * buffer, int data_x, uint w,
217
217
                    fixed xcur, fixed x_extent, byte zero /* 0 or 0xff */ )
466
466
}
467
467
 
468
468
/* Copy one rendered scan line to the device. */
469
 
private int
 
469
static int
470
470
copy_portrait(gx_image_enum * penum, const byte * data, int dx, int raster,
471
471
              int x, int y, int w, int h, gx_device * dev)
472
472
{
526
526
 
527
527
/* Rendering procedure for a monobit image with no */
528
528
/* skew or rotation and pure colors. */
529
 
private int
 
529
static int
530
530
image_render_simple(gx_image_enum * penum, const byte * buffer, int data_x,
531
531
                    uint w, int h, gx_device * dev)
532
532
{
642
642
 
643
643
/* Rendering procedure for a 90 degree rotated monobit image */
644
644
/* with pure colors.  We buffer and then flip 8 scan lines at a time. */
645
 
private int copy_landscape(gx_image_enum *, int, int, bool, gx_device *);
646
 
private int
 
645
static int copy_landscape(gx_image_enum *, int, int, bool, gx_device *);
 
646
static int
647
647
image_render_landscape(gx_image_enum * penum, const byte * buffer, int data_x,
648
648
                       uint w, int h, gx_device * dev)
649
649
{
718
718
}
719
719
 
720
720
/* Flip and copy one group of scan lines. */
721
 
private int
 
721
static int
722
722
copy_landscape(gx_image_enum * penum, int x0, int x1, bool y_neg,
723
723
               gx_device * dev)
724
724
{