Flutter Engine
The Flutter Engine
Classes | Macros | Functions
SkImageFilter_Base.h File Reference
#include "include/core/SkColorSpace.h"
#include "include/core/SkImageFilter.h"
#include "include/core/SkImageInfo.h"
#include "include/private/base/SkTArray.h"
#include "include/private/base/SkTemplates.h"
#include "src/core/SkImageFilterTypes.h"
#include <optional>

Go to the source code of this file.

Classes

class  SkImageFilter_Base
 
class  SkImageFilter_Base::Common
 

Macros

#define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount)
 

Functions

static SkImageFilter_Baseas_IFB (SkImageFilter *filter)
 
static SkImageFilter_Baseas_IFB (const sk_sp< SkImageFilter > &filter)
 
static const SkImageFilter_Baseas_IFB (const SkImageFilter *filter)
 
void SkRegisterBlendImageFilterFlattenable ()
 
void SkRegisterBlurImageFilterFlattenable ()
 
void SkRegisterColorFilterImageFilterFlattenable ()
 
void SkRegisterComposeImageFilterFlattenable ()
 
void SkRegisterCropImageFilterFlattenable ()
 
void SkRegisterDisplacementMapImageFilterFlattenable ()
 
void SkRegisterImageImageFilterFlattenable ()
 
void SkRegisterLightingImageFilterFlattenables ()
 
void SkRegisterMagnifierImageFilterFlattenable ()
 
void SkRegisterMatrixConvolutionImageFilterFlattenable ()
 
void SkRegisterMatrixTransformImageFilterFlattenable ()
 
void SkRegisterMergeImageFilterFlattenable ()
 
void SkRegisterMorphologyImageFilterFlattenables ()
 
void SkRegisterPictureImageFilterFlattenable ()
 
void SkRegisterRuntimeImageFilterFlattenable ()
 
void SkRegisterShaderImageFilterFlattenable ()
 
void SkRegisterLegacyDropShadowImageFilterFlattenable ()
 

Macro Definition Documentation

◆ SK_IMAGEFILTER_UNFLATTEN_COMMON

#define SK_IMAGEFILTER_UNFLATTEN_COMMON (   localVar,
  expectedCount 
)
Value:
Common localVar; \
do { \
if (!localVar.unflatten(buffer, expectedCount)) { \
return nullptr; \
} \
} while (0)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

Helper to unflatten the common data, and return nullptr if we fail.

Definition at line 325 of file SkImageFilter_Base.h.

Function Documentation

◆ as_IFB() [1/3]

static SkImageFilter_Base * as_IFB ( const sk_sp< SkImageFilter > &  filter)
inlinestatic

Definition at line 314 of file SkImageFilter_Base.h.

314 {
315 return static_cast<SkImageFilter_Base*>(filter.get());
316}
T * get() const
Definition: SkRefCnt.h:303

◆ as_IFB() [2/3]

static const SkImageFilter_Base * as_IFB ( const SkImageFilter filter)
inlinestatic

Definition at line 318 of file SkImageFilter_Base.h.

318 {
319 return static_cast<const SkImageFilter_Base*>(filter);
320}

◆ as_IFB() [3/3]

static SkImageFilter_Base * as_IFB ( SkImageFilter filter)
inlinestatic

Definition at line 310 of file SkImageFilter_Base.h.

310 {
311 return static_cast<SkImageFilter_Base*>(filter);
312}

◆ SkRegisterBlendImageFilterFlattenable()

void SkRegisterBlendImageFilterFlattenable ( )

All image filter implementations defined for the include/effects/SkImageFilters.h factories are entirely encapsulated within their own CPP files. SkFlattenable deserialization needs a hook into these types, so their registration functions are exposed here.

Definition at line 174 of file SkBlendImageFilter.cpp.

