hwc/ov: Fix MDP orientation flags and values.

--Fix MDP_SOURCE_ROTATED_90 removal.
Since mdp flags are updated fresh each round,
this flag should not be removed if there is no 90.
If pre-rotation is used, this flag is set by hwc and removed here.
(Affects anything having a 90 component in transform)

--Provide MDP adjusted transform to prerotation calcs.
Clients on Android don't switch flips if 90 component is present,
but expect the output to be that way. (camera)
We do it in HAL and then calculate final crop for MDP.
(Affects anything using 90 + Just 1 flip i.e camera)

--Pass 0 transform to MDP even for flips, since we
prerotate if there is 90 with flips or use MDP to flip via flags,
so no need to flip transform calcs.
(Affects anything using just flips).

Change-Id: I115a82ee4558794db0b6b641710494b9007d6f54
diff --git a/liboverlay/overlayUtils.cpp b/liboverlay/overlayUtils.cpp
index 4cc7a37..ebc88d1 100644
--- a/liboverlay/overlayUtils.cpp
+++ b/liboverlay/overlayUtils.cpp
@@ -213,7 +213,10 @@
     return x - ( y + z );
 }
 
-void preRotateSource(eTransform& tr, Whf& whf, Dim& srcCrop) {
+//Expects transform to be adjusted for clients of Android.
+//i.e flips switched if 90 component present.
+//See getMdpOrient()
+void preRotateSource(const eTransform& tr, Whf& whf, Dim& srcCrop) {
     if(tr & OVERLAY_TRANSFORM_FLIP_H) {
         srcCrop.x = compute(whf.w, srcCrop.x, srcCrop.w);
     }
@@ -229,7 +232,6 @@
         swap(whf.w, whf.h);
         swap(srcCrop.w, srcCrop.h);
     }
-    tr = OVERLAY_TRANSFORM_0;
 }
 
 bool is3DTV() {