From 9089a0e4ca08aed94111d97d7422555beee9cb70 Mon Sep 17 00:00:00 2001 From: "Arun Kumar K.R" Date: Fri, 6 Apr 2012 12:06:15 -0700 Subject: [PATCH] liboverlay: check for flip when rotating 90 or 270 deg - In setTransform, when rotating to 90 or 270 deg, also consider the case of current flip values(if any) - This is needed when switching b/w front camera/back camera/ camcorder Change-Id: Ieae8f90438dda24006ede4cf925acf46ecec5b32 (cherry picked from commit c5defdb54862490c502f255d7811cf73b8962b8d) --- liboverlay/overlayLib.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/liboverlay/overlayLib.cpp b/liboverlay/overlayLib.cpp index 79b40a1..2d972f2 100755 --- a/liboverlay/overlayLib.cpp +++ b/liboverlay/overlayLib.cpp @@ -1621,7 +1621,8 @@ bool OverlayControlChannel::setTransform(int value, bool fetch) { mOVInfo.src_rect.y = mOVInfo.src.height - ( mOVInfo.src_rect.y + mOVInfo.src_rect.h); } - else if (val == MDP_ROT_NOP || val == MDP_ROT_180) { + else if (val == MDP_ROT_NOP || val == MDP_ROT_180 || + val == MDP_FLIP_LR || val == MDP_FLIP_UD) { int tmp = mOVInfo.src_rect.x; mOVInfo.src_rect.x = mOVInfo.src.height - (mOVInfo.src_rect.y + mOVInfo.src_rect.h); @@ -1656,7 +1657,8 @@ bool OverlayControlChannel::setTransform(int value, bool fetch) { mOVInfo.src_rect.x = mOVInfo.src.width - (mOVInfo.src_rect.x + mOVInfo.src_rect.w); } - else if (val == MDP_ROT_NOP || val == MDP_ROT_180) { + else if (val == MDP_ROT_NOP || val == MDP_ROT_180 || + val == MDP_FLIP_LR || val == MDP_FLIP_UD) { int tmp = mOVInfo.src_rect.y; mOVInfo.src_rect.y = mOVInfo.src.width - ( mOVInfo.src_rect.x + mOVInfo.src_rect.w);