surface flinger framework and issues

by tom » Thu, 09 Apr 2009 16:08:17 GMT


Sponsored Links
 I had read the surface flinger source code in cupcake, and hope to
undertand how the android GUI system work. but now I am mixed-up
still.
and following is my understand and questions:

surfaceflinger work flow:
(1) new surfaceflingerclient(), it will createconnection(), and new a
client
(2) createsurface, it will new layer or layerblur or layerdim by z-
blend order
(3) createoverlay, if layer support overlay
(4) register buffer
(5) draw something on canvas(line, text, bitmap, rect...) which attach
above buffer
(6) post buffer

my questions now:
(1) surfaceflinger.cpp
SurfaceFlinger::createconnection() will create a client which allocate
8MB heap for manangement surface data handle(color conversion, flip,
layers).
how many client have android system? one is BootAnimation, one is test
sample overlays.cpp, one is debug CPUGUAGE, and one is WindowManager?
In fact BootAnimation will destroy when it finish, (but how it destroy
the 8MB heap?). Test sample and debug CPUGUAGE will not start for it
is not enabled.
So android system has only one surface flinger client, isn't it?
OpenGL has another client?

(2)createsurface()
each app with one window has attached one surface? or all app share
one surface?
one surfaceflinger client can create mutiple surfaces?

(3)copybit.default.so
where is the source code?

(4)surfaceflinger not support YUV format?
and it ony support RGB565?

more question and analysis will be continued,
welcome helps

thanks

tom
--~--~---------~--~----~------------~-------~--~----~



surface flinger framework and issues

by wu tony » Sat, 11 Apr 2009 14:15:33 GMT


 2009/4/10 tom <gxiao...@sohu.com>








--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


surface flinger framework and issues

by Eric Chen » Sun, 12 Apr 2009 00:38:49 GMT


 faist fooled




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Density problem on 1024x600 Honeycomb emulator

Honeycomb supports only 1280x800 WXGA resolution.
Default Density is 160.
But I noticed Motopad Slate which has 1024x600 on 7" display.

I also try to calculate the density on Motopad.
sqrt(1024^2+600^2)/7 inch = 169.53 dpi

So I tried 1024x600 on Honeycomb emulator with density 160dpi.
However, some application's edge are out of boundary, some are normal.
For example, Launcher google search widget, the bar of application
list, font of Calculator, Clock, Camera...

If I use 120dpi for density, everything is smaller but is good.

How should I set the density on this resolution?

-- 

2. Bitmap Question

Hello Group,

I was wondering how do you scale a bitmap to look good on any screen size 
(Using surfaceview and canvas). I already know the canvas width and canvas 
height. So, what would the calculation be?

Example lets say I have a picture that is 100x100 and the phone size is 
1920x1200 (just for the sake of it). Now when displaying that on the phone, 
it will look small. So, how do i scale that up to be bigger based on the 
aspect ratio or resolution. Just say the developed phone resolution was 
480x854 (so all pics was created after that res).

So, if the resolution is smaller i want to scale the bitmap down, and if it 
is bigger, i want to scale it up.

Any feedback is appreciated, thanks.

-- 

3. Android porting to hawkboard

4. [WTS] Tablet Android Eken M002

5. intents or activities run during app install/uninstall like rpm %post/%postun?

6. Apakah samsung galaxy Samsung I 5503 dpt upgrade dr Ecair ke Froyo ?

7. http pipelining