[Pixman] pixman on iOS

Ben Avison bavison at riscosopen.org
Thu Apr 23 17:46:27 PDT 2015

On Fri, 24 Apr 2015 00:02:53 +0100, cu <cairouser at yahoo.com> wrote:

> I'll bring up an old topic as the issue came up again. I have been using
> an old version of Pixman (0.24 I believe) with manual assembly
> optimizations that someone posted here. It's been a couple of years
> since it was posted. That version compiles on armv7 and is fairly fast.


I don't know all that much about iOS, but as I've done a lot of work on
the ARM support I'll answer what I can...

> As of June Apple requires apps to support both armv7 and arm64. I was
> able to compile current pixman for both architectures without Neon (or
> any other) optimizations. It appears that Neon optimizations for Pixman
> are still not working on iOS. Without these optimizations rendering is
> painfully slow.
> - Is there an optimized version of Pixman for arm64/iOS (or, better yet,
> for iOS in general)?

Unless someone has forked Pixman somewhere else, then no, there is no
special support for AArch64. The existing ARMv6 and ARMv7 optimisations
are all hand-coded assembly, so can only be built for the AArch32
instruction set. If you run an ARMv8 in AArch32 state, then I would
expect the ARMv6 and ARMv7 optimisations to still work - in AArch32
state, ARMv8 is only incrementally different from ARMv7 - but I have a
feeling that Apple only run their ARMv8 chips in AArch64 state (BICBW).

There is still code in Pixman, first added at 0.24, to determine which
ARM features are available when building for iOS - it's just in
pixman-arm.c now rather than pixman-cpu.c. However it makes no attempt to
factor in the AArch32/AArch64 state before enabling the ARMv6 and ARMv7
optimisations. You'd also need some magic in the build system so that it
doesn't even attempt to assemble any of the AArch32 assembly source files
in an AArch64 build.

If you're having trouble even building the ARM optimisations for AArch32,
you might want to try building intermediate versions of Pixman until you
can narrow down where it stopped working.

Hope this helps,

More information about the Pixman mailing list