gralloc: Remove opaque types
Remove opaque types like size_t, uintptr_t, intptr_t to support
32bit and 64bit processes together.
When a 64bit process creates a handle and a 32bit process validates
the incoming ints against expected ints, opaque types lead to
different and mismatching values.
Always use unit64_t for base address for 32bit and 64bit SF.
Use unsigned int for offset and size, since ION uses that.
Change-Id: I7db5544556a8924f98010b965f837592e9f0b4ca
diff --git a/libgralloc/memalloc.h b/libgralloc/memalloc.h
index fcd7913..2bc1ddf 100644
--- a/libgralloc/memalloc.h
+++ b/libgralloc/memalloc.h
@@ -43,9 +43,9 @@
struct alloc_data {
void *base;
int fd;
- size_t offset;
- size_t size;
- size_t align;
+ unsigned int offset;
+ unsigned int size;
+ unsigned int align;
uintptr_t pHandle;
bool uncached;
unsigned int flags;
@@ -61,20 +61,20 @@
virtual int alloc_buffer(alloc_data& data) = 0;
// Free buffer
- virtual int free_buffer(void *base, size_t size,
- size_t offset, int fd) = 0;
+ virtual int free_buffer(void *base, unsigned int size,
+ unsigned int offset, int fd) = 0;
// Map buffer
- virtual int map_buffer(void **pBase, size_t size,
- size_t offset, int fd) = 0;
+ virtual int map_buffer(void **pBase, unsigned int size,
+ unsigned int offset, int fd) = 0;
// Unmap buffer
- virtual int unmap_buffer(void *base, size_t size,
- size_t offset) = 0;
+ virtual int unmap_buffer(void *base, unsigned int size,
+ unsigned int offset) = 0;
// Clean and invalidate
- virtual int clean_buffer(void *base, size_t size,
- size_t offset, int fd, int op) = 0;
+ virtual int clean_buffer(void *base, unsigned int size,
+ unsigned int offset, int fd, int op) = 0;
// Destructor
virtual ~IMemAlloc() {};