DirectFB 重要概念

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.

[ edit ]

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.

[ edit ]

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.

[ edit ]

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.

[ edit ]

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.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值