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
Address comment
  • Loading branch information
bdero committed Jun 7, 2022
commit d808f61d417abce251133ddbe22086458a493ea8
7 changes: 2 additions & 5 deletions impeller/display_list/display_list_dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,8 @@ void DisplayListDispatcher::saveLayer(const SkRect* bounds,
const flutter::SaveLayerOptions options,
const flutter::DlImageFilter* backdrop) {
auto paint = options.renders_with_attributes() ? paint_ : Paint{};
if (backdrop) {
canvas_.SaveLayer(paint, ToRect(bounds), ToImageFilterProc(backdrop));
} else {
canvas_.SaveLayer(paint, ToRect(bounds));
}
canvas_.SaveLayer(paint, ToRect(bounds),
backdrop ? ToImageFilterProc(backdrop) : std::nullopt);
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking more along the lines of just:

canvas_.SaveLayer(paint, ToRect(bounds), ToImageFilterProc(backdrop));

since ToIFP handles null already...

Copy link
Member Author

Choose a reason for hiding this comment

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

Whoopsies, went too fast here. Fixed.

}

// |flutter::Dispatcher|
Expand Down