diff options
author | Mathias Agopian <mathias@google.com> | 2013-07-09 19:55:41 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-07-10 15:03:00 -0700 |
commit | 3b4732c9d5462daf52a2ee1a42410bb0220fd28f (patch) | |
tree | e4082d3df2747637efee11ff2efec4e6c4f01e9e /include/hardware/hwcomposer.h | |
parent | 1d9b1834689d694802dea4f9a10f00a8b7c21d12 (diff) | |
download | hardware_libhardware-3b4732c9d5462daf52a2ee1a42410bb0220fd28f.zip hardware_libhardware-3b4732c9d5462daf52a2ee1a42410bb0220fd28f.tar.gz hardware_libhardware-3b4732c9d5462daf52a2ee1a42410bb0220fd28f.tar.bz2 |
bump HWC version to 1.3, add support for float crop rectangle
Change-Id: I8601ecc9f39052000b872805be1637ee73b0d3e1
Diffstat (limited to 'include/hardware/hwcomposer.h')
-rw-r--r-- | include/hardware/hwcomposer.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h index d75a047..9492d3a 100644 --- a/include/hardware/hwcomposer.h +++ b/include/hardware/hwcomposer.h @@ -54,6 +54,13 @@ typedef struct hwc_rect { int bottom; } hwc_rect_t; +typedef struct hwc_frect { + float left; + float top; + float right; + float bottom; +} hwc_frect_t; + typedef struct hwc_region { size_t numRects; hwc_rect_t const* rects; @@ -149,8 +156,17 @@ typedef struct hwc_layer_1 { int32_t blending; /* area of the source to consider, the origin is the top-left corner of - * the buffer */ - hwc_rect_t sourceCrop; + * the buffer. As of HWC_DEVICE_API_VERSION_1_3, sourceRect uses floats. + * 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 * is scaled using linear filtering to the displayFrame. The origin is the |