summaryrefslogtreecommitdiffstats
path: root/include/hardware
diff options
context:
space:
mode:
authorDan Stoza <stoza@google.com>2014-06-06 17:23:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-06 17:23:17 +0000
commitcbdd56191117f13e78612a51dae8ee6477045acb (patch)
tree769dd166a633c30f62f521f8684273e23fe50dd7 /include/hardware
parent09bdd1ab25717b17022ee971064b97ca81562431 (diff)
parent91699a82eb3cf382c78a6c5ba73405f86bc394c7 (diff)
downloadhardware_libhardware-cbdd56191117f13e78612a51dae8ee6477045acb.zip
hardware_libhardware-cbdd56191117f13e78612a51dae8ee6477045acb.tar.gz
hardware_libhardware-cbdd56191117f13e78612a51dae8ee6477045acb.tar.bz2
Merge "hwcomposer: Correct padding for 32/64-bit"
Diffstat (limited to 'include/hardware')
-rw-r--r--include/hardware/hwcomposer.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/hardware/hwcomposer.h b/include/hardware/hwcomposer.h
index 049edea..fa772d6 100644
--- a/include/hardware/hwcomposer.h
+++ b/include/hardware/hwcomposer.h
@@ -297,10 +297,19 @@ typedef struct hwc_layer_1 {
};
};
- /* Allow for expansion w/o breaking binary compatibility.
- * Pad layer to 96 bytes, assuming 32-bit pointers.
+#ifdef __LP64__
+ /*
+ * 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];
+#else
+ /*
+ * For 32-bit mode, this struct is 96 bytes, and needs to be padded as such
+ * to maintain binary compatibility.
*/
- int32_t reserved[24 - 19];
+ uint8_t reserved[96 - 76];
+#endif
} hwc_layer_1_t;