No announcement yet.

Pixman 0.28 Packs In Major Features

  • Filter
  • Time
  • Show
Clear All
new posts

  • Pixman 0.28 Packs In Major Features

    Phoronix: Pixman 0.28 Packs In Major Features

    The Pixman rendering library is out with a major new release that presents several interesting new features...

  • #2
    Improvements from the bilinear scaling code are written up here:,75_laptop/

    HTML5 stuff looks like it's significantly faster on ARM/iwMMX now.


    • #3
      I've had to wait a while for libpixman 0.28.2 to be added to Ubuntu's xorg-edgers PPA, but finally....

      Since this pixman release mentions Faster bilinear scaling on iwMMX, Loongson _and_ MMX, as well as Faster scaling in general... , I decided to test it on an ancient Athlon XP 2700+ (has MMX and SSE, but not SSE2). I installed cairo-perf-utils to get cairo-perf-trace but I was unable to uncompress the .lzma files I had downloaded from so instead I opened Firefox 17.0.1 and ran the Asteroids HTML5 Canvas 2D Rendering and JavaScript Benchmark at

      Asteroids results on Ubuntu 12.04:

      Before (libpixman-1-0 0.24.4-1) - score: 295, FPS: 7
      After (libpixman-1-0 0.28.2-0ubuntu1~xedgers~precise1) - score: 320, FPS: 7

      So an 8.5% increase. I'm not sure if that is significant or not.


      • #4
        Originally posted by madbiologist View Post
        Before (libpixman-1-0 0.24.4-1) - score: 295, FPS: 7
        After (libpixman-1-0 0.28.2-0ubuntu1~xedgers~precise1) - score: 320, FPS: 7

        So an 8.5% increase. I'm not sure if that is significant or not.
        Considering that this test is about "commonly used operations in HTML5 games: drawImage, drawImage scaling, alpha, composition, shadows and text functions", which is a bit more than just scaling, the improvement you got might be not too bad.

        But to get a better idea where the time is spent, it makes sense to profile this use case. For the start, on ARM Cortex-A8 1GHz with firefox17 (compiled to use system pixman and cairo libraries instead of mozilla's internal copies) and "gfx.xrender.enabled" set to "false" in about:config, I'm getting the following scores in the same asteroids benchmark:
        ARM Cortex-A8 1GHz:
        Benchmark Score: 197
        Average FPS: 5
        And profiling it with "perf record -p `pidof firefox`" while running the test, results in the following overall statistics:
        $ perf report -s dso
             3.49%  firefox                    
             1.63%  [kernel.kallsyms]          
             0.41%  [unknown]
        Taking a look at the distribution of time spent in different libraries, we see that pixman is not the biggest contributor here.

        And for just pixman alone, we get the following:
        $ perf report | grep libpixman
             4.93%  firefox        [.] pixman_composite_over_8888_8888_asm_neon
             2.98%  firefox        [.] pixman_composite_src_8888_8888_asm_neon
             2.14%  firefox        [.] pixman_composite_src_x888_8888_asm_neon
             2.06%  firefox        [.] pixman_scaled_bilinear_scanline_8888_8_8888_OVER_asm_neon
             0.44%  firefox        [.] pixman_composite_src_n_8888_asm_neon
             0.41%  firefox        [.] pixman_composite_over_n_8_8888_asm_neon
             0.29%  firefox        [.] pixman_image_composite32
             0.29%  firefox        [.] fast_composite_scaled_bilinear_neon_8888_8_8888_pad_OVER
             0.29%  firefox        [.] analyze_extent
             0.27%  firefox        [.] pixman_composite_add_n_8_8888_asm_neon
             0.23%  firefox        [.] pixman_transform_point
             0.17%  firefox        [.] _pixman_image_validate
             0.14%  firefox        [.] compute_transformed_extents
        The scaling operations are not particularly heavy here. Mostly it's just simple non-scaled alpha blending and blitting.

        If you are also wondering about what is done by libcairo:
        $ perf report | grep libcairo
             4.91%  firefox        [.] _cairo_tor_scan_converter_generate
             1.11%  firefox        [.] _fill_xrgb32_lerp_opaque_spans
             0.72%  firefox        [.] cell_list_render_edge
             0.64%  firefox        [.] _cairo_spline_decompose_into
             0.60%  firefox        [.] cairo_matrix_transform_point
             0.44%  firefox        [.] _cairo_tor_scan_converter_add_polygon
             0.35%  firefox        [.] .divsi3_skip_div0_test
             0.34%  firefox        [.] _cairo_bentley_ottmann_tessellate_polygon
             0.30%  firefox        [.] 0x0000e0b4
             0.25%  firefox        [.] __udivsi3
             0.25%  firefox        [.] outer_join
             0.25%  firefox        [.] compute_face
             0.20%  firefox        [.] _cairo_matrix_to_pixman_matrix_offset
        You can also try a similar profiling exercise on your hardware


        • #5
          OK, I had to use sudo to get perf to do anything useful (otherwise it refused to run with an error about kernel symbols). And "perf report -s dso" just results in "perf: Segmentation fault". perf report works though

          I think my initial test may have been meaningless. I did not realise that Firefox has internal copies of pixman and cairo and did not recompile it to use the system versions. That probably explains why perf report just shows:

          55.14%  DNS Res~ver #37                    [.] 0xf4aa9c
           17.13%  DNS Res~ver #37       [.] 0x72c8
            5.74%  DNS Res~ver #37  [kernel.kallsyms]            [k] 0xc1035df8
            5.46%  DNS Res~ver #37  firefox                      [.] 0xc930
            1.77%  DNS Res~ver #37                [.] 0x1235b22d
            1.73%  DNS Res~ver #37                 [.] 0x7d710
            1.34%  DNS Res~ver #37       [.] FcStrCmpIgnoreCase
            1.27%  DNS Res~ver #37       [.] FcConfigSubstituteWit
            0.80%  DNS Res~ver #37           [.] pthread_mutex_lock 
            0.34%  DNS Res~ver #37                    [.] vp8_idct_dequant_dc_f
            0.32%  DNS Res~ver #37       [.] FcUtf8ToUcs4
            0.31%  DNS Res~ver #37  firefox                      [.] _start
          and why perf report | grep libpixman just shows:

          [kernel.kallsyms] with build id dd11b20eac2611858a619b764b7796765d2ad877 not found, continuing without symbols
          Failed to open /tmp/, continuing without symbols
               0.00%  DNS Res~ver #37        [.] pixman_image_composite32
          I was originally hoping to benchmark poppler as well, but as I said in my previous post, I was unable to uncompress the .lzma files I had downloaded from the cairo-traces site
          I've just worked out that I had to use the "plain" link in the far right column, instead of right-clicking on filename and selecting "Save Link As..." I'll report back how that goes.


          • #6

            OK, it still doesn't work. I got the file uncompressed this time, but cairo-perf-trace just gives:

            Error: Found no traces in 'cairo-traces:/usr/src/cairo-traces:/usr/share/cairo-traces'.
            Have you cloned the cairo-traces repository and uncompressed the traces?
            git clone git://
            cd cairo-traces && make
            Or set the env.var CAIRO_TRACE_DIR to point to your traces?

            ls -l /usr/share/cairo-traces gives:

            total 42860
            -r-------- 1 user user 43886133 Jan 9 00:29 poppler

            I tried setting the environment variable (set env CAIRO_TRACE_DIR /usr/share/cairo-traces) anyway but it made no difference. Ubuntu 12.04 here.