From cf8689ffa200e5df964ecb8a5d9f7e2b2b833375 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 15 May 2017 13:18:56 -0700 Subject: [PATCH] Move the test runner to a higher DPI screen. (flutter/engine#3688) Having the device pixel ratio of the test shell be 1.0x makes it unlikely that we will catch errors relating to mishandling of the device pixel ratio in the test shell. This patch arbitrarily increases the device pixel resolution while keeping the logical resolution the same. --- engine/src/flutter/shell/testing/test_runner.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/testing/test_runner.cc b/engine/src/flutter/shell/testing/test_runner.cc index 85770cbf956..28d2568ba22 100644 --- a/engine/src/flutter/shell/testing/test_runner.cc +++ b/engine/src/flutter/shell/testing/test_runner.cc @@ -15,8 +15,9 @@ namespace shell { TestRunner::TestRunner() : platform_view_(new PlatformViewTest()) { blink::ViewportMetrics metrics; - metrics.physical_width = 800; - metrics.physical_height = 600; + metrics.device_pixel_ratio = 3.0; + metrics.physical_width = 2400; // 800 at 3x resolution + metrics.physical_height = 1800; // 600 at 3x resolution blink::Threads::UI()->PostTask( [ engine = platform_view_->engine().GetWeakPtr(), metrics ] {