summaryrefslogtreecommitdiff
path: root/hwc_util.h
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 19:54:39 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-23 19:54:39 +0200
commit4b01867f69b18bfddfea33a131ac1219eabc88a5 (patch)
treecf2cba025744b8fda58a95edc0f38a8b1c24f07c /hwc_util.h
Import of Rockchip Android 7.1.1 SDKHEADmaster
Diffstat (limited to 'hwc_util.h')
-rw-r--r--hwc_util.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/hwc_util.h b/hwc_util.h
new file mode 100644
index 0000000..d3f48df
--- /dev/null
+++ b/hwc_util.h
@@ -0,0 +1,14 @@
+#ifndef _HWC_UTIL_
+#define _HWC_UTIL_
+
+#define hwcMIN(x, y) (((x) <= (y)) ? (x) : (y))
+#define hwcMAX(x, y) (((x) >= (y)) ? (x) : (y))
+#define IS_ALIGN(val,align) (((val)&(align-1))==0)
+#define ALIGN( value, base ) (((value) + ((base) - 1)) & ~((base) - 1))
+#define ALIGN_DOWN( value, base) (value & (~(base-1)) )
+
+int hwc_get_int_property(const char* pcProperty,const char* default_value);
+int hwc_get_string_property(const char* pcProperty,const char* default_value,char* retult);
+int DetectValidData(int *data,int w,int h);
+
+#endif // _HWC_UTIL_