HWC/Copybit :: Add swap rect feature in HAL for MDP3

We brings all swap rect level checks in HAL from surfaceflinger
for MDP3.
swap rect kicks in case of
1 Only one layer is updating.
2 No overlaypping layers.
3.Both src and dst has same value.(no scaling)
4.No video layer

Change-Id: I881958994e80b53d4969beaaf51518b727a8de78
This commit is contained in:
Ramakant Singh
2014-03-07 19:11:45 +05:30
parent 20091d8895
commit 21cec725af
4 changed files with 177 additions and 11 deletions

View File

@@ -1080,6 +1080,13 @@ bool isValidRect(const hwc_rect& rect)
return ((rect.bottom > rect.top) && (rect.right > rect.left)) ;
}
bool operator ==(const hwc_rect_t& lhs, const hwc_rect_t& rhs) {
if(lhs.left == rhs.left && lhs.top == rhs.top &&
lhs.right == rhs.right && lhs.bottom == rhs.bottom )
return true ;
return false;
}
/* computes the intersection of two rects */
hwc_rect_t getIntersection(const hwc_rect_t& rect1, const hwc_rect_t& rect2)
{