Chinaunix首页 | 论坛 | 博客
  • 博客访问: 128347
  • 博文数量: 22
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 225
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-15 19:03
文章分类

全部博文(22)

文章存档

2011年(1)

2010年(1)

2009年(20)

我的朋友

分类: 嵌入式

2009-11-04 17:30:32

转载自:
 

What are the relationships among the main DirectFB types?
There are several one-to-one and one-to-many relationships here:

1 IDirectFB (top-level) <--> N Screens
1 Screen <--> N Layers
1 Layer <--> 1 Primary Surface
1 Layer <--> N Windows
1 Window <--> 1 Window Surface
1 Surface <--> N Subsurfaces
The most common case is one screen with one display layer, but DFB supports multiple instances of each.

Layers and Screens
Each screen can have one or more layers. Usually, a screen will have only one, but system that support overlays may have multiple layers with the hardware letting one layer show through another.

Screens and Windows
A screen cannot directly create a window, but you can ask a screen for the ID of its primary layer, then ask the IDirectFB interface to give you an interface to that layer, then use that interface to create a window.

Surfaces and Windows
Each window has a surface associated with it; drawing to that surface isn't immediately visible on the screen, as the window manager is responsible for compositing the surfaces of the windows to the primary surface based on their update regions and the stacking order, and the window manager is notified of changes by using the Flip() method of the surface.

Surfaces and Layers
A layer also has a surface associated with it; this surface is a direct representation of the layer's screen memory. You can only access this surface when you're in exclusive mode, otherwise you need to create a window and have the window manager draw to the surface.

Retrieved from ""

 
阅读(1984) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~