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)
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