Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/third_party/clang/${{platform}}',
'version': 'git_revision:25abd1994ed209c1bf4139946a42e36a42143a85'
'version': 'git_revision:7d48eff8ba172216fca3649a3c452de4c7c16c00'
}
],
'condition': 'host_os == "mac" or host_os == "linux"',
Expand Down
17 changes: 10 additions & 7 deletions flow/layers/image_filter_layer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ ImageFilterLayer::ImageFilterLayer(sk_sp<SkImageFilter> filter)
void ImageFilterLayer::Preroll(PrerollContext* context,
const SkMatrix& matrix) {
TRACE_EVENT0("flutter", "ImageFilterLayer::Preroll");

Layer::AutoPrerollSaveLayerState save =
Layer::AutoPrerollSaveLayerState::Create(context);

SkRect child_bounds = SkRect::MakeEmpty();
PrerollChildren(context, matrix, &child_bounds);
if (filter_) {
const SkIRect filter_input_bounds = child_bounds.roundOut();
SkIRect filter_output_bounds =
filter_->filterBounds(filter_input_bounds, SkMatrix::I(),
SkImageFilter::kForward_MapDirection);
child_bounds = SkRect::Make(filter_output_bounds);

if (!filter_) {
set_paint_bounds(child_bounds);
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This avoids https://github.com/flutter/engine/pull/23751/files#diff-ed00eb358e01399f0680370efff68aa55b41d3a886d3a0d9c9c7078323660a37R55, which previously would get hit in the ImageFilterLayerTest.EmptyFilter test from flow_unittests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(line 55 below here, 52 in the original source)

}

const SkIRect filter_input_bounds = child_bounds.roundOut();
SkIRect filter_output_bounds = filter_->filterBounds(
filter_input_bounds, SkMatrix::I(), SkImageFilter::kForward_MapDirection);
child_bounds = SkRect::Make(filter_output_bounds);

set_paint_bounds(child_bounds);

transformed_filter_ = nullptr;
Expand Down