Types of usage flags.
Synopsis:
#include <screen/screen.h>
enum {
SCREEN_USAGE_DISPLAY = (1 << 0)
SCREEN_USAGE_READ = (1 << 1)
SCREEN_USAGE_WRITE = (1 << 2)
SCREEN_USAGE_NATIVE = (1 << 3)
SCREEN_USAGE_OPENGL_ES1 = (1 << 4)
SCREEN_USAGE_OPENGL_ES2 = (1 << 5)
SCREEN_USAGE_OPENVG = (1 << 6)
SCREEN_USAGE_VIDEO = (1 << 7)
SCREEN_USAGE_CAPTURE = (1 << 8)
SCREEN_USAGE_ROTATION = (1 << 9)
SCREEN_USAGE_OVERLAY = (1 << 10)
};
Data:
-
SCREEN_USAGE_DISPLAY
- Reserved, cannot be used by applications.
-
SCREEN_USAGE_READ
- Flag to indicate that buffer(s) associated with the API object can be read from.
-
SCREEN_USAGE_WRITE
- Flag to indicate that buffer(s) associated with the API object can be written to.
-
SCREEN_USAGE_NATIVE
- Flag to indicate that buffer(s) associated with the API object can be used for native API operations.
-
If using blits or fills, this flag must be set on the API object.
-
SCREEN_USAGE_OPENGL_ES1
- Flag to indicate that OpenGL ES 1.X is used for rendering the buffer associated with the API object.
-
SCREEN_USAGE_OPENGL_ES2
- Flag to indicate that OpenGL ES 2.X is used for rendering the buffer associated with the API object.
-
SCREEN_USAGE_OPENVG
- Flag to indicate that OpenVG is used for rendering the buffer associated with the API object.
-
SCREEN_USAGE_VIDEO
- Flag to indicate that the buffer can be written to by a video decoder.
-
SCREEN_USAGE_CAPTURE
- Flag to indicate that the buffer can be written to by capture devices (such as cameras, analog-to-digital-converters, ...),
and read by a hardware video encoder.
-
SCREEN_USAGE_ROTATION
- Flag to indicate that the buffer can be re-configured from landscape to portrait orientation without reallocation.
-
Rotation
-
SCREEN_USAGE_OVERLAY
- Flag to indicate the use of a non-composited layer.
-
The UI Framework (Screen) API uses a composited layer by default. The SCREEN_USAGE_OVERLAY flag is used to override this default behaviour to use a non-composited layer instead. Note that when the overlay usage bit
is added or removed, then changing SCREEN_PROPERTY_USAGE affects the pipeline. Use the SCREEN_USAGE_OVERLAY flag in favor of the SCREEN_PROPERTY_PIPELINE property to specify whether to use a composited or a non-composited layer.
Library:
libscreen
Description:
Usage flags are used when allocating buffers. Depending on the usage, different constraints such as width, height, stride
granularity or special alignment must be observed. The usage is also valuable in determining the amount of caching that can
be set on a particular buffer.