-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Fix DPR in test view configuration #88609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| await tester.pumpWidget(const Placeholder()); | ||
|
|
||
| expect(find.byType(RepaintBoundary), findsOneWidget); | ||
| expect(tester.binding.renderView.paintBounds, const Rect.fromLTWH(0, 0, 2400, 1800)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, without the repaint boundary, this was returning 800x600.
jiahaog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM!
|
This pull request is not suitable for automatic merging in its current state.
|
|
I'm going to land this and apply a g3fix if needed internally. |
Closes #66006. From what I can tell in the multi-view effort a variation of #88609 already landed, meaning that the current device-pixel-ratio is being used (as the tests in #88609 are now passing), and I believe that means we can remove the override/hack. Will rely on "Google Testing" to run a TGP internally, or do so myself if necessary.
Fixes #66006
The problem is that the view configuration was always getting a DPR of 1.0, which did not match the actual DPR of the window - so the
paintBoundsforRenderViewreturned an unadjusted size which made the screenshot truncated.