weston: modify overlay plane coordinates [1/1]
PD#SWPL-187463
Problem:
coordinates not correct for overlay plane.
Solution:
modify overlay plane coordinates
Verify:
s7d
Change-Id: I006eb77dc9948af4a8d14dec1edadf60fb90dec2
Signed-off-by: limin.tian <limin.tian@amlogic.com>
diff --git a/aml-weston/aml-backend.c b/aml-weston/aml-backend.c
index 0d6f9a1..575b3ad 100644
--- a/aml-weston/aml-backend.c
+++ b/aml-weston/aml-backend.c
@@ -1361,20 +1361,11 @@
// Move the frame buffer at center of display
float scale_w = (float)output->display_size.width / output->base.width;
float scale_h = (float)output->display_size.height / output->base.height;
- float last_scale = scale_w < scale_h ? scale_w : scale_h;
- if (scale_w < scale_h) {
- scale_h = (scale_h - scale_w) / 2;
- state->dest_x = scale_w * state->dest_x;
- state->dest_y = scale_w * state->dest_y + scale_h * output->base.height;
- state->dest_w = scale_w * state->dest_w;
- state->dest_h = scale_w * state->dest_h;
- } else {
- scale_w = (scale_w - scale_h) / 2;
- state->dest_x = scale_h * state->dest_x + scale_w * output->base.width;
- state->dest_y = scale_h * state->dest_y;
- state->dest_w = scale_h * state->dest_w;
- state->dest_h = scale_h * state->dest_h;
- }
+ state->dest_x = scale_w * state->dest_x;
+ state->dest_y = scale_h * state->dest_y ;
+ state->dest_w = scale_w * state->dest_w;
+ state->dest_h = scale_h * state->dest_h;
+
#endif
}
}