Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Prev Previous commit
Next Next commit
++
  • Loading branch information
jonahwilliams committed Mar 10, 2023
commit 966bf069f22c1f4cab622e92442fab0e358824d8
2 changes: 0 additions & 2 deletions impeller/aiks/paint_pass_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@ bool OpacityPeepholePassDelegate::CanCollapseIntoParentPass(
}
bool all_can_accept = true;
std::vector<Rect> all_coverages;
auto i = 0;
auto had_subpass = entity_pass->IterateAllFlatEntities([&](Entity& entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: avoid over-capturing (don't use [&]). Instead explicitly capture what you need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

auto contents = entity.GetContents();
if (!contents->CanAcceptOpacity(entity)) {
all_can_accept = false;
return false;
}
i++;
auto maybe_coverage = contents->GetCoverage(entity);
if (maybe_coverage.has_value()) {
auto coverage = maybe_coverage.value();
Expand Down