-
Notifications
You must be signed in to change notification settings - Fork 6k
Use hidden window to process flutter messages #24232
Use hidden window to process flutter messages #24232
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
6614826
to
2b19d55
Compare
b0d06a1
to
9d83e7b
Compare
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 change, LGTM with the caveat of the one comment. Not sure how breaking changes are handled and how those should be timed @cbracken to comment.
@@ -69,10 +68,7 @@ bool FlutterDesktopViewControllerHandleTopLevelWindowProc( | |||
} | |||
|
|||
uint64_t FlutterDesktopEngineProcessMessages(FlutterDesktopEngineRef engine) { |
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.
I wonder if we even need FlutterDesktopEngineProcessMessages any more with this change. I don't believe we use it in UWP. It would be a breaking change tho.
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.
It's not necessary anymore (it a noop that just returns -1). Next step would be to remove this from the Windows template (it would become simple Get/Translate/Dispatch message loop). Returning -1 ensures that existing run-loops work just fine after the change.
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.
Actually removing the function would involve writing a migrator into the Flutter tool. (There's some infrastructure in the tooling for it, but it hasn't been used yet on Windows)
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.
@stuartmorgan, I don't think I'd want to remove the function from API anytime soon, but the template can be significantly simplified. I'll look at the migration, but that should not block this PR, right?
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.
Right, both this PR and a template upgrade are non-breaking, so aren't blocked. It's only at the point where it would actually be removed that a migrator would be necessary.
f819d0f
to
400a006
Compare
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.
This LGTM to land.
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
This new runloop gets rid of extra CPU load on Windows, but may require a version that is not available on all channels yet. Refer to issue: flutter/flutter#79195 flutter/engine#24232 This should fix it at some point: flutter/flutter#79969
flutter/flutter#75500
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.