Commit cf5f7903 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Add 2.25dsf support

BUG=b/74845106
TEST=covered by unittests

Change-Id: I1dde9c2ab19d08945f7ad4d9d2038dc1d0ff3e54
Reviewed-on: https://chromium-review.googlesource.com/1093518Reviewed-by: default avatarMalay Keshav <malaykeshav@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567180}
parent 55cd3605
......@@ -40,6 +40,7 @@ struct DeviceScaleFactorDPIThreshold {
};
const DeviceScaleFactorDPIThreshold kThresholdTableForInternal[] = {
{270.0f, 2.25f},
{220.0f, 2.0f},
{180.0f, 1.6f},
{150.0f, 1.25f},
......
......@@ -364,10 +364,13 @@ TEST_F(DisplayChangeObserverTest, FindDeviceScaleFactor) {
// 12.3" 2400x1600
EXPECT_EQ(2.0f, ComputeDeviceScaleFactor(12.3f, gfx::Rect(2400, 1600)));
// 12.3" 3000x2000 (meowth)
EXPECT_EQ(2.25f, ComputeDeviceScaleFactor(12.3f, gfx::Rect(3000, 2000)));
// Erroneous values should still work.
EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(-100.0f));
EXPECT_EQ(1.0f, DisplayChangeObserver::FindDeviceScaleFactor(0.0f));
EXPECT_EQ(2.0f, DisplayChangeObserver::FindDeviceScaleFactor(10000.0f));
EXPECT_EQ(2.25f, DisplayChangeObserver::FindDeviceScaleFactor(10000.0f));
}
TEST_F(DisplayChangeObserverTest,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment