Screen is a compositing windowing system. It is able to combine multiple content sources together into a single image.
Two types of composition:
- Hardware composition: composes all visible(enabled) pipelines at display time.
- In order to use this,
- You need specify a pipeline for your window: use screen_set_window_property_iv().
- use screen_set_window_property_iv() to set the SCREEN_USAGE_OVERLAY bit of your SCREEN_PROPERTY_USAGE window property.
- The window is considered autonomous as no composition was performed (on the buffers, which belong to this window) by the composition manager.
- For a window to be displayed autonomously on a pipeline, this window buffer’s format must be supported by its associated pipeline.
- In order to use this,
- Composition manager: Composes multiple window buffers (belong to multiple windows) into a single buffer, which is associated to a pipeline.
- The single buffer is called /composite buffer/ screen framebuffer.
- Used when your platform doesn’t have hardware capabilities to support a sufficient number of pipelines to compose a number of required elements, or to support a particular behavior,
- One pipeline is involved (you don’t specify the pipeline number and OVERLAY usage).
- Requires processing power of CPU and/or GPU to compose buffers
Note:Pipeline (in display controller) equals to layer (in composition manager), which is indexed by EGL level of app.
Pipeline ordering (Hardware property) and z-ordering (for windows)
- Pipeline ordering and the z-ordering of windows on a layer are applied independently of each other.
- Pipeline ordering takes precedence over z-ordering operations in Screen. Screen does not have control over the ordering of hardware pipelines. Screen windows are always arranged in the z-order that is specified by the application.
- If your application manually assigns pipelines, you must ensure that the z-order values make sense with regard to the pipeline order of the target hardware. For example, if you assign a high z-order value to a window (meaning it is to be placed in the foreground), then you must make a corresponding assignment of this window to a top layer pipeline. Otherwise the result may not be what you expect, regardless of the z-order value.
Window: a window represents the fundamental drawing surface.
- An application needs use multiple windows when content comes from different sources, when one or more parts of the application must be updated independently from others, or when the application tries to target multiple displays.
- To use the same window, the content must have the same FORMAT, DISPLAY, BRIGHTNESS, PIPELINE, POSITION, SIZE, SOURCE_POSITION, SOURCE_SIZE, TRANSPARENCY, ZORDER, etc.
Pixmap: A pixmap is similar to a bitmap except that it can have multiple bits per pixel (a measurement of the depth of the pixmap) that store the intensity or color component values. Bitmaps, by contrast, have a depth of one bit per pixel.
- You can draw directly onto a pixmap surface, outside the viewable area, and then copy the pixmap to a buffer later on.
Note: Multiple buffers can be associated with a window whereas only one buffer can be associated with a pixmap.