Add NUM_DISPLAY_TYPES query and refine display list semantics
Change-Id: I740859bfa2b126edcdf06f7b2c8208770bc864f9
This commit is contained in:
@@ -342,8 +342,16 @@ typedef struct hwc_composer_device_1 {
|
|||||||
* handles have been updated. Typically this happens (but is not limited to)
|
* handles have been updated. Typically this happens (but is not limited to)
|
||||||
* when a window is added, removed, resized or moved.
|
* when a window is added, removed, resized or moved.
|
||||||
*
|
*
|
||||||
* The numDisplays parameter will always be greater than zero, displays
|
* For HWC 1.0, numDisplays will always be one, and displays[0] will be
|
||||||
* will be non-NULL, and the array entries will be non-NULL.
|
* non-NULL.
|
||||||
|
*
|
||||||
|
* For HWC 1.1, numDisplays will always be HWC_NUM_DISPLAY_TYPES. Entries
|
||||||
|
* for unsupported or disabled/disconnected display types will be NULL.
|
||||||
|
*
|
||||||
|
* For HWC 1.2 and later, numDisplays will be HWC_NUM_DISPLAY_TYPES or more.
|
||||||
|
* The extra entries correspond to enabled virtual displays, and will be
|
||||||
|
* non-NULL. In HWC 1.2, support for one virtual display is required, and
|
||||||
|
* no more than one will be used. Future HWC versions might require more.
|
||||||
*
|
*
|
||||||
* returns: 0 on success. An negative error code on error. If an error is
|
* returns: 0 on success. An negative error code on error. If an error is
|
||||||
* returned, SurfaceFlinger will assume that none of the layer will be
|
* returned, SurfaceFlinger will assume that none of the layer will be
|
||||||
@@ -368,8 +376,16 @@ typedef struct hwc_composer_device_1 {
|
|||||||
* been handled by SurfaceFlinger with OpenGL ES. In this case, (*set)()
|
* been handled by SurfaceFlinger with OpenGL ES. In this case, (*set)()
|
||||||
* behaves just like eglSwapBuffers().
|
* behaves just like eglSwapBuffers().
|
||||||
*
|
*
|
||||||
* The numDisplays parameter will always be greater than zero, displays
|
* For HWC 1.0, numDisplays will always be one, and displays[0] will be
|
||||||
* will be non-NULL, and the array entries will be non-NULL.
|
* non-NULL.
|
||||||
|
*
|
||||||
|
* For HWC 1.1, numDisplays will always be HWC_NUM_DISPLAY_TYPES. Entries
|
||||||
|
* for unsupported or disabled/disconnected display types will be NULL.
|
||||||
|
*
|
||||||
|
* For HWC 1.2 and later, numDisplays will be HWC_NUM_DISPLAY_TYPES or more.
|
||||||
|
* The extra entries correspond to enabled virtual displays, and will be
|
||||||
|
* non-NULL. In HWC 1.2, support for one virtual display is required, and
|
||||||
|
* no more than one will be used. Future HWC versions might require more.
|
||||||
*
|
*
|
||||||
* IMPORTANT NOTE: there is an implicit layer containing opaque black
|
* IMPORTANT NOTE: there is an implicit layer containing opaque black
|
||||||
* pixels behind all the layers in the list. It is the responsibility of
|
* pixels behind all the layers in the list. It is the responsibility of
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ enum {
|
|||||||
* returns the vsync period in nanosecond
|
* returns the vsync period in nanosecond
|
||||||
*/
|
*/
|
||||||
HWC_VSYNC_PERIOD = 1,
|
HWC_VSYNC_PERIOD = 1,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* availability: HWC_DEVICE_API_VERSION_1_1
|
||||||
|
* returns a mask of supported display types
|
||||||
|
*/
|
||||||
|
HWC_DISPLAY_TYPES_SUPPORTED = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Allowed events for hwc_methods::eventControl() */
|
/* Allowed events for hwc_methods::eventControl() */
|
||||||
@@ -146,6 +152,18 @@ enum {
|
|||||||
HWC_EVENT_VSYNC = 0
|
HWC_EVENT_VSYNC = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Display types and associated mask bits. */
|
||||||
|
enum {
|
||||||
|
HWC_DISPLAY_PRIMARY = 0,
|
||||||
|
HWC_DISPLAY_EXTERNAL = 1, // HDMI, DP, etc.
|
||||||
|
HWC_NUM_DISPLAY_TYPES
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
HWC_DISPLAY_PRIMARY_BIT = 1 << HWC_DISPLAY_PRIMARY,
|
||||||
|
HWC_DISPLAY_EXTERNAL_BIT = 1 << HWC_DISPLAY_EXTERNAL,
|
||||||
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user