Flutter Engine
flutter::ImageFilter Class Reference

#include <image_filter.h>

Inheritance diagram for flutter::ImageFilter:
flutter::RefCountedDartWrappable< ImageFilter > fml::RefCountedThreadSafe< ImageFilter > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

 ~ImageFilter () override
 
void initImage (CanvasImage *image)
 
void initPicture (Picture *)
 
void initBlur (double sigma_x, double sigma_y)
 
void initMatrix (const tonic::Float64List &matrix4, int filter_quality)
 
const sk_sp< SkImageFilter > & filter () const
 
- Public Member Functions inherited from flutter::RefCountedDartWrappable< ImageFilter >
virtual void RetainDartWrappableReference () const override
 
virtual void ReleaseDartWrappableReference () const override
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< ImageFilter >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 
- Public Member Functions inherited from tonic::DartWrappable
 DartWrappable ()
 
virtual const DartWrapperInfoGetDartWrapperInfo () const =0
 
virtual size_t GetAllocationSize () const
 
Dart_Handle CreateDartWrapper (DartState *dart_state)
 
void AssociateWithDartWrapper (Dart_Handle wrappable)
 
void ClearDartWrapper ()
 
Dart_WeakPersistentHandle dart_wrapper () const
 

Static Public Member Functions

static fml::RefPtr< ImageFilterCreate ()
 
static void RegisterNatives (tonic::DartLibraryNatives *natives)
 

Additional Inherited Members

- Public Types inherited from tonic::DartWrappable
enum  DartNativeFields {
  kPeerIndex,
  kWrapperInfoIndex,
  kNumberOfNativeFields
}
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< ImageFilter >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 
- Protected Member Functions inherited from tonic::DartWrappable
virtual ~DartWrappable ()
 
- Static Protected Member Functions inherited from tonic::DartWrappable
static Dart_PersistentHandle GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info)
 

Detailed Description

Definition at line 16 of file image_filter.h.

Constructor & Destructor Documentation

◆ ~ImageFilter()

flutter::ImageFilter::~ImageFilter ( )
override

Definition at line 45 of file image_filter.cc.

45 {}

Member Function Documentation

◆ Create()

fml::RefPtr< ImageFilter > flutter::ImageFilter::Create ( )
static

Definition at line 39 of file image_filter.cc.

Referenced by flutter::ImageFilter_constructor().

39  {
40  return fml::MakeRefCounted<ImageFilter>();
41 }

◆ filter()

const sk_sp<SkImageFilter>& flutter::ImageFilter::filter ( ) const
inline

◆ initBlur()

void flutter::ImageFilter::initBlur ( double  sigma_x,
double  sigma_y 
)

Definition at line 55 of file image_filter.cc.

55  {
56  filter_ = SkBlurImageFilter::Make(sigma_x, sigma_y, nullptr, nullptr,
57  SkBlurImageFilter::kClamp_TileMode);
58 }

◆ initImage()

void flutter::ImageFilter::initImage ( CanvasImage image)

Definition at line 47 of file image_filter.cc.

References flutter::CanvasImage::image().

47  {
48  filter_ = SkImageSource::Make(image->image());
49 }

◆ initMatrix()

void flutter::ImageFilter::initMatrix ( const tonic::Float64List &  matrix4,
int  filter_quality 
)

Definition at line 60 of file image_filter.cc.

References flutter::ToSkMatrix().

61  {
62  filter_ = SkImageFilter::MakeMatrixFilter(
63  ToSkMatrix(matrix4), static_cast<SkFilterQuality>(filterQuality),
64  nullptr);
65 }
SkMatrix ToSkMatrix(const tonic::Float64List &matrix4)
Definition: matrix.cc:20

◆ initPicture()

void flutter::ImageFilter::initPicture ( Picture picture)

Definition at line 51 of file image_filter.cc.

References flutter::Picture::picture().

51  {
52  filter_ = SkPictureImageFilter::Make(picture->picture());
53 }

◆ RegisterNatives()

void flutter::ImageFilter::RegisterNatives ( tonic::DartLibraryNatives natives)
static

Definition at line 33 of file image_filter.cc.

References DART_REGISTER_NATIVE, FOR_EACH_BINDING, and flutter::ImageFilter_constructor().

Referenced by filter(), and flutter::DartUI::InitForGlobal().

33  {
34  natives->Register(
35  {{"ImageFilter_constructor", ImageFilter_constructor, 1, true},
37 }
void Register(std::initializer_list< Entry > entries)
static void ImageFilter_constructor(Dart_NativeArguments args)
Definition: image_filter.cc:18
#define DART_REGISTER_NATIVE(CLASS, METHOD)
#define FOR_EACH_BINDING(V)
Definition: image_filter.cc:25

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