bump HWC version to 1.3, add support for float crop rectangle
Change-Id: I8601ecc9f39052000b872805be1637ee73b0d3e1
This commit is contained in:
@@ -54,6 +54,13 @@ typedef struct hwc_rect {
|
|||||||
int bottom;
|
int bottom;
|
||||||
} hwc_rect_t;
|
} hwc_rect_t;
|
||||||
|
|
||||||
|
typedef struct hwc_frect {
|
||||||
|
float left;
|
||||||
|
float top;
|
||||||
|
float right;
|
||||||
|
float bottom;
|
||||||
|
} hwc_frect_t;
|
||||||
|
|
||||||
typedef struct hwc_region {
|
typedef struct hwc_region {
|
||||||
size_t numRects;
|
size_t numRects;
|
||||||
hwc_rect_t const* rects;
|
hwc_rect_t const* rects;
|
||||||
@@ -149,8 +156,17 @@ typedef struct hwc_layer_1 {
|
|||||||
int32_t blending;
|
int32_t blending;
|
||||||
|
|
||||||
/* area of the source to consider, the origin is the top-left corner of
|
/* area of the source to consider, the origin is the top-left corner of
|
||||||
* the buffer */
|
* the buffer. As of HWC_DEVICE_API_VERSION_1_3, sourceRect uses floats.
|
||||||
hwc_rect_t sourceCrop;
|
* If the h/w can't support a non-integer source crop rectangle, it should
|
||||||
|
* punt to OpenGL ES composition.
|
||||||
|
*/
|
||||||
|
union {
|
||||||
|
// crop rectangle in integer (pre HWC_DEVICE_API_VERSION_1_3)
|
||||||
|
hwc_rect_t sourceCropi;
|
||||||
|
hwc_rect_t sourceCrop; // just for source compatibility
|
||||||
|
// crop rectangle in floats (as of HWC_DEVICE_API_VERSION_1_3)
|
||||||
|
hwc_frect_t sourceCropf;
|
||||||
|
};
|
||||||
|
|
||||||
/* where to composite the sourceCrop onto the display. The sourceCrop
|
/* where to composite the sourceCrop onto the display. The sourceCrop
|
||||||
* is scaled using linear filtering to the displayFrame. The origin is the
|
* is scaled using linear filtering to the displayFrame. The origin is the
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ __BEGIN_DECLS
|
|||||||
#define HWC_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION_2(1, 0, HWC_HEADER_VERSION)
|
#define HWC_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION_2(1, 0, HWC_HEADER_VERSION)
|
||||||
#define HWC_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION_2(1, 1, HWC_HEADER_VERSION)
|
#define HWC_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION_2(1, 1, HWC_HEADER_VERSION)
|
||||||
#define HWC_DEVICE_API_VERSION_1_2 HARDWARE_DEVICE_API_VERSION_2(1, 2, HWC_HEADER_VERSION)
|
#define HWC_DEVICE_API_VERSION_1_2 HARDWARE_DEVICE_API_VERSION_2(1, 2, HWC_HEADER_VERSION)
|
||||||
|
#define HWC_DEVICE_API_VERSION_1_3 HARDWARE_DEVICE_API_VERSION_2(1, 3, HWC_HEADER_VERSION)
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
/* hwc_composer_device_t::set failed in EGL */
|
/* hwc_composer_device_t::set failed in EGL */
|
||||||
|
|||||||
Reference in New Issue
Block a user