summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorTina Zhang <tina.zhang@intel.com>2014-05-26 14:03:48 +0800
committerbohu <bohu@google.com>2014-09-18 15:15:05 -0700
commit57df810e26b7538f7ff802072f6d5e918c957454 (patch)
tree1c8e6c899451e3a457b26ce94e617cbfa294b6a8 /opengl
parent2e6a15f7a40895681412356e9c7f5740cfad9d55 (diff)
downloadandroid_device_generic_goldfish-57df810e26b7538f7ff802072f6d5e918c957454.tar.gz
android_device_generic_goldfish-57df810e26b7538f7ff802072f6d5e918c957454.tar.bz2
android_device_generic_goldfish-57df810e26b7538f7ff802072f6d5e918c957454.zip
Make the size of "cb_handle_t" same for 32/64-bit
cb_handle_t is usually created by Surfaceflinger which is a 64-bit process on 64-bit platform, and used by client processes which could be 32-bit processes or 64-bit processes. Since the "cb_handle_t" is like a protocol, we should make its size same for both 32-bit and 64-bit processes. Signed-off-by: Tina Zhang <tina.zhang@intel.com> (cherry picked from commit 3f62b50d45441ae077c958423e9e301acd5dcc11) Change-Id: I12aace9446e4566d9b12b0f50970ec00e8537dd9
Diffstat (limited to 'opengl')
-rw-r--r--opengl/system/OpenglSystemCommon/gralloc_cb.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/opengl/system/OpenglSystemCommon/gralloc_cb.h b/opengl/system/OpenglSystemCommon/gralloc_cb.h
index c138964..a0f6ed8 100644
--- a/opengl/system/OpenglSystemCommon/gralloc_cb.h
+++ b/opengl/system/OpenglSystemCommon/gralloc_cb.h
@@ -96,7 +96,11 @@ struct cb_handle_t : public native_handle {
int glType; // OpenGL type enum used when uploading to host
int ashmemSize; // ashmem region size for the buffer (0 unless is HW_FB buffer or
// s/w access is needed)
- intptr_t ashmemBase; // CPU address of the mapped ashmem region
+ union {
+ intptr_t ashmemBase; // CPU address of the mapped ashmem region
+ uint64_t padding; // enforce same size on 32-bit/64-bit
+ } __attribute__((aligned(8)));
+
int ashmemBasePid; // process id which mapped the ashmem region
int mappedPid; // process id which succeeded gralloc_register call
int lockedLeft; // region of buffer locked for s/w write