Flutter Engine
The Flutter Engine
Functions
filters.cpp File Reference
#include "export.h"
#include "helpers.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkMaskFilter.h"
#include "third_party/skia/include/effects/SkImageFilters.h"

Go to the source code of this file.

Functions

SKWASM_EXPORT SkImageFilterimageFilter_createBlur (SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode)
 
SKWASM_EXPORT SkImageFilterimageFilter_createDilate (SkScalar radiusX, SkScalar radiusY)
 
SKWASM_EXPORT SkImageFilterimageFilter_createErode (SkScalar radiusX, SkScalar radiusY)
 
SKWASM_EXPORT SkImageFilterimageFilter_createMatrix (SkScalar *matrix33, FilterQuality quality)
 
SKWASM_EXPORT SkImageFilterimageFilter_createFromColorFilter (SkColorFilter *filter)
 
SKWASM_EXPORT SkImageFilterimageFilter_compose (SkImageFilter *outer, SkImageFilter *inner)
 
SKWASM_EXPORT void imageFilter_dispose (SkImageFilter *filter)
 
SKWASM_EXPORT void imageFilter_getFilterBounds (SkImageFilter *filter, SkIRect *inOutBounds)
 
SKWASM_EXPORT SkColorFiltercolorFilter_createMode (SkColor color, SkBlendMode mode)
 
SKWASM_EXPORT SkColorFiltercolorFilter_createMatrix (float *matrixData)
 
SKWASM_EXPORT SkColorFiltercolorFilter_createSRGBToLinearGamma ()
 
SKWASM_EXPORT SkColorFiltercolorFilter_createLinearToSRGBGamma ()
 
SKWASM_EXPORT SkColorFiltercolorFilter_compose (SkColorFilter *outer, SkColorFilter *inner)
 
SKWASM_EXPORT void colorFilter_dispose (SkColorFilter *filter)
 
SKWASM_EXPORT SkMaskFiltermaskFilter_createBlur (SkBlurStyle blurStyle, SkScalar sigma)
 
SKWASM_EXPORT void maskFilter_dispose (SkMaskFilter *filter)
 

Function Documentation

◆ colorFilter_compose()

SKWASM_EXPORT SkColorFilter * colorFilter_compose ( SkColorFilter outer,
SkColorFilter inner 
)

Definition at line 82 of file filters.cpp.

83 {
84 return SkColorFilters::Compose(sk_ref_sp<SkColorFilter>(outer),
85 sk_ref_sp<SkColorFilter>(inner))
86 .release();
87}
static sk_sp< SkColorFilter > Compose(const sk_sp< SkColorFilter > &outer, sk_sp< SkColorFilter > inner)
Definition: SkColorFilter.h:92
T * release()
Definition: SkRefCnt.h:324

◆ colorFilter_createLinearToSRGBGamma()

SKWASM_EXPORT SkColorFilter * colorFilter_createLinearToSRGBGamma ( )

Definition at line 78 of file filters.cpp.

78 {
80}
static sk_sp< SkColorFilter > LinearToSRGBGamma()

◆ colorFilter_createMatrix()

SKWASM_EXPORT SkColorFilter * colorFilter_createMatrix ( float *  matrixData)

Definition at line 68 of file filters.cpp.

70 {
71 return SkColorFilters::Matrix(matrixData).release();
72}
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)

◆ colorFilter_createMode()

SKWASM_EXPORT SkColorFilter * colorFilter_createMode ( SkColor  color,
SkBlendMode  mode 
)

Definition at line 63 of file filters.cpp.

64 {
66}
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
DlColor color
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
Definition: switches.h:228

◆ colorFilter_createSRGBToLinearGamma()

SKWASM_EXPORT SkColorFilter * colorFilter_createSRGBToLinearGamma ( )

Definition at line 74 of file filters.cpp.

74 {
76}
static sk_sp< SkColorFilter > SRGBToLinearGamma()

◆ colorFilter_dispose()

