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 @@ -112,18 +112,22 @@ void ImageFilterLayer::Paint(PaintContext& context) const {
112
112
}
113
113
}
114
114
115
- // Now apply the image filter and then try rendering children either from
116
- // cache or directly.
117
- mutator.applyImageFilter (child_paint_bounds (), filter_);
118
-
119
115
if (context.raster_cache && layer_raster_cache_item_->IsCacheChildren ()) {
116
+ // If we render the children from cache then we need the special
117
+ // transformed version of the filter so we must process it into the
118
+ // cache paint object manually.
119
+ FML_DCHECK (transformed_filter_ != nullptr );
120
120
SkPaint sk_paint;
121
- if (layer_raster_cache_item_->Draw (context,
122
- context.state_stack .fill (sk_paint))) {
121
+ context.state_stack .fill (sk_paint);
122
+ sk_paint.setImageFilter (transformed_filter_->skia_object ());
123
+ if (layer_raster_cache_item_->Draw (context, &sk_paint)) {
123
124
return ;
124
125
}
125
126
}
126
127
128
+ // Now apply the image filter and then try rendering the children.
129
+ mutator.applyImageFilter (child_paint_bounds (), filter_);
130
+
127
131
PaintChildren (context);
128
132
}
129
133
You can’t perform that action at this time.
0 commit comments