diff options
author | Greg Hackmann <ghackmann@google.com> | 2014-03-03 13:10:15 -0800 |
---|---|---|
committer | Greg Hackmann <ghackmann@google.com> | 2014-03-03 13:37:11 -0800 |
commit | f5811ba2dfb9bc9abf754b2e87b1568ef5ee3356 (patch) | |
tree | 53783739d7e579a778680e7b551c57f5925d05d7 | |
parent | b96f1083b8d10f3e33b64f0da943dedfdb25b557 (diff) | |
download | hardware_libhardware-f5811ba2dfb9bc9abf754b2e87b1568ef5ee3356.zip hardware_libhardware-f5811ba2dfb9bc9abf754b2e87b1568ef5ee3356.tar.gz hardware_libhardware-f5811ba2dfb9bc9abf754b2e87b1568ef5ee3356.tar.bz2 |
gralloc: make private_handle_t layout consistent on 32/64-bit
private_handle_t's memory layout must be consistent between the 32-bit
and 64-bit gralloc, in case buffers are passed between processes.
Replace the (variably sized) uintptr_t base with a fixed size uint64_t,
and enforce 8-byte alignment for architectures where uint64_t alignment
varies between 32-bit and 64-bit.
Change-Id: I06cb31d4b9620ea18e5b50d3a3142b5adb2d2a14
Signed-off-by: Greg Hackmann <ghackmann@google.com>
-rw-r--r-- | modules/gralloc/gralloc_priv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gralloc/gralloc_priv.h b/modules/gralloc/gralloc_priv.h index 22a5715..2cd1007 100644 --- a/modules/gralloc/gralloc_priv.h +++ b/modules/gralloc/gralloc_priv.h @@ -75,7 +75,7 @@ struct private_handle_t { int offset; // FIXME: the attributes below should be out-of-line - uintptr_t base; + uint64_t base __attribute__((aligned(8))); int pid; #ifdef __cplusplus |