This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed
Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -737,20 +737,9 @@ void Canvas::DrawImageRect(const std::shared_ptr<Image>& image,
737737 texture_contents->SetOpacity (paint.color .alpha );
738738 texture_contents->SetDeferApplyingOpacity (paint.HasColorFilter ());
739739
740- bool needs_color_filter = paint.HasColorFilter ();
741- if (needs_color_filter) {
742- auto color_filter = paint.GetColorFilter ();
743- if (texture_contents->ApplyColorFilter (
744- color_filter->GetCPUColorFilterProc ())) {
745- needs_color_filter = false ;
746- }
747- }
748-
749740 std::shared_ptr<Contents> contents = texture_contents;
750741 if (paint.mask_blur_descriptor .has_value ()) {
751- contents = paint.mask_blur_descriptor ->CreateMaskBlur (
752- texture_contents,
753- needs_color_filter ? paint.GetColorFilter () : nullptr );
742+ contents = paint.mask_blur_descriptor ->CreateMaskBlur (texture_contents);
754743 }
755744
756745 Entity entity;
Original file line number Diff line number Diff line change @@ -123,8 +123,7 @@ std::shared_ptr<Contents> Paint::WithColorFilter(
123123}
124124
125125std::shared_ptr<FilterContents> Paint::MaskBlurDescriptor::CreateMaskBlur (
126- std::shared_ptr<TextureContents> texture_contents,
127- const std::shared_ptr<ColorFilter>& color_filter) const {
126+ std::shared_ptr<TextureContents> texture_contents) const {
128127 Scalar expand_amount = GaussianBlurFilterContents::CalculateBlurRadius (
129128 GaussianBlurFilterContents::ScaleSigma (sigma.sigma ));
130129 texture_contents->SetSourceRect (
Original file line number Diff line number Diff line change @@ -45,8 +45,7 @@ struct Paint {
4545 const std::shared_ptr<ColorFilter>& color_filter) const ;
4646
4747 std::shared_ptr<FilterContents> CreateMaskBlur (
48- std::shared_ptr<TextureContents> texture_contents,
49- const std::shared_ptr<ColorFilter>& color_filter) const ;
48+ std::shared_ptr<TextureContents> texture_contents) const ;
5049
5150 std::shared_ptr<FilterContents> CreateMaskBlur (
5251 const FilterInput::Ref& input,
You can’t perform that action at this time.
0 commit comments