SKWASM_EXPORT void colorFilter_dispose ( SkColorFilter filter)

Definition at line 89 of file filters.cpp.

89 {
90 filter->unref();
91}
void unref() const
Definition: SkRefCnt.h:72

◆ imageFilter_compose()

SKWASM_EXPORT SkImageFilter * imageFilter_compose ( SkImageFilter outer,
SkImageFilter inner 
)

Definition at line 44 of file filters.cpp.

45 {
46 return SkImageFilters::Compose(sk_ref_sp<SkImageFilter>(outer),
47 sk_ref_sp<SkImageFilter>(inner))
48 .release();
49}
static sk_sp< SkImageFilter > Compose(sk_sp< SkImageFilter > outer, sk_sp< SkImageFilter > inner)

◆ imageFilter_createBlur()

SKWASM_EXPORT SkImageFilter * imageFilter_createBlur ( SkScalar  sigmaX,
SkScalar  sigmaY,
SkTileMode  tileMode 
)

Definition at line 14 of file filters.cpp.

16 {
17 return SkImageFilters::Blur(sigmaX, sigmaY, tileMode, nullptr).release();
18}
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ imageFilter_createDilate()

SKWASM_EXPORT SkImageFilter * imageFilter_createDilate ( SkScalar  radiusX,
SkScalar  radiusY 
)

Definition at line 20 of file filters.cpp.

21 {
22 return SkImageFilters::Dilate(radiusX, radiusY, nullptr).release();
23}
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ imageFilter_createErode()

SKWASM_EXPORT SkImageFilter * imageFilter_createErode ( SkScalar  radiusX,
SkScalar  radiusY 
)

Definition at line 25 of file filters.cpp.

26 {
27 return SkImageFilters::Erode(radiusX, radiusY, nullptr).release();
28}
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ imageFilter_createFromColorFilter()

SKWASM_EXPORT SkImageFilter * imageFilter_createFromColorFilter ( SkColorFilter filter)

Definition at line 38 of file filters.cpp.

39 {
40 return SkImageFilters::ColorFilter(sk_ref_sp<SkColorFilter>(filter), nullptr)
41 .release();
42}
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ imageFilter_createMatrix()

SKWASM_EXPORT SkImageFilter * imageFilter_createMatrix ( SkScalar matrix33,
FilterQuality  quality 
)

Definition at line 30 of file filters.cpp.

31 {
34 nullptr)
35 .release();
36}
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
SkSamplingOptions samplingOptionsForQuality(FilterQuality quality)
Definition: helpers.h:47
SkMatrix createMatrix(const SkScalar *f)
Definition: helpers.h:14

◆ imageFilter_dispose()

SKWASM_EXPORT void imageFilter_dispose ( SkImageFilter filter)

Definition at line 51 of file filters.cpp.

51 {
52 filter->unref();
53}

◆ imageFilter_getFilterBounds()

SKWASM_EXPORT void imageFilter_getFilterBounds ( SkImageFilter filter,
SkIRect inOutBounds 
)

Definition at line 55 of file filters.cpp.

56 {
57 SkIRect outputRect =
58 filter->filterBounds(*inOutBounds, SkMatrix(),
59 SkImageFilter::MapDirection::kForward_MapDirection);
60 *inOutBounds = outputRect;
61}
SkIRect filterBounds(const SkIRect &src, const SkMatrix &ctm, MapDirection, const SkIRect *inputRect=nullptr) const
Definition: SkRect.h:32

◆ maskFilter_createBlur()

SKWASM_EXPORT SkMaskFilter * maskFilter_createBlur ( SkBlurStyle  blurStyle,
SkScalar  sigma 
)

Definition at line 93 of file filters.cpp.

94 {
95 return SkMaskFilter::MakeBlur(blurStyle, sigma).release();
96}
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)

◆ maskFilter_dispose()

SKWASM_EXPORT void maskFilter_dispose ( SkMaskFilter filter)

Definition at line 98 of file filters.cpp.

98 {
99 filter->unref();
100}