hwc: Consider orientation while checking a layer for scaling.
When a layer has 90 or 270 degree orientation flag set, the source buffer will be
rotated before MDP scales it up or down, if applicable. So while
checking the layer for scaling for configuration decisions in
HWC, we need to consider its orientation flags.
Change-Id: Ia35f5868eb0e4e47659484de28b14ae3560c18aa
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 6a74625..2fcf06d 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -856,6 +856,9 @@
src_w = sourceCrop.right - sourceCrop.left;
src_h = sourceCrop.bottom - sourceCrop.top;
+ if(layer->transform & HWC_TRANSFORM_ROT_90)
+ swap(src_w, src_h);
+
if(((src_w != dst_w) || (src_h != dst_h)))
return true;