Skip to content
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

[flutter_tools] support toggling CanvasKit rendering on with 'k' #52511

Merged
merged 1 commit into from Mar 13, 2020

Conversation

jonahwilliams
Copy link
Member

Description

Adds the ability to toggle a debug build of Flutter for the Web between the html and CanvasKit backends with "k". Requires a slightly newer engine revision (soon).

Currently this is done as a full page refresh. Its not clear if we could use the hot restart functionality to invalidate the dart sdk, since the dart sdk itself tracks state for hot restarts.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 12, 2020
@@ -153,6 +153,12 @@ class CommandHelp {
'Toggle elevation checker.',
);

CommandHelpOption _k;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this check if we're running a web build?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, will this same switch work for non-debug builds?

Copy link
Member Author

Choose a reason for hiding this comment

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

See https://github.com/flutter/flutter/pull/52511/files#diff-62dbce17da9d1284c7f14ae07e67df33R668 for the web build guarding

And https://github.com/flutter/flutter/pull/52511/files#diff-4951af41b5bd06e6f3f90860ba6029daR714 for the debug mode check.

This won't work in release mode, since we need to build from source in those

@jonahwilliams jonahwilliams merged commit b3a37d0 into flutter:master Mar 13, 2020
@jonahwilliams jonahwilliams deleted the toggle_canvas_kit branch March 13, 2020 14:02
@lock
Copy link

lock bot commented Apr 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@lock lock bot locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants