-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Merge skia into screenshot #6623
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
printError('Must specify --$_kSkia or have a connected device'); | ||
return 1; | ||
} | ||
if (!device.supportsScreenshot) { |
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.
You'll want to make this check specific to when they're taking a screenshot, and not when using --skia.
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.
Good catch! Fixed.
File outputFile; | ||
if (argResults.wasParsed(_kOut)) { |
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.
nit: braces not needed
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.
Fixed.
lgtm; /cc @jason-simmons, who wrote the skia command We may want to look at exposing the skia info over service protocol extensions. This would make the information more widely available to development tools. |
help: 'Retrieve the last frame rendered by a Flutter app as a Skia picture\n' | ||
'using the specified diagnostic server port.\n' | ||
'To find the diagnostic server port number, use "flutter run --verbose"\n' | ||
'and look for "Diagnostic server listening on" in the output.' |
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.
:-/
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.
Agreed. Not great to direct users to the verbose logs. One way to address this is to make the default diagnostic port have a default value rather than auto-selecting what appears to be a random port. Then, most of the time(?), users would not need to specify a skia port.
|
||
void printErrorHelpText() { | ||
printError(''); | ||
printError('Be sure the --$_kSkia= option specifies the diagnostic server port, not the observatory port'); |
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.
missing a period at the end here.
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.
Fixed.
|
||
http.StreamedResponse postResponse = await postRequest.send(); | ||
if (postResponse.statusCode != HttpStatus.OK) { | ||
printError('Failed to post Skia picture to skiaserve'); |
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.
period
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.
Fixed.
LGTM but I'm sad that we're sending people into the verbose logs. I wish there was a way we could discover the port for the currently running instance somehow. Not important for now though. |
This merges
flutter skia
intoflutter screenshot
andMore specifically,
becomes
@devoncarew @Hixie