Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
impeller::ImageFilter Class Referenceabstract

#include <image_filter.h>

Inheritance diagram for impeller::ImageFilter:
impeller::BlurImageFilter impeller::ColorImageFilter impeller::ComposeImageFilter impeller::DilateImageFilter impeller::ErodeImageFilter impeller::LocalMatrixImageFilter impeller::MatrixImageFilter

Public Member Functions

 ImageFilter ()
 
virtual ~ImageFilter ()
 
std::shared_ptr< FilterContentsGetFilterContents () const
 Generate a new FilterContents using this filter's configuration. More...
 
virtual std::shared_ptr< FilterContentsWrapInput (const FilterInput::Ref &input) const =0
 Wraps the given filter input with a GPU-based image filter. More...
 
virtual std::shared_ptr< ImageFilterClone () const =0
 
virtual void Visit (ImageFilterVisitor &visitor)=0
 

Static Public Member Functions

static std::shared_ptr< ImageFilterMakeBlur (Sigma sigma_x, Sigma sigma_y, FilterContents::BlurStyle blur_style, Entity::TileMode tile_mode)
 
static std::shared_ptr< ImageFilterMakeDilate (Radius radius_x, Radius radius_y)
 
static std::shared_ptr< ImageFilterMakeErode (Radius radius_x, Radius radius_y)
 
static std::shared_ptr< ImageFilterMakeMatrix (const Matrix &matrix, SamplerDescriptor sampler_descriptor)
 
static std::shared_ptr< ImageFilterMakeCompose (const ImageFilter &inner, const ImageFilter &outer)
 
static std::shared_ptr< ImageFilterMakeFromColorFilter (const ColorFilter &color_filter)
 
static std::shared_ptr< ImageFilterMakeLocalMatrix (const Matrix &matrix, const ImageFilter &internal_filter)
 

Detailed Description

Definition at line 42 of file image_filter.h.

Constructor & Destructor Documentation

◆ ImageFilter()

impeller::ImageFilter::ImageFilter ( )
default

◆ ~ImageFilter()

impeller::ImageFilter::~ImageFilter ( )
virtualdefault

Member Function Documentation

◆ Clone()

virtual std::shared_ptr< ImageFilter > impeller::ImageFilter::Clone ( ) const
pure virtual

◆ GetFilterContents()

std::shared_ptr< FilterContents > impeller::ImageFilter::GetFilterContents ( ) const

Generate a new FilterContents using this filter's configuration.

    This is the same as WrapInput, except no input is set. The input
    for the filter chain can be set later using.
    FilterContents::SetLeafInputs().
See also
FilterContents::SetLeafInputs

Definition at line 63 of file image_filter.cc.

63 {
65}
static FilterInput::Ref Make(Variant input, bool msaa_enabled=true)
Definition: filter_input.cc:19
virtual std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const =0
Wraps the given filter input with a GPU-based image filter.
TRect< Scalar > Rect
Definition: rect.h:769

◆ MakeBlur()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeBlur ( Sigma  sigma_x,
Sigma  sigma_y,
FilterContents::BlurStyle  blur_style,
Entity::TileMode  tile_mode 
)
static

Definition at line 20 of file image_filter.cc.

24 {
25 return std::make_shared<BlurImageFilter>(sigma_x, sigma_y, blur_style,
26 tile_mode);
27}

◆ MakeCompose()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeCompose ( const ImageFilter inner,
const ImageFilter outer 
)
static

Definition at line 46 of file image_filter.cc.

48 {
49 return std::make_shared<ComposeImageFilter>(inner, outer);
50}

◆ MakeDilate()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeDilate ( Radius  radius_x,
Radius  radius_y 
)
static

Definition at line 29 of file image_filter.cc.

30 {
31 return std::make_shared<DilateImageFilter>(radius_x, radius_y);
32}

◆ MakeErode()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeErode ( Radius  radius_x,
Radius  radius_y 
)
static

Definition at line 34 of file image_filter.cc.

35 {
36 return std::make_shared<ErodeImageFilter>(radius_x, radius_y);
37}

◆ MakeFromColorFilter()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeFromColorFilter ( const ColorFilter color_filter)
static

Definition at line 52 of file image_filter.cc.

53 {
54 return std::make_shared<ColorImageFilter>(color_filter);
55}
static sk_sp< SkImage > color_filter(const SkImage *image, SkColorFilter *colorFilter)

◆ MakeLocalMatrix()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeLocalMatrix ( const Matrix matrix,
const ImageFilter internal_filter 
)
static

Definition at line 57 of file image_filter.cc.

59 {
60 return std::make_shared<LocalMatrixImageFilter>(matrix, internal_filter);
61}
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258

◆ MakeMatrix()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeMatrix ( const Matrix matrix,
SamplerDescriptor  sampler_descriptor 
)
static

Definition at line 39 of file image_filter.cc.

41 {
42 return std::make_shared<MatrixImageFilter>(matrix,
43 std::move(sampler_descriptor));
44}

◆ Visit()

virtual void impeller::ImageFilter::Visit ( ImageFilterVisitor visitor)
pure virtual

◆ WrapInput()

virtual std::shared_ptr< FilterContents > impeller::ImageFilter::WrapInput ( const FilterInput::Ref input) const
pure virtual

The documentation for this class was generated from the following files: