hwc: Map dirtyRect to layer destination before using.
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.
Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 234804c..4cfed2a 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -262,6 +262,7 @@
bool isValidRect(const hwc_rect_t& rect);
hwc_rect_t deductRect(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
bool isSameRect(const hwc_rect& rect1, const hwc_rect& rect2);
+hwc_rect_t moveRect(const hwc_rect_t& rect, const int& x_off, const int& y_off);
hwc_rect_t getIntersection(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
hwc_rect_t getUnion(const hwc_rect_t& rect1, const hwc_rect_t& rect2);
void optimizeLayerRects(const hwc_display_contents_1_t *list);