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)
This commit is contained in:
Arun Kumar K.R 2012-04-06 12:06:15 -07:00 committed by Andrew Sutherland
parent 10d91371c2
commit 9089a0e4ca

View File

@ -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);