问题描述:

I'm trying to build pixman-0.34.0 (http://cairographics.org/releases/) for iOS and Android.

There list of options for ./configure script:

  • --disable-libtool-lock avoid locking
  • --disable-openmp do not use OpenMP
  • --disable-loongson-mmi disable Loongson MMI fast paths
  • --disable-mmx disable x86 MMX fast paths
  • --disable-sse2 disable SSE2 fast paths
  • --disable-ssse3 disable SSSE3 fast paths
  • --disable-vmx disable VMX fast paths
  • --disable-arm-simd disable ARM SIMD fast paths
  • --disable-arm-neon disable ARM NEON fast paths
  • --disable-arm-iwmmxt disable ARM IWMMXT fast paths
  • --disable-arm-iwmmxt2 build ARM IWMMXT fast paths with -march=iwmmxt

    instead of -march=iwmmxt2

  • --disable-mips-dspr2 disable MIPS DSPr2 fast paths
  • --disable-gcc-inline-asm

    disable GNU-style inline assembler

  • --enable-static-testprogs

    build test programs as static binaries [default=no]

  • --enable-timers enable TIMER_BEGIN and TIMER_END macros [default=no]
  • --enable-gtk enable tests using GTK+ [default=auto]
  • --enable-libpng Build support for libpng (default: auto)

What is not needed for iOS and Android platforms?

网友答案:

I have built Pixman/Cairo for iOS by crafting a makefile from this mapnik one which you can find here: https://github.com/PaulWagener/mapnik-ios-framework/blob/master/Makefile

In my experience with it building it for iOS there remains to be good intrinsics support for ARM NEON instructions and as a result performance was not good for what I was doing which was blitting frames from a Cairo Surface into GLES 2. If there is a better solution for this I would be interested. Here is an older discussion on the topic however I have not been able to get this approach to work.

For Android I have heard there is good support for Cairo/Pixman and even a GLES 2 backend. Check out the makefiles in android-cairo and android-cairogles github projects. If you decide to use hardware gpu extensions (GLES) your project will lose its portability.

To answer your question directly none of those features are needed except including the libpng library most likely.

相关阅读:
Top