summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2015-04-15 21:42:46 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-15 21:42:46 +0000
commit6b46cc59ce7913d2d70e43059484fba9f09124f5 (patch)
treeec4950233c66e8f458799bca61b59108e2996031
parent33642b9c5763a3ad7cebbe8918a6a8d31f3a63a5 (diff)
parent7ff6445c7ae2c1f66dda17f5a5ee5ba53f23d796 (diff)
downloadhardware_libhardware-6b46cc59ce7913d2d70e43059484fba9f09124f5.zip
hardware_libhardware-6b46cc59ce7913d2d70e43059484fba9f09124f5.tar.gz
hardware_libhardware-6b46cc59ce7913d2d70e43059484fba9f09124f5.tar.bz2
am 7ff6445c: am 8fcb7ee2: Merge "HWC 1.5: Add per-layer damage region"
* commit '7ff6445c7ae2c1f66dda17f5a5ee5ba53f23d796': HWC 1.5: Add per-layer damage region
-rw-r--r--include/hardware/hwcomposer.h27
-rw-r--r--include/hardware/hwcomposer_defs.h1
2 files changed, 25 insertions, 3 deletions
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index 3dfb4fd..aa466b3 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -299,8 +299,29 @@ typedef struct hwc_layer_1 {
*/
uint8_t planeAlpha;
- /* reserved for future use */
+ /* Pad to 32 bits */
uint8_t _pad[3];
+
+ /*
+ * Availability: HWC_DEVICE_API_VERSION_1_5
+ *
+ * This defines the region of the source buffer that has been
+ * modified since the last frame.
+ *
+ * If surfaceDamage.numRects > 0, then it may be assumed that any
+ * portion of the source buffer not covered by one of the rects has
+ * not been modified this frame. If surfaceDamage.numRects == 0,
+ * then the whole source buffer must be treated as if it had been
+ * modified.
+ *
+ * If the layer's contents are not modified relative to the prior
+ * prepare/set cycle, surfaceDamage will contain exactly one empty
+ * rect ([0, 0, 0, 0]).
+ *
+ * The damage rects are relative to the pre-transformed buffer, and
+ * their origin is the top-left corner.
+ */
+ hwc_region_t surfaceDamage;
};
};
@@ -309,13 +330,13 @@ typedef struct hwc_layer_1 {
* For 64-bit mode, this struct is 120 bytes (and 8-byte aligned), and needs
* to be padded as such to maintain binary compatibility.
*/
- uint8_t reserved[120 - 96];
+ uint8_t reserved[120 - 112];
#else
/*
* For 32-bit mode, this struct is 96 bytes, and needs to be padded as such
* to maintain binary compatibility.
*/
- uint8_t reserved[96 - 76];
+ uint8_t reserved[96 - 84];
#endif
} hwc_layer_1_t;
diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h
index 9a52436..e650bd2 100644
--- a/include/hardware/hwcomposer_defs.h
+++ b/include/hardware/hwcomposer_defs.h
@@ -37,6 +37,7 @@ __BEGIN_DECLS
#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)
#define HWC_DEVICE_API_VERSION_1_4 HARDWARE_DEVICE_API_VERSION_2(1, 4, HWC_HEADER_VERSION)
+#define HWC_DEVICE_API_VERSION_1_5 HARDWARE_DEVICE_API_VERSION_2(1, 5, HWC_HEADER_VERSION)
enum {
/* hwc_composer_device_t::set failed in EGL */