summaryrefslogtreecommitdiffstats
path: root/libgralloc/gr.h
diff options
context:
space:
mode:
authorSaurabh Shah <saurshah@codeaurora.org>2014-05-19 16:48:53 -0700
committerSaurabh Shah <saurshah@codeaurora.org>2014-05-22 12:14:30 -0700
commit8f0ea6ff81bf39b546181e0055868a80d2a695df (patch)
tree9860b1487a67a1aebb0f5284960ccbca44fb2e32 /libgralloc/gr.h
parent386f201efd08c9589f27f6b4003616630a819c33 (diff)
downloadhardware_qcom_display-8f0ea6ff81bf39b546181e0055868a80d2a695df.tar.gz
hardware_qcom_display-8f0ea6ff81bf39b546181e0055868a80d2a695df.tar.bz2
hardware_qcom_display-8f0ea6ff81bf39b546181e0055868a80d2a695df.zip
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
Diffstat (limited to 'libgralloc/gr.h')
-rw-r--r--libgralloc/gr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgralloc/gr.h b/libgralloc/gr.h
index 32f325651..797d57ee2 100644
--- a/libgralloc/gr.h
+++ b/libgralloc/gr.h
@@ -33,7 +33,7 @@
struct private_module_t;
struct private_handle_t;
-inline size_t roundUpToPageSize(size_t x) {
+inline unsigned int roundUpToPageSize(unsigned int x) {
return (x + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1);
}
@@ -47,16 +47,16 @@ inline Type ALIGN(Type x, Type align) {
int mapFrameBufferLocked(struct private_module_t* module);
int terminateBuffer(gralloc_module_t const* module, private_handle_t* hnd);
-size_t getBufferSizeAndDimensions(int width, int height, int format, int usage,
- int& alignedw, int &alignedh);
-size_t getBufferSizeAndDimensions(int width, int height, int format,
- int& alignedw, int &alignedh);
+unsigned int getBufferSizeAndDimensions(int width, int height, int format,
+ int usage, int& alignedw, int &alignedh);
+unsigned int getBufferSizeAndDimensions(int width, int height, int format,
+ int& alignedw, int &alignedh);
// Attributes include aligned width, aligned height, tileEnabled and size of the buffer
void getBufferAttributes(int width, int height, int format, int usage,
int& alignedw, int &alignedh,
- int& tileEnabled, size_t &size);
+ int& tileEnabled, unsigned int &size);
bool isMacroTileEnabled(int format, int usage);