[cairo] Re: [poppler] Re: poppler profiling on geode with cairo backend

Jeff Muizelaar jeff at infidigm.net
Thu Nov 9 07:40:52 PST 2006


On Thu, Nov 09, 2006 at 10:19:58AM -0500, Behdad Esfahbod wrote:
> Is it a Type3 font?  Type3 fonts are drawn as path in poppler currently
> IIRC.  Can you post a test PDF and driver code?

No, it isn't a type3 font.

You can get a test pdf at:
http://people.freedesktop.org/~jrmuizel/plain-text.pdf

The driver code that I am using is just from the poppler test suite.
ie.
cvs -d :pserver:anoncvs at cvs.freedesktop.org:/cvs/poppler co poppler

with something like this applied:

diff -u -r1.8 test-poppler.c
--- test-poppler.c      25 Oct 2006 19:48:13 -0000      1.8
+++ test-poppler.c      9 Nov 2006 15:35:13 -0000
@@ -100,7 +100,7 @@

   pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
   gdk_pixbuf_fill (pixbuf, 0x00106000);
-  poppler_page_render_to_pixbuf (page, 0, 0, width, height, 1.0, 0, pixbuf);
+  poppler_page_render_to_pixbuf (page, 0, 0, width, height, 1.1, 0, pixbuf);

   ret = gdk_pixbuf_compare(pixbuf, page_name);

Here are some back traces:

from clip:

#2  0x40572da2 in pixman_compositeGeneral (op=PIXMAN_OPERATOR_IN, pSrc=0x807ad28,
    pMask=0x807ae88, pDst=0x8078f98, xSrc=0, ySrc=0, xMask=0, yMask=0, xDst=0, yDst=0,
    width=5, height=924) at fbcompose.c:3927
#3  0x40560d00 in _cairo_pixman_composite (op=PIXMAN_OPERATOR_IN, pSrc=0x807ad28,
    pMask=0x807ae88, pDst=0x8078f98, xSrc=0, ySrc=0, xMask=0, yMask=0, xDst=0, yDst=0,
    width=655, height=924) at fbpict.c:1819
#4  0x4052db9b in _cairo_image_surface_composite_trapezoids (op=CAIRO_OPERATOR_IN,
    pattern=0xbffff530, abstract_dst=0x807a688, antialias=134721160, src_x=0, src_y=0,
    dst_x=0, dst_y=0, width=655, height=924, traps=0x807a800, num_traps=1)
    at cairo-image-surface.c:1016
#5  0x40536f83 in _cairo_surface_composite_trapezoids (op=CAIRO_OPERATOR_IN,
    pattern=0xbffff530, dst=0x807a688, antialias=CAIRO_ANTIALIAS_DEFAULT, src_x=0,
    src_y=0, dst_x=0, dst_y=0, width=655, height=924, traps=0x807a800, num_traps=1)
    at cairo-surface.c:1459
#6  0x40528bfa in _cairo_clip_intersect_mask (clip=0x80789d4, traps=0xbffff5e0,
    antialias=CAIRO_ANTIALIAS_DEFAULT, target=0x8078790) at cairo-clip.c:411
#7  0x40528e11 in _cairo_clip_clip (clip=0x80789d4, path=0x8078880,
    fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0.10000000000000001,
    antialias=CAIRO_ANTIALIAS_DEFAULT, target=0x8078790) at cairo-clip.c:496
#8  0x4052b6bc in _cairo_gstate_clip (gstate=0x0, path=0x403198c0) at cairo-gstate.c:1140
#9  0x40526392 in *INT_cairo_clip_preserve (cr=0x8078878) at cairo.c:2193
#10 0x40526344 in cairo_clip (cr=0x8078878) at cairo.c:2160
#11 0x401e2745 in CairoOutputDev::clip (this=0x8069580, state=0x403198c0)
    at CairoOutputDev.cc:351


and from show glyphs:

