0

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
maheshg
  • 339
  • 2
  • 7
  • 17

1 Answers1

1

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?

ebassi
  • 8,648
  • 27
  • 29
  • Yes, the application redraws contents for every frame, i can see redraw calls in valgrind traces on x86. The target has supported GL and GLES drivers , but looks like my configuration settings aren't opening them up for use and thus fallback of pixman is getting used (maybe something else is happening!). I am fairly new to the graphics stack, please correct me in case anything is out of place. – maheshg Sep 19 '12 at 12:30
  • I updated the post with all config options used for compiling clutter for ARMv7, are they correct? – maheshg Sep 20 '12 at 08:18
  • I didn't ask for the application redrawing content: I asked if you're using Cairo directly for the content of your app, and I asked if you're redrawing that Cairo content every frame. – ebassi Sep 20 '12 at 08:42
  • Oh, my bad. I am not using Cairo for drawing in the application. – maheshg Sep 20 '12 at 09:06
  • When I ran the same app on x86 I dont see pixman at all in valgrind-callgrind traces, only on the arm target do i see it hogging the CPU. – maheshg Sep 20 '12 at 10:31