~ubuntu-branches/ubuntu/precise/cairo/precise-proposed

« back to all changes in this revision

Viewing changes to src/cairo-ps-surface.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-01-03 16:47:46 UTC
  • mfrom: (28.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20110103164746-2arbsh0o4defgd8u
Tags: 1.10.2-1ubuntu1
* Resynchronize on Debian, the remaining delta for ubuntu is:
* debian/patches/server_side_gradients.patch:
  - don't use server side gradients, most drivers don't handle those and are
    really slow, should workaround performances issues for ati and nouveau
* debian/patches/cairo-lp-680628.patch: 
  - git backport to fix pdf printing speed issues (LP #680628).
* debian/libcairo2.symbols:
  Fix build failure with -flto (adding optional symbol).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1303
1303
                           double                height_in_points)
1304
1304
{
1305
1305
    cairo_ps_surface_t *ps_surface = NULL;
 
1306
    cairo_status_t status;
1306
1307
 
1307
1308
    if (! _extract_ps_surface (surface, TRUE, &ps_surface))
1308
1309
        return;
1312
1313
    cairo_matrix_init (&ps_surface->cairo_to_ps, 1, 0, 0, -1, 0, height_in_points);
1313
1314
    _cairo_pdf_operators_set_cairo_to_pdf_matrix (&ps_surface->pdf_operators,
1314
1315
                                                  &ps_surface->cairo_to_ps);
 
1316
    status = _cairo_paginated_surface_set_size (ps_surface->paginated_surface,
 
1317
                                                width_in_points,
 
1318
                                                height_in_points);
 
1319
    if (status)
 
1320
        status = _cairo_surface_set_error (surface, status);
1315
1321
}
1316
1322
 
1317
1323
/**
2370
2376
                                 "  /Width %d def\n"
2371
2377
                                 "  /Height %d def\n"
2372
2378
                                 "  /BitsPerComponent %d def\n"
2373
 
                                 "  /Decode [ 0 1 0 1 0 1 ] def\n",
 
2379
                                 "  /Decode [ %s ] def\n",
2374
2380
                                 info.num_components == 1 ? "DeviceGray" : "DeviceRGB",
2375
2381
                                 info.width,
2376
2382
                                 info.height,
2377
 
                                 info.bits_per_component);
 
2383
                                 info.bits_per_component,
 
2384
                                 info.num_components == 1 ? "0 1" : "0 1 0 1 0 1");
2378
2385
 
2379
2386
    if (surface->use_string_datasource) {
2380
2387
        _cairo_output_stream_printf (surface->stream,
3502
3509
    if (unlikely (status))
3503
3510
        return status;
3504
3511
 
3505
 
    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
3506
 
        return CAIRO_STATUS_SUCCESS;
3507
 
 
3508
3512
    if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
3509
3513
        return _cairo_ps_surface_analyze_operation (surface, op, source, &extents.bounded);
3510
3514
 
3540
3544
        if (unlikely (status))
3541
3545
            return status;
3542
3546
 
3543
 
        _cairo_output_stream_printf (stream, "%d %d %d %d rectfill\n",
3544
 
                                     extents.bounded.x, extents.bounded.y,
3545
 
                                     extents.bounded.width, extents.bounded.height);
 
3547
        _cairo_output_stream_printf (stream, "0 0 %f %f rectfill\n",
 
3548
                                     surface->width, surface->height);
3546
3549
    }
3547
3550
 
3548
3551
    return CAIRO_STATUS_SUCCESS;
3573
3576
    if (unlikely (status))
3574
3577
        return status;
3575
3578
 
3576
 
    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
3577
 
        return CAIRO_STATUS_SUCCESS;
3578
 
 
3579
3579
    /* use the more accurate extents */
3580
3580
    if (extents.is_bounded) {
3581
3581
        status = _cairo_path_fixed_stroke_extents (path, style,
3637
3637
    if (unlikely (status))
3638
3638
        return status;
3639
3639
 
3640
 
    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
3641
 
        return CAIRO_STATUS_SUCCESS;
3642
 
 
3643
3640
    /* use the more accurate extents */
3644
3641
    if (extents.is_bounded) {
3645
3642
        _cairo_path_fixed_fill_extents (path,