summaryrefslogtreecommitdiff
path: root/hwc_util.h
diff options
context:
space:
mode:
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_