sdm: Set the new panel width and height correctly
Set the new panel width and height dimensions correctly once the
actionSafe values are set.
CRs-Fixed: 992075
Change-Id: I149dc1de05b6ec5f7ee9ed539bc1730bc054eb10
diff --git a/sdm/libs/hwc/hwc_display_external.cpp b/sdm/libs/hwc/hwc_display_external.cpp
index 86b36d8..dbcced9 100644
--- a/sdm/libs/hwc/hwc_display_external.cpp
+++ b/sdm/libs/hwc/hwc_display_external.cpp
@@ -155,8 +155,8 @@
return;
}
- uint32_t new_panel_width = panel_width * UINT32(1.0f - width_ratio);
- uint32_t new_panel_height = panel_height * UINT32(1.0f - height_ratio);
+ uint32_t new_panel_width = UINT32(panel_width * FLOAT(1.0f - width_ratio));
+ uint32_t new_panel_height = UINT32(panel_height * FLOAT(1.0f - height_ratio));
int x_offset = INT((FLOAT(panel_width) * width_ratio) / 2.0f);
int y_offset = INT((FLOAT(panel_height) * height_ratio) / 2.0f);