-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] separate algorithm for computing render target size. #54604
Changes from 30 commits
9d59af1
a935594
7aa3a48
54cea5a
e6e56d8
98a5d68
81ccaa0
55a6a50
3591395
a8f0e2c
1c55cf5
a6f5f21
a646c1b
8daf291
199a846
b2eb6b9
d347783
24442e0
78b7f60
2a4ac2d
3eff88b
04b5be5
086abb8
4a5f30b
fa3afcc
4e7a707
e0105d7
e8f34ac
8a3d1ef
24ef59a
0cae7a8
ae57e62
bc2276e
b3ab833
334e5e9
82a6621
5011b3c
008b6f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -722,23 +722,10 @@ void DlDispatcherBase::saveLayer(const SkRect& bounds, | |
| auto promise = options.content_is_clipped() | ||
| ? ContentBoundsPromise::kMayClipContents | ||
| : ContentBoundsPromise::kContainsContents; | ||
| std::optional<Rect> impeller_bounds; | ||
| if (!options.content_is_unbounded() || options.bounds_from_caller()) { | ||
| impeller_bounds = skia_conversions::ToRect(bounds); | ||
| } | ||
|
|
||
| // Empty bounds on a save layer that contains a BDF or destructive blend | ||
| // should be treated as unbounded. All other empty bounds can be skipped. | ||
| if (impeller_bounds.has_value() && impeller_bounds->IsEmpty() && | ||
| (backdrop != nullptr || | ||
| Entity::IsBlendModeDestructive(paint.blend_mode))) { | ||
| impeller_bounds = std::nullopt; | ||
| } | ||
|
|
||
| std::optional<Rect> impeller_bounds = skia_conversions::ToRect(bounds); | ||
| GetCanvas().SaveLayer(paint, impeller_bounds, ToImageFilter(backdrop), | ||
| promise, total_content_depth, | ||
| options.can_distribute_opacity(), | ||
| options.bounds_from_caller()); | ||
| options.can_distribute_opacity()); | ||
|
||
| } | ||
|
|
||
| // |flutter::DlOpReceiver| | ||
|
|
||
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.
Should this also examine the paint.color_filter?
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.
We don't know that bit currently, but we will eventually: flutter/flutter#154035
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.
(once we delete impeller::ColorFilter)