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. ANDROID_PROPERTY_WORKSPACE

I tried to add the new property file (same as build.prop format) such
as music.prop to the /sys directory. I studied the code in the
System_property.c as following function, my questions are as following

1. What is __system_property_area__? I saw this is init by
ANDROID_PROPERTY_WORKSPACE.
2. Can I add new prop file? if yes, which directory?


const prop_info *__system_property_find(const char *name)
{
    prop_area *pa = __system_property_area__;
    unsigned count = pa->count;
    unsigned *toc = pa->toc;
    unsigned len = strlen(name);
    prop_info *pi;

    while(count--) {
        unsigned entry = *toc++;
        if(TOC_NAME_LEN(entry) != len) continue;

        pi = TOC_TO_INFO(pa, entry);
        if(memcmp(name, pi->name, len)) continue;

        return pi;
    }

    return 0;
}

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

2. Need for backup functionality

So I've come to a need to backup data in my application, so a user can
safely restore the important data. I had an idea about how to go about
this, but relatively it's a lot of work just to test if it would work,
so it'd be nice to get a thumbs up or thumbs down to my plan from
someone who has tried it, or an alternate way to do it.

I was thinking that I could compose an email that the user could send
to himself with a link in it like: content://<mycontentprovider>/databackup/<the
data, possibly in a delimited format (comma-separated)>

And when the user would click the link it would pull up my content
provider that would take all the data from the link and restore it
into my database.

Alternate idea: save the database file to another machine or email,
but I wouldn't know how to go about doing this. Can I make my
application attach the database to an email that could be imported? Is
it easy to make the user hook up a USB cord to a computer for them to
manually backup and reload the database file?
--~--~---------~--~----~------------~-------~--~----~

3. LocationProvider accuracy

4. Need some help with Premature end of file.

5. Porting android to EVM

6. Which one scales with the screen... Dip, sp, px.....?

7. Are ArrayList / Hashtable's bad for gc on Android?