Hi All,

  I am tring to analyse the android graphics. After reading the source
in android, I still have no idea how it works. Here I list a few
questions. Any reply will be welcome.

1.  what is the relationship between ViewRoot and View class. As my
understanding, in each window, there is only one ViewRoot, even though
there are mutil View or ViewGroup shows in that window. The showing
route is started by WindowManagerService as below:
ViewRoot::handleAppVisibility()-->ViewRoot::handleAppVisibility()--
>ViewRoot::performTraversals()��-->ViewRoot::draw()-->view::draw()
In view::draw, it will draw its data to its canvas and dispatch draw
calling to its children's view.
Is all view ,its children's view and their viewRoot share the same
canvas for draw?


2. What is the relationship within View, canvas and Surface.  To my
thinking, every view will be attached a canvas and surface. And a
canvas hold the bitmap for view, will the actual view drawn data will
be in canvas' bitmap. After View draw its data to canvas, ViewRoot
will call surface.unlockCanvasAndPost(canvas) to schedule
surfaceFlinger::composeSurfaces() which do the actually display to
display panel.

Where is the drawn data in canvas transfer to surface front buffer or
backbuffer? I cannot find the code to do that.

Do different views within the same ViewRoot share the same surface?

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to