174 {
175 SK_REGISTER_FLATTENABLE(SkBlendImageFilter);
176 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
177 SkFlattenable::Register("SkXfermodeImageFilter_Base", SkBlendImageFilter::CreateProc);
178 SkFlattenable::Register("SkXfermodeImageFilterImpl", SkBlendImageFilter::CreateProc);
179 SkFlattenable::Register("ArithmeticImageFilterImpl",
180 SkBlendImageFilter::LegacyArithmeticCreateProc);
181 SkFlattenable::Register("SkArithmeticImageFilter",
182 SkBlendImageFilter::LegacyArithmeticCreateProc);
183}
#define SK_REGISTER_FLATTENABLE(type)
static void Register(const char name[], Factory)

◆ SkRegisterBlurImageFilterFlattenable()

void SkRegisterBlurImageFilterFlattenable ( )

Definition at line 140 of file SkBlurImageFilter.cpp.

140 {
141 SK_REGISTER_FLATTENABLE(SkBlurImageFilter);
142 SkFlattenable::Register("SkBlurImageFilterImpl", SkBlurImageFilter::CreateProc);
143}

◆ SkRegisterColorFilterImageFilterFlattenable()

void SkRegisterColorFilterImageFilterFlattenable ( )

Definition at line 98 of file SkColorFilterImageFilter.cpp.

98 {
99 SK_REGISTER_FLATTENABLE(SkColorFilterImageFilter);
100 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
101 SkFlattenable::Register("SkColorFilterImageFilterImpl", SkColorFilterImageFilter::CreateProc);
102}

◆ SkRegisterComposeImageFilterFlattenable()

void SkRegisterComposeImageFilterFlattenable ( )

Definition at line 78 of file SkComposeImageFilter.cpp.

78 {
79 SK_REGISTER_FLATTENABLE(SkComposeImageFilter);
80 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
81 SkFlattenable::Register("SkComposeImageFilterImpl", SkComposeImageFilter::CreateProc);
82}

◆ SkRegisterCropImageFilterFlattenable()

void SkRegisterCropImageFilterFlattenable ( )

Definition at line 124 of file SkCropImageFilter.cpp.

124 {
125 SK_REGISTER_FLATTENABLE(SkCropImageFilter);
126 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
127 SkFlattenable::Register("SkTileImageFilter", SkCropImageFilter::LegacyTileCreateProc);
128 SkFlattenable::Register("SkTileImageFilterImpl", SkCropImageFilter::LegacyTileCreateProc);
129}

◆ SkRegisterDisplacementMapImageFilterFlattenable()

void SkRegisterDisplacementMapImageFilterFlattenable ( )

Definition at line 161 of file SkDisplacementMapImageFilter.cpp.

161 {
162 SK_REGISTER_FLATTENABLE(SkDisplacementMapImageFilter);
163 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
164 SkFlattenable::Register("SkDisplacementMapEffect", SkDisplacementMapImageFilter::CreateProc);
165 SkFlattenable::Register("SkDisplacementMapEffectImpl",
166 SkDisplacementMapImageFilter::CreateProc);
167}

◆ SkRegisterImageImageFilterFlattenable()

void SkRegisterImageImageFilterFlattenable ( )

Definition at line 108 of file SkImageImageFilter.cpp.

108 {
109 SK_REGISTER_FLATTENABLE(SkImageImageFilter);
110 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
111 SkFlattenable::Register("SkImageSourceImpl", SkImageImageFilter::CreateProc);
112}

◆ SkRegisterLegacyDropShadowImageFilterFlattenable()

void SkRegisterLegacyDropShadowImageFilterFlattenable ( )

Definition at line 112 of file SkDropShadowImageFilter.cpp.

112 {
113 SkFlattenable::Register("SkDropShadowImageFilter", legacy_drop_shadow_create_proc);
114 SkFlattenable::Register("SkDropShadowImageFilterImpl", legacy_drop_shadow_create_proc);
115}

◆ SkRegisterLightingImageFilterFlattenables()

void SkRegisterLightingImageFilterFlattenables ( )

Definition at line 368 of file SkLightingImageFilter.cpp.

