gralloc: Use getpagesize() in place of PAGE_SIZE.
- Use getpagesize() function from unistd.h to get page size
in place of PAGE_SIZE macro.
- Make isDisableUBWCForEncoder declaration pure virtual.
Change-Id: I89405e999e4683874f4daa32188181e688a19812
CRs-Fixed: 1069351
diff --git a/libgralloc/gr.h b/libgralloc/gr.h
index 578240a..5ab576a 100644
--- a/libgralloc/gr.h
+++ b/libgralloc/gr.h
@@ -24,6 +24,7 @@
#include <hardware/gralloc.h>
#include <pthread.h>
#include <errno.h>
+#include <unistd.h>
#include <cutils/native_handle.h>
#include <utils/Singleton.h>
@@ -35,7 +36,7 @@
struct private_handle_t;
inline unsigned int roundUpToPageSize(unsigned int x) {
- return (x + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1);
+ return (x + (getpagesize()-1)) & ~(getpagesize()-1);
}
template <class Type>