Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 66c4d38

Browse files
committed
removed color filter
1 parent abd12a4 commit 66c4d38

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

impeller/aiks/canvas.cc

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff 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;

impeller/aiks/paint.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ std::shared_ptr<Contents> Paint::WithColorFilter(
123123
}
124124

125125
std::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(

impeller/aiks/paint.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)