-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] fix subpass collapse pass ending logic #40057
Conversation
impeller/entity/entity_unittests.cc
Outdated
@@ -85,15 +85,19 @@ class TestPassDelegate final : public EntityPassDelegate { | |||
|
|||
private: | |||
const std::optional<Rect> coverage_; | |||
bool collapse_; |
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.
Nit: Default it, or if it set in a ctor, const bool
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
auto label is removed for flutter/engine, pr: 40057, due to - The status or check suite Linux Android clang-tidy has failed. Please fix the issues identified (or deflake) before re-applying this label. |
@@ -38,6 +40,7 @@ class InlinePassContext { | |||
std::shared_ptr<RenderPass> pass_; | |||
uint32_t pass_count_ = 0; | |||
uint32_t total_pass_reads_ = 0; | |||
bool collapsed_parent_pass_ = 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.
nit: is_collapsed_
?
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
Discovered during investigation of opacity optimizations, currently OnRender will unconditionally end the current pass - but this is incorrect if we're merged into the parent pass. Detect this case and ensure that the collapsed child gets the same render target and render pass.