Add outbuf fields for HWC 1.2 virtual displays
Also rename HWC_DISPLAY_RESOLUTION_* to HWC_DISPLAY_WIDTH and HWC_DISPLAY_HEIGHT for consistency. Change-Id: Iabe6db0816f6f6eaaac24c3c9ae554177bcabf1d
This commit is contained in:
@@ -222,23 +222,49 @@ enum {
|
|||||||
*/
|
*/
|
||||||
typedef struct hwc_display_contents_1 {
|
typedef struct hwc_display_contents_1 {
|
||||||
/* File descriptor referring to a Sync HAL fence object which will signal
|
/* File descriptor referring to a Sync HAL fence object which will signal
|
||||||
* when this display image is no longer visible, i.e. when the following
|
* when this composition is retired. For a physical display, a composition
|
||||||
* set() takes effect. The fence object is created and returned by the set
|
* is retired when it has been replaced on-screen by a subsequent set. For
|
||||||
* call; this field will be -1 on entry to prepare and set. SurfaceFlinger
|
* a virtual display, the composition is retired when the writes to
|
||||||
* will close the returned file descriptor.
|
* outputBuffer are complete and can be read. The fence object is created
|
||||||
|
* and returned by the set call; this field will be -1 on entry to prepare
|
||||||
|
* and set. SurfaceFlinger will close the returned file descriptor.
|
||||||
*/
|
*/
|
||||||
int flipFenceFd;
|
int retireFenceFd;
|
||||||
|
|
||||||
/* (dpy, sur) is the target of SurfaceFlinger's OpenGL ES composition for
|
union {
|
||||||
* HWC versions before HWC_DEVICE_VERSION_1_1. They aren't relevant to
|
/* Fields only relevant for HWC_DEVICE_VERSION_1_0. */
|
||||||
* prepare. The set call should commit this surface atomically to the
|
struct {
|
||||||
* display along with any overlay layers.
|
/* (dpy, sur) is the target of SurfaceFlinger's OpenGL ES
|
||||||
*
|
* composition for HWC_DEVICE_VERSION_1_0. They aren't relevant to
|
||||||
* For HWC_DEVICE_VERSION_1_1 and later, these will always be set to
|
* prepare. The set call should commit this surface atomically to
|
||||||
* EGL_NO_DISPLAY and EGL_NO_SURFACE.
|
* the display along with any overlay layers.
|
||||||
*/
|
*/
|
||||||
hwc_display_t dpy;
|
hwc_display_t dpy;
|
||||||
hwc_surface_t sur;
|
hwc_surface_t sur;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Fields only relevant for HWC_DEVICE_VERSION_1_2 and later. */
|
||||||
|
struct {
|
||||||
|
/* outbuf is the buffer that receives the composed image for
|
||||||
|
* virtual displays. Writes to the outbuf must wait until
|
||||||
|
* outbufAcquireFenceFd signals. A fence that will signal when
|
||||||
|
* writes to outbuf are complete should be returned in
|
||||||
|
* retireFenceFd.
|
||||||
|
*
|
||||||
|
* For physical displays, outbuf will be NULL.
|
||||||
|
*/
|
||||||
|
buffer_handle_t outbuf;
|
||||||
|
|
||||||
|
/* File descriptor for a fence that will signal when outbuf is
|
||||||
|
* ready to be written. The h/w composer is responsible for closing
|
||||||
|
* this when no longer needed.
|
||||||
|
*
|
||||||
|
* Will be -1 whenever outbuf is NULL, or when the outbuf can be
|
||||||
|
* written immediately.
|
||||||
|
*/
|
||||||
|
int outbufAcquireFenceFd;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/* List of layers that will be composed on the display. The buffer handles
|
/* List of layers that will be composed on the display. The buffer handles
|
||||||
* in the list will be unique. If numHwLayers is 0, all composition will be
|
* in the list will be unique. If numHwLayers is 0, all composition will be
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ enum {
|
|||||||
HWC_DISPLAY_VSYNC_PERIOD = 1,
|
HWC_DISPLAY_VSYNC_PERIOD = 1,
|
||||||
|
|
||||||
/* The number of pixels in the horizontal and vertical directions. */
|
/* The number of pixels in the horizontal and vertical directions. */
|
||||||
HWC_DISPLAY_RESOLUTION_X = 2,
|
HWC_DISPLAY_WIDTH = 2,
|
||||||
HWC_DISPLAY_RESOLUTION_Y = 3,
|
HWC_DISPLAY_HEIGHT = 3,
|
||||||
|
|
||||||
/* The number of pixels per thousand inches of this configuration.
|
/* The number of pixels per thousand inches of this configuration.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user