Layer (Layers)
Represents a separate image buffer. Most embedded devices have multiple tiers. They are blending by the hardware using the appropriate alpha value, and then displayed.
Surfaces (surface)
The reserved memory area used to hold the pixel data. DIRECTFB's drawing and blitting operations are ultimately performed on the surface (surfaces). The memory of the surface can be obtained from the video memory, or from the system memory (Systems Meomroy), which is determined by the given limit.
Main layer (Primary Surface)
A special surface that represents a specific layer of frame buffer. If the main surface is single-buffered, any action to the main layer will be seen directly on the screen.
The relationship between them is primarily one-to-many relationships:
- 1 IDIRECTFB (Top level) <--> N screen (Screens)
- 1 screen <--> N layer (Layers)
- Layer 1 <--> 1 main surface (Primary surface)
- Layer 1 <--> N windows (Windows)
- 1 window <--> 1 window surface (Windows surface)
- 1 surface (surface) <--> N sub-surface (subsurfaces)
The usual situation is that a screen has a display layer, but the DFB supports each of them with multiple instances
Layers (Layers) and screens (Screens)
Each screen can have one or more layers, usually a screen has only one layer, but some systems that support overlays, because the hardware support layer is shown on the other layer, can have multiple layers.
Screen (Screens) and (Windows)
The screen cannot be created directly (window), but you can request the ID of the main layer (Primary layers) of a screen, and then request the IDIRECTFB interface (interface) to give you that layer interface. The window is then created through this interface.
Surface (surfaces) and (Windows)
Each window has a surface associated with it, and the content painted on the surface does not appear immediately on the screen, because the window manager is responsible for combining all of the window's surfaces onto the main surface---based on the area to be refreshed and the stacking order. When there is a change, the flip () function of the surface notifies the window manager.
Surface (surfaces) and (Layers)
A layer also has a surface associated with him; this surface is a direct representation of the screen memory of this layer, in exclusive (exclusive) mode you can only access the surface, otherwise you can only create a window and then use the window Manager to draw the surface
DIRECTFB, Layer, Window, surface relationships