Does not replace the root layer unnecessarily (#101748)

This commit is contained in:
xubaolin
2022-05-06 09:44:10 +08:00
committed by GitHub
parent 82afe3ea43
commit b20e27e77e
3 changed files with 20 additions and 2 deletions

View File

@@ -1779,7 +1779,7 @@ class TestViewConfiguration extends ViewConfiguration {
TestViewConfiguration._(Size size, ui.FlutterView window)
: _paintMatrix = _getMatrix(size, window.devicePixelRatio, window),
_hitTestMatrix = _getMatrix(size, 1.0, window),
super(size: size);
super(size: size, devicePixelRatio: window.devicePixelRatio);
static Matrix4 _getMatrix(Size size, double devicePixelRatio, ui.FlutterView window) {
final double inverseRatio = devicePixelRatio / window.devicePixelRatio;