368 {
369 SK_REGISTER_FLATTENABLE(SkLightingImageFilter);
370 // TODO (michaelludwig): Remove after grace period for SKPs to stop using old name
371 SkFlattenable::Register("SkDiffuseLightingImageFilter",
372 SkLightingImageFilter::LegacyDiffuseCreateProc);
373 SkFlattenable::Register("SkSpecularLightingImageFilter",
374 SkLightingImageFilter::LegacySpecularCreateProc);
375}

◆ SkRegisterMagnifierImageFilterFlattenable()

void SkRegisterMagnifierImageFilterFlattenable ( )

Definition at line 110 of file SkMagnifierImageFilter.cpp.

110 {
111 SK_REGISTER_FLATTENABLE(SkMagnifierImageFilter);
112}

◆ SkRegisterMatrixConvolutionImageFilterFlattenable()

void SkRegisterMatrixConvolutionImageFilterFlattenable ( )

Definition at line 269 of file SkMatrixConvolutionImageFilter.cpp.

269 {
270 SK_REGISTER_FLATTENABLE(SkMatrixConvolutionImageFilter);
271 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
272 SkFlattenable::Register("SkMatrixConvolutionImageFilterImpl",
273 SkMatrixConvolutionImageFilter::CreateProc);
274}

◆ SkRegisterMatrixTransformImageFilterFlattenable()

void SkRegisterMatrixTransformImageFilterFlattenable ( )

Definition at line 101 of file SkMatrixTransformImageFilter.cpp.

101 {
102 SK_REGISTER_FLATTENABLE(SkMatrixTransformImageFilter);
103 // TODO(michaelludwig): Remove after grace period for SKPs to stop using old name
104 SkFlattenable::Register("SkMatrixImageFilter", SkMatrixTransformImageFilter::CreateProc);
105 // TODO(michaelludwig): Remove after grace period for SKPs to stop using old serialization
106 SkFlattenable::Register("SkOffsetImageFilter",
107 SkMatrixTransformImageFilter::LegacyOffsetCreateProc);
108 SkFlattenable::Register("SkOffsetImageFilterImpl",
109 SkMatrixTransformImageFilter::LegacyOffsetCreateProc);
110}

◆ SkRegisterMergeImageFilterFlattenable()

void SkRegisterMergeImageFilterFlattenable ( )

Definition at line 68 of file SkMergeImageFilter.cpp.

68 {
69 SK_REGISTER_FLATTENABLE(SkMergeImageFilter);
70 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
71 SkFlattenable::Register("SkMergeImageFilterImpl", SkMergeImageFilter::CreateProc);
72}

◆ SkRegisterMorphologyImageFilterFlattenables()

void SkRegisterMorphologyImageFilterFlattenables ( )

Definition at line 239 of file SkMorphologyImageFilter.cpp.

239 {
240 SK_REGISTER_FLATTENABLE(SkMorphologyImageFilter);
241 // TODO (michaelludwig): Remove after grace period for SKPs to stop using old name
242 SkFlattenable::Register("SkMorphologyImageFilterImpl", SkMorphologyImageFilter::CreateProc);
243}

◆ SkRegisterPictureImageFilterFlattenable()

void SkRegisterPictureImageFilterFlattenable ( )

Definition at line 76 of file SkPictureImageFilter.cpp.

76 {
77 SK_REGISTER_FLATTENABLE(SkPictureImageFilter);
78 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
79 SkFlattenable::Register("SkPictureImageFilterImpl", SkPictureImageFilter::CreateProc);
80}

◆ SkRegisterRuntimeImageFilterFlattenable()

void SkRegisterRuntimeImageFilterFlattenable ( )

◆ SkRegisterShaderImageFilterFlattenable()

void SkRegisterShaderImageFilterFlattenable ( )

Definition at line 84 of file SkShaderImageFilter.cpp.

84 {
85 SK_REGISTER_FLATTENABLE(SkShaderImageFilter);
86 // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name
87 SkFlattenable::Register("SkPaintImageFilter", SkShaderImageFilter::CreateProc);
88 SkFlattenable::Register("SkPaintImageFilterImpl", SkShaderImageFilter::CreateProc);
89}