-
Notifications
You must be signed in to change notification settings - Fork 6k
Move layer tree construction into flow::LayerBuilder so alternate builders can be plugged in. #4197
Conversation
…lders can be plugged in.
jason-simmons
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
| m_currentLayer->Add(std::move(layer)); | ||
| m_currentLayer = newLayer; | ||
| layer_builder_.PushPhysicalModel( | ||
| rrect.sk_rrect, // |
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.
Add text here or remove these empty comments
(a few other PushModel calls have similar formatting)
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 added those so clang format displayed them a separate line. I'll add comments.
|
Haven't tested this on Fuchsia yet. Will hold off on landing this till I do. |
flow/layers/layer_builder.cc
Outdated
| #include "flutter/flow/layers/color_filter_layer.h" | ||
| #include "flutter/flow/layers/container_layer.h" | ||
| #include "flutter/flow/layers/layer.h" | ||
| #include "flutter/flow/layers/layer_builder.h" |
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.
The primary header should be first, followed by a blank line, followed by the rest of the headers. This pattern ensures that each header can build on its own (and doesn't require other headers to be included first).
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.
Done.
This essentially reverts flutter#4197 as no one is (or soon will be) implementing an alternative LayerBuilder. Let's just put everything in SceneBuilder to reduce the YAGNI (you aren't gonna need it) smell. This will also make retained rendering API changes much easier.
This essentially reverts #4197 as no one is (or soon will be) implementing an alternative LayerBuilder. Let's just put everything in SceneBuilder to reduce the YAGNI (you aren't gonna need it) smell. This will also make retained rendering API changes much easier.
This essentially reverts flutter#4197 as no one is (or soon will be) implementing an alternative LayerBuilder. Let's just put everything in SceneBuilder to reduce the YAGNI (you aren't gonna need it) smell. This will also make retained rendering API changes much easier.
This essentially reverts flutter#4197 as no one is (or soon will be) implementing an alternative LayerBuilder. Let's just put everything in SceneBuilder to reduce the YAGNI (you aren't gonna need it) smell. This will also make retained rendering API changes much easier.

This moves all the logic of construction of the layer tree into flow.