From 0a1c5dc54b55068a1ea59fbfa2f6f17acc3cefba Mon Sep 17 00:00:00 2001 From: Dan Field Date: Sat, 16 Jan 2021 21:13:27 -0800 Subject: [PATCH] Roll clang further, fix buggy test --- DEPS | 2 +- flow/layers/image_filter_layer.cc | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 0e9c2ecf9f4c5..2ac44a50496d8 100644 --- a/DEPS +++ b/DEPS @@ -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"', diff --git a/flow/layers/image_filter_layer.cc b/flow/layers/image_filter_layer.cc index 96986bb43deba..da6d354d075d7 100644 --- a/flow/layers/image_filter_layer.cc +++ b/flow/layers/image_filter_layer.cc @@ -14,19 +14,22 @@ ImageFilterLayer::ImageFilterLayer(sk_sp 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; } + + 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;