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
[custom-devices] add screenshotting support #80675
[custom-devices] add screenshotting support #80675
Conversation
This would use a platform specific screenshot mechanism right? Context is that I also have #80616 as a WIP which will allow falling back to a "rasterizer" screenshot. That should allow all platforms to have some level of screenshot support. |
Yep exactly. Just adds a new command to the config that will take the screenshot and store it in some path. If the command isn't present, the CustomDevice will report that screenshotting isn't supported. |
packages/flutter_tools/lib/src/custom_devices/custom_device.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/general.shard/custom_devices/custom_device_test.dart
Outdated
Show resolved
Hide resolved
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.
Overall LGTM, except for comment on the regex replace of output
c4107b8
to
62cd5b8
Compare
how am I getting this allowlist error? The problem with it started happening way after the base master commit I'm using and the bundle builder refactor (which used the same upstream commit as base) tested fine. I'll try rebasing onto latest master tomorrow |
There was a bug in the test script, you'll need to pull lastest master to get the fix |
@ardera do you need any help getting synced to a good flutter hash? |
62cd5b8
to
75d6f5d
Compare
Thanks but I just didn't have time on sunday and wanted to do it later instead 😄 probably one reason why you guys don't give time estimates ;) |
Fair enough 😄 |
So there's one test failing, but I'm not sure it's related. Seems like it times out after 25s, but some other tests take long as well (the
|
That is unfortunately another broken test, we just landed 1b4f448 to work around it |
…st true - don't trim the screenshot output in the SDK, let the command do it - change the default screenshot command to use 'tr' to remove whitespaces, tabs and newlines - remove some logging in takeScreenshot since processUtils.run will do the necessary logging itself
75d6f5d
to
408e7a9
Compare
Okay, rebased onto that now |
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.
LGTM
This implements #79678.
I tested it on my device and the flutter SDK part of this works. However it's still not possible to take screenshots of the app, at least when using flutter-pi because the device-part of screenshotting support is missing. I.e. there's currently no ready-to-use command to take screenshots of the Raspberry Pi when using KMS directly without X11 / Wayland. You can get a fbdev screenshot (and that's what I tested) and that works, but only shows the console. So in the future I'll probably add some kind of support inside flutter-pi to take screenshots.
Pre-launch Checklist
///
).