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

« back to all changes in this revision

Viewing changes to src/gxccache.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: gxccache.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: gxccache.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* Fast case character cache routines for Ghostscript library */
16
16
#include "memory_.h"
17
17
#include "gx.h"
36
36
#include "gxhttile.h"
37
37
 
38
38
/* Forward references */
39
 
private byte *compress_alpha_bits(const cached_char *, gs_memory_t *);
 
39
static byte *compress_alpha_bits(const cached_char *, gs_memory_t *);
40
40
 
41
41
/* Define a scale factor of 1. */
42
 
private const gs_log2_scale_point scale_log2_1 =
 
42
static const gs_log2_scale_point scale_log2_1 =
43
43
{0, 0};
44
44
 
45
45
void
223
223
            return 0;
224
224
    }
225
225
    log2_scale.x = log2_scale.y = 1;
226
 
    cc = gx_alloc_char_bits(font->dir, NULL, NULL, 
 
226
    code = gx_alloc_char_bits(font->dir, NULL, NULL, 
227
227
                (ushort)(bbox.q.x - bbox.p.x), (ushort)(bbox.q.y - bbox.p.y), 
228
 
                &log2_scale, 1);
 
228
                &log2_scale, 1, &cc);
 
229
    if (code < 0)
 
230
        return code;
229
231
    if (cc == 0)
230
232
        return 0;
231
233
    /* Success.  Make the cache entry. */
313
315
        code = gx_effective_clip_path(pgs, &pcpath);
314
316
        if (code < 0)
315
317
            return code;
316
 
        gx_make_clip_device(&cdev, gx_cpath_list(pcpath));
317
 
        cdev.target = imaging_dev;
 
318
        gx_make_clip_device_on_stack(&cdev, pcpath, imaging_dev);
318
319
        imaging_dev = (gx_device *) & cdev;
319
 
        (*dev_proc(imaging_dev, open_device)) (imaging_dev);
320
320
        if_debug0('K', "[K](clipping)\n");
321
321
    }
322
322
    gx_set_dev_color(pgs);
471
471
 * Compress a mask with 2 or 4 bits of alpha to a monobit mask.
472
472
 * Allocate and return the address of the monobit mask.
473
473
 */
474
 
private byte *
 
474
static byte *
475
475
compress_alpha_bits(const cached_char * cc, gs_memory_t * mem)
476
476
{
477
477
    const byte *data = cc_const_bits(cc);