Home | History | Annotate | Download | only in libhwcomposer

Lines Matching refs:rect1

1090 hwc_rect_t getIntersection(const hwc_rect_t& rect1, const hwc_rect_t& rect2)
1094 if(!isValidRect(rect1) || !isValidRect(rect2)){
1099 res.left = max(rect1.left, rect2.left);
1100 res.top = max(rect1.top, rect2.top);
1101 res.right = min(rect1.right, rect2.right);
1102 res.bottom = min(rect1.bottom, rect2.bottom);
1111 hwc_rect_t getUnion(const hwc_rect &rect1, const hwc_rect &rect2)
1115 if(!isValidRect(rect1)){
1120 return rect1;
1123 res.left = min(rect1.left, rect2.left);
1124 res.top = min(rect1.top, rect2.top);
1125 res.right = max(rect1.right, rect2.right);
1126 res.bottom = max(rect1.bottom, rect2.bottom);
1131 /* Not a geometrical rect deduction. Deducts rect2 from rect1 only if it results
1133 hwc_rect_t deductRect(const hwc_rect_t& rect1, const hwc_rect_t& rect2) {
1135 hwc_rect_t res = rect1;
1137 if((rect1.left == rect2.left) && (rect1.right == rect2.right)) {
1138 if((rect1.top == rect2.top) && (rect2.bottom <= rect1.bottom))
1140 else if((rect1.bottom == rect2.bottom)&& (rect2.top >= rect1.top))
1143 else if((rect1.top == rect2.top) && (rect1.bottom == rect2.bottom)) {
1144 if((rect1.left == rect2.left) && (rect2.right <= rect1.right))
1146 else if((rect1.right == rect2.right)&& (rect2.left >= rect1.left))