Pregunta

I have a simple clutter-box2d application(written in C) which shows a few images falling down. It runs really slow on my arm target(ARMv7) , Oprofile shows following consuming a lot of CPU

libpixman-1.so.0.24.4

How do I get around this, I have EGL and X11 backends enabled but still somehow pixman(Cairo image backend uses pixman library as a software rasteriser.) is getting used and the application is rendered slow.

What can I do to get GPU acceleration for my clutter-box2d application. Has anyone faced similar issue?

For ARM config options used are

CLUTTER

./configure --build=i686-linux --host=armv7-none-linux-gnueabi 
              CC=armv7-none-linux-gnueabi-gcc 
              CXX=armv7-none-linux-gnueabi-g++ 
              AR=armv7-none-linux-gnueabi-ar 
              RANLIB=armv7-none-linux-gnueabi-ranlib 
              --disable-glibtest --with-x --disable-rpath --enable-xinput=no 
              --enable-shared --enable-deprecated=no --enable-egl-backend=yes 
              --enable-x11-backend=yes --prefix=/home/XYZ/install_all

CLUTTER-BOX2D

./configure --build=i686-linux --host=armv7-none-linux-gnueabi 
              CC=armv7-none-linux-gnueabi-gcc 
              CXX=armv7-none-linux-gnueabi-g++ 
              AR=armv7-none-linux-gnueabi-ar 
              RANLIB=armv7-none-linux-gnueabi-ranlib 
              --enable-shared --enable-introspection=no 
              --prefix=/home/XYZ/install_all 

COGL

./configure --build=i686-linux --host=armv7-none-linux-gnueabi 
              CC=armv7-none-linux-gnueabi-gcc 
              CXX=armv7-none-linux-gnueabi-g++ 
              --prefix=/home/XYZ/install_all --enable-gl=no --enable-gles2=yes 
              --enable-xlib-egl-platform=yes --disable-rpath 

JSON-GLIB

./configure --host=armv7-none-linux-gnueabi 
              CC=armv7-none-linux-gnueabi-gcc 
              CXX=armv7-none-linux-gnueabi-g++ 
              --enable-introspection=no --disable-glibtest 
              --prefix=/home/XYZ/install_all

LIB-PNG
./configure --build=i686-linux --host=armv7-none-linux-gnueabi 
              CC=armv7-none-linux-gnueabi-gcc 
              CXX=armv7-none-linux-gnueabi-g++ 
              --prefix=/home/XYZ/install_all
¿Fue útil?

Solución

Clutter does not use Cairo internally. Clutter-Box2D only updates the location of the actors to match the internally computed world.

Are you using Cairo to draw the contents of the actors inside the Box2D world?

Are you redrawing the contents for every frame?

If neither of those questions have a positive answer, are you even sure your platform has supported GL or GLES drivers?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top