Skip to content

Commit 4b95209

Browse files
authored
[Impeller] Use new DisplayList SaveLayer unbounded flag (flutter#54085)
Impeller had been disabling a save layer bounds optimization under certain conditions that were meant to imply that the layer was unbounded. The DisplayList now includes a flag indicating exactly when the layer is unbounded so we will now use that flag instead of an assumed implication to check for this condition.
1 parent b32c516 commit 4b95209

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

impeller/display_list/dl_dispatcher.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,6 @@ void DlDispatcherBase::save(uint32_t total_content_depth) {
612612
GetCanvas().Save(total_content_depth);
613613
}
614614

615-
static constexpr SkRect kMaxCullRect =
616-
SkRect::MakeLTRB(-1E9F, -1E9F, 1E9F, 1E9F);
617-
618615
// |flutter::DlOpReceiver|
619616
void DlDispatcherBase::saveLayer(const SkRect& bounds,
620617
const flutter::SaveLayerOptions& options,
@@ -626,9 +623,7 @@ void DlDispatcherBase::saveLayer(const SkRect& bounds,
626623
? ContentBoundsPromise::kMayClipContents
627624
: ContentBoundsPromise::kContainsContents;
628625
std::optional<Rect> impeller_bounds;
629-
if (bounds == kMaxCullRect) {
630-
impeller_bounds = std::nullopt;
631-
} else {
626+
if (!options.content_is_unbounded()) {
632627
impeller_bounds = skia_conversions::ToRect(bounds);
633628
}
634629

0 commit comments

Comments
 (0)