Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
SkMaskFilter Class Reference

#include <SkMaskFilter.h>

Inheritance diagram for SkMaskFilter:
SkFlattenable SkRefCnt SkRefCntBase SkMaskFilterBase sktext::gpu::SDFMaskFilter SkBlurMaskFilterImpl SkEmbossMaskFilter SkShaderMaskFilterImpl SkTableMaskFilterImpl sktext::gpu::SDFMaskFilterImpl

Public Member Functions

SkRect approximateFilteredBounds (const SkRect &src) const
 
- Public Member Functions inherited from SkFlattenable
 SkFlattenable ()
 
virtual Factory getFactory () const =0
 
virtual const char * getTypeName () const =0
 
virtual void flatten (SkWriteBuffer &) const
 
virtual Type getFlattenableType () const =0
 
sk_sp< SkDataserialize (const SkSerialProcs *=nullptr) const
 
size_t serialize (void *memory, size_t memory_size, const SkSerialProcs *=nullptr) const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Static Public Member Functions

static sk_sp< SkMaskFilterMakeBlur (SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
 
static sk_sp< SkMaskFilterDeserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
- Static Public Member Functions inherited from SkFlattenable
static Factory NameToFactory (const char name[])
 
static const char * FactoryToName (Factory)
 
static void Register (const char name[], Factory)
 
static sk_sp< SkFlattenableDeserialize (Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
 

Friends

class SkFlattenable
 

Additional Inherited Members

- Public Types inherited from SkFlattenable
enum  Type {
  kSkColorFilter_Type , kSkBlender_Type , kSkDrawable_Type , kSkDrawLooper_Type ,
  kSkImageFilter_Type , kSkMaskFilter_Type , kSkPathEffect_Type , kSkShader_Type
}
 
typedef sk_sp< SkFlattenable >(* Factory) (SkReadBuffer &)
 

Detailed Description

SkMaskFilter is the base class for object that perform transformations on the mask before drawing it. An example subclass is Blur.

Definition at line 27 of file SkMaskFilter.h.

Member Function Documentation

◆ approximateFilteredBounds()

SkRect SkMaskFilter::approximateFilteredBounds ( const SkRect src) const

Returns the approximate bounds that would result from filtering the src rect. The actual result may be different, but it should be contained within the returned bounds.

Definition at line 317 of file SkMaskFilter.cpp.

317 {
318 SkRect dst;
320 return dst;
321}
SkMaskFilterBase * as_MFB(SkMaskFilter *mf)
virtual void computeFastBounds(const SkRect &src, SkRect *dest) const
dst
Definition: cp.py:12

◆ Deserialize()

sk_sp< SkMaskFilter > SkMaskFilter::Deserialize ( const void *  data,
size_t  size,
const SkDeserialProcs procs = nullptr 
)
static

Definition at line 327 of file SkMaskFilter.cpp.

328 {
329 return sk_sp<SkMaskFilter>(static_cast<SkMaskFilter*>(
331 kSkMaskFilter_Type, data, size, procs).release()));
332}
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ MakeBlur()

sk_sp< SkMaskFilter > SkMaskFilter::MakeBlur ( SkBlurStyle  style,
SkScalar  sigma,
bool  respectCTM = true 
)
static

Create a blur maskfilter.

Parameters
styleThe SkBlurStyle to use
sigmaStandard deviation of the Gaussian blur to apply. Must be > 0.
respectCTMif true the blur's sigma is modified by the CTM.
Returns
The new blur maskfilter

Definition at line 535 of file SkBlurMaskFilterImpl.cpp.

535 {
536 if (SkIsFinite(sigma) && sigma > 0) {
537 return sk_sp<SkMaskFilter>(new SkBlurMaskFilterImpl(sigma, style, respectCTM));
538 }
539 return nullptr;
540}
static bool SkIsFinite(T x, Pack... values)

Friends And Related Function Documentation

◆ SkFlattenable

friend class SkFlattenable
friend

Definition at line 50 of file SkMaskFilter.h.


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