[M108 Migration] Make sure device scale factor (DSF) is not less than 1.0 on any... 94/290494/3 accepted/tizen/unified/20230328.080146
authorGajendra N <gajendra.n@samsung.com>
Fri, 7 Oct 2022 08:52:44 +0000 (14:22 +0530)
committerBot Blink <blinkbot@samsung.com>
Mon, 27 Mar 2023 21:39:42 +0000 (21:39 +0000)
On RPI4 device, due to DPI value being low (120), DSF was computed as 0.75,
this was causing some problems related to subpixel rendering on css related
TCTs. This patch makes sure the DSF value is not lesser than 1.0.

Change-Id: Ibde585f3a75793a4ac429e712a8572a0d922e488
Signed-off-by: Gajendra N <gajendra.n@samsung.com>
(cherry picked from commit db4b64a66f803008fa66f08b156f31997ba9f385)

tizen_src/chromium_impl/ui/display/device_display_info_efl.cc

index a39def2..a0a0f51 100644 (file)
@@ -219,6 +219,12 @@ double DeviceDisplayInfoEfl::ComputeDIPScale(int dpi) const {
     double dip_scale = static_cast<double>(GetDensityRange(dpi));
     DCHECK(dip_scale);
     dip_scale /= kBaselineDPIDensity;
+    if (dip_scale < 1.0) {
+      // Scale factor should not be less than 1.0 on any profile.
+      // On RPI4, the computed dip_scale was 0.75 because of which subpixel
+      // rendering issue was seen on some css3 tct.
+      dip_scale = 1.0;
+    }
     return dip_scale;
   } else {
     // For platforms other than mobile, the user agents expect 1.0 as DIP scale