-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Make Entity move only, simplify construction of geometry/filter contents. #48596
Conversation
@@ -23,6 +25,80 @@ | |||
|
|||
namespace impeller { | |||
|
|||
namespace { | |||
|
|||
static std::shared_ptr<Contents> CreateContentsForGeometryWithFilters( |
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 also fixes the double application of color filters.
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.
Can you link an issue please.
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.
Filled here: flutter/flutter#139569
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
Golden file changes are available for triage from new commit, Click here to view. |
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, looks good, there are just a couple of cleanup suggestions that are worth doing.
impeller/aiks/canvas.cc
Outdated
static std::shared_ptr<Contents> CreateContentsWithFilters(const Paint& paint, | ||
Path path = {}, | ||
bool cover = false) { |
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 function does 2 different things. If cover == true, path
is completely ignored. Can you split this into 2 different functions.
CreateContentsWithFilters(paint, path)
and CreateCoverContentsWithFilters(paint)
?
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
impeller/entity/entity.cc
Outdated
Entity copy = *this; | ||
return copy; |
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.
return Entity(*this);
? I want to make to make the decision to elide the copy as easy as possible for the compiler.
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
impeller/entity/entity_pass.cc
Outdated
elements_.insert(elements_.end(), | ||
std::make_move_iterator(pass->elements_.begin()), | ||
std::make_move_iterator(pass->elements_.end())); | ||
auto& elements = pass->elements_; |
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.
Remove auto
please.
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
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!
Golden file changes are available for triage from new commit, Click here to view. |
…geometry/filter contents. (flutter/engine#48596)
…139583) flutter/engine@7133378...cfdaecc 2023-12-05 [email protected] A11y enabled state (flutter/engine#48653) 2023-12-05 [email protected] Roll Skia from bf1db1c75704 to c0ad3e9bdec0 (1 revision) (flutter/engine#48685) 2023-12-05 [email protected] [Impeller] started taking into account integer gaps in blur sigma, turned on linear filter (flutter/engine#48651) 2023-12-05 [email protected] Roll Dart SDK from 21574eae3a69 to 8bfec2c7ed43 (2 revisions) (flutter/engine#48683) 2023-12-05 [email protected] Update labeler to 5.0.0, fix yaml format for labeler 5.0.0 (flutter/engine#48682) 2023-12-05 [email protected] [Impeller] Make Entity move only, simplify construction of geometry/filter contents. (flutter/engine#48596) 2023-12-05 [email protected] [Impeller] Delete tessellation control/eval shader support. (flutter/engine#48649) 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Redo of #48585
Removes the Copy constructor of Entity, adds a clone method. Allows us to ensure that we move entity into the entity pass without using rvalue reference parameters
Fixes flutter/flutter#139569