5#ifndef FLUTTER_IMPELLER_AIKS_IMAGE_FILTER_H_
6#define FLUTTER_IMPELLER_AIKS_IMAGE_FILTER_H_
19class LocalMatrixImageFilter;
21class DilateImageFilter;
22class ErodeImageFilter;
23class MatrixImageFilter;
24class ComposeImageFilter;
25class ColorImageFilter;
48 static std::shared_ptr<ImageFilter>
MakeBlur(
60 static std::shared_ptr<ImageFilter>
MakeMatrix(
87 virtual std::shared_ptr<ImageFilter>
Clone()
const = 0;
106 std::shared_ptr<FilterContents>
WrapInput(
110 std::shared_ptr<ImageFilter>
Clone()
const override;
133 std::shared_ptr<FilterContents>
WrapInput(
137 std::shared_ptr<ImageFilter>
Clone()
const override;
158 std::shared_ptr<FilterContents>
WrapInput(
162 std::shared_ptr<ImageFilter>
Clone()
const override;
183 std::shared_ptr<FilterContents>
WrapInput(
187 std::shared_ptr<ImageFilter>
Clone()
const override;
210 std::shared_ptr<FilterContents>
WrapInput(
214 std::shared_ptr<ImageFilter>
Clone()
const override;
220 std::shared_ptr<ImageFilter> inner_;
221 std::shared_ptr<ImageFilter> outer_;
235 std::shared_ptr<FilterContents>
WrapInput(
239 std::shared_ptr<ImageFilter>
Clone()
const override;
245 std::shared_ptr<ColorFilter> color_filter_;
260 std::shared_ptr<FilterContents>
WrapInput(
264 std::shared_ptr<ImageFilter>
Clone()
const override;
271 std::shared_ptr<ImageFilter> internal_filter_;
static sk_sp< SkImage > color_filter(const SkImage *image, SkColorFilter *colorFilter)
std::shared_ptr< ImageFilter > Clone() const override
void Visit(ImageFilterVisitor &visitor) 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.
void Visit(ImageFilterVisitor &visitor) override
~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
void Visit(ImageFilterVisitor &visitor) 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.
void Visit(ImageFilterVisitor &visitor) override
~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
void Visit(ImageFilterVisitor &visitor) override
virtual void Visit(const DilateImageFilter &filter)=0
virtual void Visit(const BlurImageFilter &filter)=0
virtual void Visit(const MatrixImageFilter &filter)=0
virtual void Visit(const ErodeImageFilter &filter)=0
virtual void Visit(const LocalMatrixImageFilter &filter)=0
virtual void Visit(const ComposeImageFilter &filter)=0
virtual void Visit(const ColorImageFilter &filter)=0
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)
virtual void Visit(ImageFilterVisitor &visitor)=0
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)
virtual std::shared_ptr< ImageFilter > Clone() const =0
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)
void Visit(ImageFilterVisitor &visitor) override
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.
void Visit(ImageFilterVisitor &visitor) override
~MatrixImageFilter() override
const Matrix & GetMatrix() const
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...