Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Aug 20, 2021

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 paintBounds for RenderView returned an unadjusted size which made the screenshot truncated.

@dnfield dnfield requested a review from jiahaog August 20, 2021 21:37
@flutter-dashboard flutter-dashboard bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Aug 20, 2021
@google-cla google-cla bot added the cla: yes label Aug 20, 2021
@dnfield dnfield requested a review from goderbauer August 20, 2021 21:37
await tester.pumpWidget(const Placeholder());

expect(find.byType(RepaintBoundary), findsOneWidget);
expect(tester.binding.renderView.paintBounds, const Rect.fromLTWH(0, 0, 2400, 1800));
Copy link
Contributor Author

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.

Copy link
Member

@jiahaog jiahaog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@dnfield
Copy link
Contributor Author

dnfield commented Aug 24, 2021

I'm going to land this and apply a g3fix if needed internally.

@dnfield dnfield merged commit 5feee0d into flutter:master Aug 24, 2021
@dnfield dnfield deleted the it_shaders branch August 24, 2021 21:26
dnfield added a commit that referenced this pull request Aug 25, 2021
dnfield added a commit that referenced this pull request Aug 25, 2021
github-merge-queue bot pushed a commit that referenced this pull request Nov 21, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screenshot taken with LiveTestWidgetsFlutterBinding is truncated

3 participants