-
Notifications
You must be signed in to change notification settings - Fork 6k
fuchsia: create new flutter_runner render path #19584
Conversation
c4a0ac7
to
3094fd2
Compare
2bc3b1e
to
41cf2fa
Compare
41cf2fa
to
7d088fd
Compare
b48198e
to
66c9c08
Compare
1a8aadd
to
5adcb37
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.
I gave this a glance. I'm fine with it if everyone else is. I just had some style nits for the most part, maths seems fine. The thing that bothers me about it, if I may, is that it has placed a lot of conditional compilation all over the place. Which is especially bad because it is supporting legacy features and presumably will be removed at some point?
Alternatively a bit more care could be taken to reduce the number of #if
s. For example there could be 2 different SceneUpdateContext's:
static SceneUpdateContext* SceneUpdateContext::Create() {
#if defined(LEGACY_FUCHSIA_EMBEDDER)
return SceneUpdateContextLegacy();
#else
return SceneUpdateContextStandard();
#endif
}
This setup has the benefit of compiling the legacy code to make sure it doesn't atrophy. Keeps the standard implementation easier to read and makes the removal of the legacy code trivial. Also for other places where the #if
s are happening, if you wrap up the code in functions, the contract of the code is explicit which makes it easier to rip out or reason about. That's my take at least.
=)
Newest version almost does this, although it's not quite as clean as what you suggested here. The complexity is contained to engine.cc though (which is the Fuchsia "embedder" and will be mutating rapidly). |
7ef99b4
to
6905ddf
Compare
If this CL lands, it puts Fuchsia on parity with iOS/Android in terms of external view embedding! |
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 if gaaclarke is ok with latest version of this change
bc07866
to
5fed170
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 seems reasonable. We could clean it up more but as LEGACY_FUCHSIA_EMBEDDER is going away asap I think some extra code to keep it less risky for now is good.
b9bb5ed
to
157a6c3
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.
Wow, I almost don't even recognize it. FuchsiaExternalViewEmbedder worked out great. I think the #if
s are in a better position now. LGTM
157a6c3
to
ea552bc
Compare
ea552bc
to
21e37e3
Compare
Description
This new render path implements the ExternalViewEmbedder interface without using any legacy code, keeping all Scenic interaction contained to the embedder. I cribbed liberally from EmbedderExternalViewEmbedder when creating this.
Once stabilized, To-be-replaced by moving Fuchsia behind the formal C API in a series of follow-up CLs.
Related Issues
https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=46971
Tests
Ran workstation shell and internal tests w/ both render paths.