[Pixman] performance of bilinear_interpolation

Maksim Lin maks at manichord.com
Thu Sep 12 18:56:42 PDT 2013


As a followup, after doing more testing, I've discovered the issue
seems to be only on some devices the slow apth is being taken.

For instance testing using a Allwinner A10 arm SoC based tablet, the
slow bits_image_fetch_bilinear_affine_pad_x8r8g8b8() is *not* called
and instead I see:

gfxContext::Fill
    |->pixman_composite_src_8888_8888_asm_neon

in the profiling trace for firefox
(http://people.mozilla.org/~bgirard/cleopatra/#report=5a5dc3cbb5a3cc9b9173ac125f720330a2eeb8d3)

And even on devices such as the Nexus10 (and I've now seen this on the
tegra based Nexus7) pixman_composite_src_8888_8888_asm_neon *is*
called for some gfxContext:Fill operations, but not others, hence the
slow performance on those devices.

This leads me to think that its only for some operations that the
runtime check to see if accelerated functions are available is
failing.
Would anyone be knwo why this would be? or perhaps be able to poitn me
to the code where these runtime checks happen to see if I can debug
why the checks sometimes don't work?

I'm also trying to get profiling working with android x86 devices,
which is actually the end goal for me with this, as its on androidx86
that I need to deploy to and need to get performance improved. I'm
guessing that in the android x86 case, there would be SSE2/3 optimised
versions of functions that should be called?

thanks,
Maks.


On Wed, Sep 11, 2013 at 5:07 PM, Maksim Lin <maks at manichord.com> wrote:
> Hi,
>
> I'm working on finding out the cause of poor drawing performance of
> Firefox on android:
> https://bugzilla.mozilla.org/show_bug.cgi?id=911882
>
> The html causing the problem is essentially doing a image translation:
> http://manichord.com/opensign/ffdebug/ffscroll.html
>
> Profiling with the firefox profiler gave me this:
> http://people.mozilla.org/~bgirard/cleopatra/#report=16311253e5a8e996ac4e7734985e55f44197a203
>
> and that seems to point pretty much to
> bits_image_fetch_bilinear_affine() being the bottle-neck.
>
> Now I realise this has been kind-of asked about previously, back in
> feb 2011, in the context of speeding up scaling in cairo:
> http://www.mail-archive.com/pixman@lists.freedesktop.org/msg00921.html
>
> and in that response Siarhei pointed out about his attached patch,
> that it doesn't make much sense to only improve bilinear_interpolation
> as it would only make things approx 2x faster than C but in my current
> situation I would be very glad to even have that 2x improvement in
> performance, at least to start with.
>
> Unfortunately I havn't been able to get Siarhei's patch to compile in
> the pixman shipped in firefox (from current moz-central hg repo), with
> gcc complaining about it not liking thumb mode instructions:
> http://pastebin.mozilla.org/3023188
> to test out if it really would speed up my test case.
>
> I also realise that the scaling issue was addressed by a set of
> patches that Siarhei submitted and that then went into pixman and then
> on into firefox but I wanted to ask is something simliar is possible
> to now also speed up bits_image_fetch_bilinear_affine with Neon for
> arm too?
>
> And sorry in advance if I have got any of the pieces of this mixed up,
> I'm pretty new to all this.
>
> thanks,
> Maks.


More information about the Pixman mailing list