#2  0x40572da2 in pixman_compositeGeneral (op=PIXMAN_OPERATOR_ADD, pSrc=0x807da50,
    pMask=0x8099fd0, pDst=0x80908f0, xSrc=114, ySrc=225, xMask=0, yMask=0, xDst=0,
    yDst=0, width=5, height=41) at fbcompose.c:3927
#3  0x40560d00 in _cairo_pixman_composite (op=PIXMAN_OPERATOR_ADD, pSrc=0x807da50,
    pMask=0x8099fd0, pDst=0x80908f0, xSrc=114, ySrc=225, xMask=0, yMask=0, xDst=0,
    yDst=0, width=281, height=41) at fbpict.c:1819
#4  0x4052d806 in _cairo_image_surface_composite (op=CAIRO_OPERATOR_ADD,
    src_pattern=0xbfffef40, mask_pattern=0xbfffee30, abstract_dst=0x8096b70, src_x=114,
    src_y=225, mask_x=0, mask_y=0, dst_x=0, dst_y=0, width=281, height=41)
    at cairo-image-surface.c:850
#5  0x40536617 in _cairo_surface_composite (op=CAIRO_OPERATOR_ADD, src=0xbfffef40,
    mask=0xbfffee30, dst=0x8096b70, src_x=114, src_y=225, mask_x=0, mask_y=0, dst_x=0,
    dst_y=0, width=281, height=41) at cairo-surface.c:1113
#6  0x40534348 in _cairo_scaled_font_show_glyphs (scaled_font=0x807c750,
    op=CAIRO_OPERATOR_ADD, pattern=0xbfffef40, surface=0x8096b70, source_x=114,
    source_y=225, dest_x=0, dest_y=0, width=281, height=41, glyphs=0x807c938,
    num_glyphs=12) at cairo-scaled-font.c:997
#7  0x40538faf in _cairo_surface_old_show_glyphs_draw_func (closure=0xbffff180,
    op=CAIRO_OPERATOR_ADD, src=0xbfffef40, dst=0x8096b70, dst_x=114, dst_y=225,
    extents=0xbffff178) at cairo-surface-fallback.c:890
#8  0x40537dcf in _create_composite_mask_pattern (mask_pattern=0x0, clip=0x807adac,
    draw_func=0x40538e50 <_cairo_surface_old_show_glyphs_draw_func>, draw_closure=0x0,
    dst=0x0, extents=0xbffff178) at cairo-surface-fallback.c:127
#9  0x40537e80 in _clip_and_composite_with_mask (clip=0x0, op=CAIRO_OPERATOR_CLEAR,
    src=0x0, draw_func=0, draw_closure=0x0, dst=0x8078790, extents=0xbffff178)
    at cairo-surface-fallback.c:165
#10 0x40538390 in _clip_and_composite (clip=0x807adac, op=CAIRO_OPERATOR_OVER,
    src=0xbffff240, draw_func=0x40538e50 <_cairo_surface_old_show_glyphs_draw_func>,
    draw_closure=0xbffff180, dst=0x8078790, extents=0xbffff178)
    at cairo-surface-fallback.c:379
#11 0x405390cd in _cairo_surface_fallback_show_glyphs (surface=0x8078790,
    op=CAIRO_OPERATOR_OVER, source=0x0, glyphs=0x807c938, num_glyphs=12,
    scaled_font=0x807c750) at cairo-surface-fallback.c:941
#12 0x405376ae in _cairo_surface_show_glyphs (surface=0x8078790, op=CAIRO_OPERATOR_OVER,
    source=0x5, glyphs=0x807c938, num_glyphs=12, scaled_font=0x807c750)
#13 0x4052bd06 in _cairo_gstate_show_glyphs (gstate=0x807ad28, glyphs=0x807ae70,
    num_glyphs=12) at cairo-gstate.c:1498
#14 0x40526b07 in cairo_show_glyphs (cr=0x8078878, glyphs=0x403198c0, num_glyphs=0)
    at cairo.c:2713
#15 0x401e2a87 in CairoOutputDev::endString (this=0x8069580, state=0x0)
    at CairoOutputDev.cc:412
