This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -109,18 +109,22 @@ void ImageFilterLayer::Paint(PaintContext& context) const {
109
109
}
110
110
}
111
111
112
- // Now apply the image filter and then try rendering children either from
113
- // cache or directly.
114
- mutator.applyImageFilter (child_paint_bounds (), filter_);
115
-
116
112
if (context.raster_cache && layer_raster_cache_item_->IsCacheChildren ()) {
113
+ // If we render the children from cache then we need the special
114
+ // transformed version of the filter so we must process it into the
115
+ // cache paint object manually.
116
+ FML_DCHECK (transformed_filter_ != nullptr );
117
117
SkPaint sk_paint;
118
- if (layer_raster_cache_item_->Draw (context,
119
- context.state_stack .fill (sk_paint))) {
118
+ context.state_stack .fill (sk_paint);
119
+ sk_paint.setImageFilter (transformed_filter_->skia_object ());
120
+ if (layer_raster_cache_item_->Draw (context, &sk_paint)) {
120
121
return ;
121
122
}
122
123
}
123
124
125
+ // Now apply the image filter and then try rendering the children.
126
+ mutator.applyImageFilter (child_paint_bounds (), filter_);
127
+
124
128
PaintChildren (context);
125
129
}
126
130
You can’t perform that action at this time.
0 commit comments