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
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index ceb09ea..1670803 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -1080,6 +1080,13 @@
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)
{