liboverlay: Calculate x and y values in setCrop on 180 degree rotation
This change calculates x and y values based on setcrop parameters and current overlay values on 180 degree rotation. CRs-Fixed: 274707 Change-Id: Ibfe20c1a53e832424a880d99e73bd4a1c7b95173
This commit is contained in:
parent
c096d185f1
commit
5abeb9b1ea
@ -1272,6 +1272,14 @@ bool OverlayDataChannel::setCrop(uint32_t x, uint32_t y, uint32_t w, uint32_t h)
|
||||
w = h;
|
||||
h = tmp;
|
||||
}
|
||||
else if(ov.user_data[0] == MDP_ROT_180) {
|
||||
if ((ov.src.height < (y + h)) || (ov.src.width < ( x + w)))
|
||||
return false;
|
||||
|
||||
x = ov.src.width - (x + w);
|
||||
y = ov.src.height - (y + h);
|
||||
}
|
||||
|
||||
|
||||
if ((ov.src_rect.x == x) &&
|
||||
(ov.src_rect.y == y) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user