hwcomposer: Correct padding for 32/64-bit

The size of hwc_layer_1_t varies depending on whether we're building
for a 32- or 64-bit target. This change splits the padding into two
sections so that we can add more fields without changing the overall
size on either bitness.

Change-Id: Ib7c960a9feb0061586dc6398211d7d3dc012d573
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 @@
         };
     };
 
-    /* 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.
      */
-    int32_t reserved[24 - 19];
+    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.
+     */
+    uint8_t reserved[96 - 76];
+#endif
 
 } hwc_layer_1_t;