Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit b3ab833

Browse files
author
jonahwilliams
committed
update comment.
1 parent bc2276e commit b3ab833

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

impeller/entity/save_layer_utils.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ std::optional<Rect> ComputeSaveLayerCoverage(
1414
bool flood_output_coverage,
1515
bool flood_input_coverage) {
1616
Rect coverage = content_coverage;
17-
// There are two conditions that currently trigger flood_input_coverage, the
18-
// first is the presence of a backdrop filter and the second is the presence
19-
// of a color filter that effects transparent black.
17+
// There are three conditions that currently trigger flood_input_coverage, the
18+
// first is the presence of a backdrop filter on the saveLayer. The second is
19+
// the presence of a color filter that effects transparent black on the
20+
// saveLayer. The last is the presence of unbounded content within the
21+
// saveLayer (such as a drawPaint, bdf, et cetera).
2022
//
2123
// Backdrop filters apply before the saveLayer is restored. The presence of
2224
// a backdrop filter causes the content coverage of the saveLayer to be
@@ -28,6 +30,9 @@ std::optional<Rect> ComputeSaveLayerCoverage(
2830
// color filter and could allocate a render target sized just to the content,
2931
// but we don't currenty have the means to do so. Flooding the coverage is a
3032
// non-optimal but technically correct way to render this.
33+
//
34+
// If the saveLayer contains unbounded content, then at this point the
35+
// dl_dispatched will have set content coverage to Rect::MakeMaximum().
3136
if (flood_input_coverage) {
3237
coverage = Rect::MakeMaximum();
3338
}

0 commit comments

Comments
 (0)