25 return std::make_shared<BlurImageFilter>(sigma_x, sigma_y, blur_style,
31 return std::make_shared<DilateImageFilter>(radius_x, radius_y);
36 return std::make_shared<ErodeImageFilter>(radius_x, radius_y);
42 return std::make_shared<MatrixImageFilter>(
matrix,
43 std::move(sampler_descriptor));
49 return std::make_shared<ComposeImageFilter>(inner, outer);
60 return std::make_shared<LocalMatrixImageFilter>(
matrix, internal_filter);
77 blur_style_(blur_style),
78 tile_mode_(tile_mode) {}
89 return std::make_shared<BlurImageFilter>(*
this);
97 : radius_x_(radius_x), radius_y_(radius_y) {}
108 return std::make_shared<DilateImageFilter>(*
this);
116 : radius_x_(radius_x), radius_y_(radius_y) {}
127 return std::make_shared<ErodeImageFilter>(*
this);
136 : matrix_(
matrix), sampler_descriptor_(
std::move(sampler_descriptor)) {}
146 return std::make_shared<MatrixImageFilter>(*
this);
155 : inner_(inner.Clone()), outer_(outer.Clone()) {}
165 return std::make_shared<ComposeImageFilter>(*
this);
179 return color_filter_->WrapWithGPUColorFilter(
184 return std::make_shared<ColorImageFilter>(*
this);
194 : matrix_(
matrix), internal_filter_(internal_filter.Clone()) {}
205 return std::make_shared<LocalMatrixImageFilter>(*
this);
static sk_sp< SkImage > color_filter(const SkImage *image, SkColorFilter *colorFilter)
std::shared_ptr< ImageFilter > Clone() const override
~BlurImageFilter() override
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
BlurImageFilter(Sigma sigma_x, Sigma sigma_y, FilterContents::BlurStyle blur_style, Entity::TileMode tile_mode)
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
~ColorImageFilter() override
std::shared_ptr< ImageFilter > Clone() const override
ColorImageFilter(const ColorFilter &color_filter)
ComposeImageFilter(const ImageFilter &inner, const ImageFilter &outer)
std::shared_ptr< ImageFilter > Clone() const override
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
~ComposeImageFilter() override
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
~DilateImageFilter() override
std::shared_ptr< ImageFilter > Clone() const override
DilateImageFilter(Radius radius_x, Radius radius_y)
std::shared_ptr< ImageFilter > Clone() const override
ErodeImageFilter(Radius radius_x, Radius radius_y)
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
~ErodeImageFilter() override
static std::shared_ptr< FilterContents > MakeGaussianBlur(const FilterInput::Ref &input, Sigma sigma_x, Sigma sigma_y, Entity::TileMode tile_mode=Entity::TileMode::kDecal, BlurStyle mask_blur_style=BlurStyle::kNormal, const std::shared_ptr< Geometry > &mask_geometry=nullptr)
static std::shared_ptr< FilterContents > MakeMorphology(FilterInput::Ref input, Radius radius_x, Radius radius_y, MorphType morph_type)
static std::shared_ptr< FilterContents > MakeLocalMatrixFilter(FilterInput::Ref input, const Matrix &matrix)
static std::shared_ptr< FilterContents > MakeMatrixFilter(FilterInput::Ref input, const Matrix &matrix, const SamplerDescriptor &desc)
static std::shared_ptr< ImageFilter > MakeMatrix(const Matrix &matrix, SamplerDescriptor sampler_descriptor)
static std::shared_ptr< ImageFilter > MakeLocalMatrix(const Matrix &matrix, const ImageFilter &internal_filter)
static std::shared_ptr< ImageFilter > MakeErode(Radius radius_x, Radius radius_y)
virtual std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const =0
Wraps the given filter input with a GPU-based image filter.
static std::shared_ptr< ImageFilter > MakeBlur(Sigma sigma_x, Sigma sigma_y, FilterContents::BlurStyle blur_style, Entity::TileMode tile_mode)
static std::shared_ptr< ImageFilter > MakeDilate(Radius radius_x, Radius radius_y)
static std::shared_ptr< ImageFilter > MakeFromColorFilter(const ColorFilter &color_filter)
std::shared_ptr< FilterContents > GetFilterContents() const
Generate a new FilterContents using this filter's configuration.
static std::shared_ptr< ImageFilter > MakeCompose(const ImageFilter &inner, const ImageFilter &outer)
LocalMatrixImageFilter(const Matrix &matrix, const ImageFilter &internal_filter)
std::shared_ptr< ImageFilter > Clone() const override
~LocalMatrixImageFilter() override
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
std::shared_ptr< ImageFilter > Clone() const override
MatrixImageFilter(const Matrix &matrix, SamplerDescriptor sampler_descriptor)
std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const override
Wraps the given filter input with a GPU-based image filter.
~MatrixImageFilter() override
unsigned useCenter Optional< SkMatrix > matrix
A 4x4 matrix using column-major storage.
For convolution filters, the "radius" is the size of the convolution kernel to use on the local space...
In filters that use Gaussian distributions, "sigma" is a size of one standard deviation in terms of t...