Chinaunix

标题: What is the role of WindowManager in android frame [打印本页]

作者: goandroid    时间: 2009-03-29 11:25
标题: What is the role of WindowManager in android frame
I understand Windows manager is a separate service in the android
framework. I am wondering whether Window manager is like X Server or
not.
Lets say I have an activity with many views in it.
When an activity changes screen (i.e paint screen), Does it directly
draw on the drawing surface or request Window manager to draw on the
activity's behalf?
>>>
The window manager creates surfaces for the application, and applications
draw directly into those surfaces without going through the window manager.
>>>>>>
A surface is basically a pointer to block of memory. Why does a
separate process (i.e. Window Manager) have to create it? Why not the
activity itself create it?
Does Window manager need access to that memory?
If so, why?
>>>>>>>>>>>>
Because the window manager is responsible for organizing the screen,
applications don't get to decide that.  The window manager allocates
surfaces and decides where they go and how they are layered; it never
touches their bits, which is up to the application.



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85805/showart_1883499.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2