summaryrefslogtreecommitdiff
path: root/hwc_util.h
blob: d3f48df2eb5ffbce322492525d47eccbf4957e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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_