-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Sync presentation when rendering into FlutterImageView. #44881
Conversation
|
This isn't really the "right" way to do this, but I'm not sure how much effort we should invest in the right way. I think the correct way would be something like having the FlutterEngine render into an external memory hardware buffer? |
| return platform_message_handler_; | ||
| } | ||
|
|
||
| void SetIsRenderingToImageView(bool value) { |
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.
If it is possible (I think it is) to have more than one FlutterImageViews active concurrently this should probably keep track of an integer count and only update the context when it hits 0 or != 0
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 think I could get that to happen if I overlay something on the platform view. Will try that out and see if I can repro.
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 played aroud with this a bit and I wasn't able to get this to happen in a simple example with an overlay over a platform view. In that case it looks like the overlay view is added as a child of the FlutterView and so their lifecycle is tied.
Perhaps this could happen in an add2app scenario with multiple flutter views sharing the same engine? Extermely cursed to think about those having platform views in them - but I'll make it a count anyway since that should be perfectly safe (TM).
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.
Thanks!
|
I moved the state tracking into the FlutterImageView as there seemed to be fewer potential entrypoints to worry about. Something odd about this style of platform view is that we seem to immediately switch to imageview rendering when the platform view is added to the framework layer tree, even if it is offscreen. |
|
Which is to say this change unfortunately regresses the performance of the entire wonderous editorial screen. |
| return platform_message_handler_; | ||
| } | ||
|
|
||
| void SetIsRenderingToImageView(bool value) { |
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.
Thanks!
…133520) flutter/engine@45e2b41...1e82196 2023-08-29 [email protected] [Impeller] Sync presentation when rendering into FlutterImageView. (flutter/engine#44881) 2023-08-28 [email protected] Roll Fuchsia Linux SDK from AQZddYgKiWrQL8vny... to Ys38QMyFZToJxnXrF... (flutter/engine#45195) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from AQZddYgKiWrQ to Ys38QMyFZToJ If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#44881) Fixes flutter/flutter#131730 When the Android embedder starts rendering into a FlutterImageView, notify the Impeller context to block on submitKHR.
Fixes flutter/flutter#131730
When the Android embedder starts rendering into a FlutterImageView, notify the Impeller context to block on submitKHR.