hwc/copybit: Fix the wrong layer transform check.
At 90/270 degree rotations, if there is vertical or horizontal flip in
layer transform, it is wrongly interpreted by display HAL due to wrong
check. So Copybit destination rectangle width & height are not swapped
which leads to unwanted out-of-range scaling.
Change-Id: Ib917b907d1284b91b7d6c25038050bbcb503a792
diff --git a/libhwcomposer/hwc_copybit.cpp b/libhwcomposer/hwc_copybit.cpp
index 0ad1b14..630025f 100644
--- a/libhwcomposer/hwc_copybit.cpp
+++ b/libhwcomposer/hwc_copybit.cpp
@@ -426,8 +426,7 @@
float copybitsMinScale =
(float)copybit->get(copybit,COPYBIT_MINIFICATION_LIMIT);
- if((layer->transform == HWC_TRANSFORM_ROT_90) ||
- (layer->transform == HWC_TRANSFORM_ROT_270)) {
+ if (layer->transform & HWC_TRANSFORM_ROT_90) {
//swap screen width and height
int tmp = screen_w;
screen_w = screen_h;