Support GLES acceleration in 64bit emulator on device side
Support both 32bit and 64bit emulator GLES acceleration.
Change-Id: Ibd8b970d23937ae40732324706074ff00f433a14
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp
index 75909bd..2bdf8da 100644
--- a/system/gralloc/gralloc.cpp
+++ b/system/gralloc/gralloc.cpp
@@ -446,7 +446,7 @@
DEFINE_AND_VALIDATE_HOST_CONNECTION;
// increment the post count of the buffer
- uint32_t *postCountPtr = (uint32_t *)cb->ashmemBase;
+ intptr_t *postCountPtr = (intptr_t *)cb->ashmemBase;
if (!postCountPtr) {
// This should not happen
return -EINVAL;
@@ -638,7 +638,7 @@
return -EINVAL;
}
- EGLint postCount = 0;
+ intptr_t postCount = 0;
void *cpu_addr = NULL;
//
@@ -652,8 +652,8 @@
}
if (cb->canBePosted()) {
- postCount = *((int *)cb->ashmemBase);
- cpu_addr = (void *)(cb->ashmemBase + sizeof(int));
+ postCount = *((intptr_t *)cb->ashmemBase);
+ cpu_addr = (void *)(cb->ashmemBase + sizeof(intptr_t));
}
else {
cpu_addr = (void *)(cb->ashmemBase);