views:

100

answers:

1

Hi All,

I want to write a native application in Android for testing surfaceflinger. Is there any simple program that shows how to create surface, register buffers and post buffers on Surfaceflinger.

Many thanks in advance.

Kind Regards -Durgesh O Mishra

A: 

Look in the source code for SurfaceFlinger(of the platform you're interested in).

../frameworks/base/libs/surfaceflinger/tests/resize/resize.cpp

[platform/frameworks/base.git]/opengl/tests/gralloc/gralloc.cpp

It basically does what you describe, realize though, that these are low level native APIs and are constantly evolving in Android.

csanta