-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Allow Hybrid Composition fallback for Android platform views #109161
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
Allow Hybrid Composition fallback for Android platform views #109161
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 (don't just cc him here, he won't see it! He's on Discord!). 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. |
|
@bparrishMines @dnfield Same here; still needs tests, but I would appreciate feedback. I have concerns about the fundamentals of the create/resize logic code here for TLHC (i.e., I suspect there are more subtle race conditions that are still latent here that this change neither fixes nor worsens), but wanted to limit the scope here since I am still hoping to get this onto |
With more investigation, it looks like this is actually a 3.1+ regression, so I'm going to split it out into its own fix. It's a new regression that only affects beta, and it severely breaks HC mode, so should be fixed and cherry-picked separately. (I was hoping to avoid layer fixes and cherry picks, but this seems critical enough to take that risk.) |
|
This still needs widgets tests for the new switching widget, but I think it would be worth reviewing now to see if that approach is in fact what we want before I implement the tests for it. |
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 Someone on the framework team should should probably have a look as well though. I'm not sure who currently own this code
dnfield
left a comment
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
|
I have a small question. After this gets merged what would be the breakdown of modes?
What would be used by default by |
This PR doesn't change the behavior of
This PR doesn't change the behavior of |
|
(triage): @stuartmorgan do you still have plans for this PR? |
|
I'll be updating it shortly to be landing-ready; the engine side just landed. |
Allows for the new Android platform view mode introduced in Flutter 3.0 (tentatively called Texture Layer Hybrid Composition) to fall back to Hybrid Composition rather than Virtual Display when TLHC mode is not supported if it was created with
initSurfaceAndroidView, which was HC in Flutter 2.x. This allows us to avoid the issue introduced in Flutter 3.0 where a plugin that previously used HC will now use VD in some cases, which would not be the plugin author's intent since they had explicitly chosen the initialization mode that was for HC in Flutter 2.x.In order to minimize breaking changes (in the hopes of cherry picking this to
beta), this keeps all of the existing class return types, and extracts all of their logic to display-specific helpers that can be delegated to, allowing for the same class to switch from TLHC (which uses texture display) to HC (which composes actual views).Fixes #107313
Engine portion: flutter/engine#35233
Pre-launch Checklist
///).