#16 0x400da8af in Gfx::doShowText (this=0x8078b08, s=0x8078d80) at Gfx.cc:2868


#2  0x40572da2 in pixman_compositeGeneral (op=PIXMAN_OPERATOR_IN, pSrc=0x8078f98,
    pMask=0x0, pDst=0x80908f0, xSrc=114, ySrc=225, xMask=0, yMask=0, xDst=0, yDst=0,
    width=5, height=41) at fbcompose.c:3927
#3  0x40560d00 in _cairo_pixman_composite (op=PIXMAN_OPERATOR_IN, pSrc=0x8078f98,
    pMask=0x0, pDst=0x80908f0, xSrc=114, ySrc=225, xMask=0, yMask=0, xDst=0, yDst=0,
    width=281, height=41) at fbpict.c:1819
#4  0x4052d806 in _cairo_image_surface_composite (op=CAIRO_OPERATOR_IN,
    src_pattern=0xbfffef40, mask_pattern=0x0, abstract_dst=0x8096b70, src_x=114,
    src_y=225, mask_x=0, mask_y=0, dst_x=0, dst_y=0, width=281, height=41)
    at cairo-image-surface.c:850
#5  0x40536617 in _cairo_surface_composite (op=CAIRO_OPERATOR_IN, src=0xbfffef40,
    mask=0x0, dst=0x8096b70, src_x=114, src_y=225, mask_x=0, mask_y=0, dst_x=0, dst_y=0,
    width=281, height=41) at cairo-surface.c:1113
#6  0x405288a2 in _cairo_clip_combine_to_surface (clip=0x807adac,
    op=CAIRO_OPERATOR_CLEAR, dst=0x0, dst_x=114, dst_y=225, extents=0x72)
    at cairo-clip.c:254
#7  0x40537e35 in _create_composite_mask_pattern (mask_pattern=0x0, clip=0x807adac,
    draw_func=0x40538e50 <_cairo_surface_old_show_glyphs_draw_func>, draw_closure=0x0,
    dst=0x0, extents=0xbffff178) at cairo-surface-fallback.c:135
#8  0x40537e80 in _clip_and_composite_with_mask (clip=0x0, op=CAIRO_OPERATOR_CLEAR,
    src=0x0, draw_func=0, draw_closure=0x0, dst=0x8078790, extents=0xbffff178)
    at cairo-surface-fallback.c:165
#9  0x40538390 in _clip_and_composite (clip=0x807adac, op=CAIRO_OPERATOR_OVER,
    src=0xbffff240, draw_func=0x40538e50 <_cairo_surface_old_show_glyphs_draw_func>,
    draw_closure=0xbffff180, dst=0x8078790, extents=0xbffff178)
    at cairo-surface-fallback.c:379
#10 0x405390cd in _cairo_surface_fallback_show_glyphs (surface=0x8078790,
    op=CAIRO_OPERATOR_OVER, source=0x0, glyphs=0x807c938, num_glyphs=12,
    scaled_font=0x807c750) at cairo-surface-fallback.c:941
#11 0x405376ae in _cairo_surface_show_glyphs (surface=0x8078790, op=CAIRO_OPERATOR_OVER,
    source=0x5, glyphs=0x807c938, num_glyphs=12, scaled_font=0x807c750)
    at cairo-surface.c:1847
#12 0x4052bd06 in _cairo_gstate_show_glyphs (gstate=0x807ad28, glyphs=0x807ae70,
    num_glyphs=12) at cairo-gstate.c:1498
#13 0x40526b07 in cairo_show_glyphs (cr=0x8078878, glyphs=0x403198c0, num_glyphs=0)
    at cairo.c:2713
#14 0x401e2a87 in CairoOutputDev::endString (this=0x8069580, state=0x0)
    at CairoOutputDev.cc:412
#15 0x400da8af in Gfx::doShowText (this=0x8078b08, s=0x8078d80) at Gfx.cc:2868


I'll try to write a small test case demonstrating the problem when I get
time. (Probably not until the weekend.)

-Jeff


More information about the cairo mailing list