Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | Friends | List of all members
SkComposeColorFilter Class Referencefinal

#include <SkComposeColorFilter.h>

Inheritance diagram for SkComposeColorFilter:
SkColorFilterBase SkColorFilter SkFlattenable SkRefCnt SkRefCntBase

Public Member Functions

bool onIsAlphaUnchanged () const override
 
bool appendStages (const SkStageRec &rec, bool shaderIsOpaque) const override
 
SkColorFilterBase::Type type () const override
 
sk_sp< SkColorFilterBaseouter () const
 
sk_sp< SkColorFilterBaseinner () const
 
- Public Member Functions inherited from SkColorFilterBase
virtual bool appendStages (const SkStageRec &rec, bool shaderIsOpaque) const =0
 
virtual bool onIsAlphaUnchanged () const
 
virtual Type type () const =0
 
bool affectsTransparentBlack () const
 
virtual SkRuntimeEffectasRuntimeEffect () const
 
SkFlattenable::Type getFlattenableType () const override
 
virtual SkPMColor4f onFilterColor4f (const SkPMColor4f &color, SkColorSpace *dstCS) const
 
- Public Member Functions inherited from SkColorFilter
bool asAColorMode (SkColor *color, SkBlendMode *mode) const
 
bool asAColorMatrix (float matrix[20]) const
 
bool isAlphaUnchanged () const
 
SkColor filterColor (SkColor) const
 
SkColor4f filterColor4f (const SkColor4f &srcColor, SkColorSpace *srcCS, SkColorSpace *dstCS) const
 
sk_sp< SkColorFiltermakeComposed (sk_sp< SkColorFilter > inner) const
 
sk_sp< SkColorFiltermakeWithWorkingColorSpace (sk_sp< SkColorSpace >) 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
 

Protected Member Functions

void flatten (SkWriteBuffer &buffer) const override
 
- Protected Member Functions inherited from SkColorFilterBase
 SkColorFilterBase ()
 
virtual bool onAsAColorMatrix (float[20]) const
 
virtual bool onAsAColorMode (SkColor *color, SkBlendMode *bmode) const
 

Friends

class SkColorFilter
 

Additional Inherited Members

- Public Types inherited from SkColorFilterBase
enum class  Type { kNoop , M }
 
- 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 &)
 
- Static Public Member Functions inherited from SkColorFilterBase
static SkFlattenable::Type GetFlattenableType ()
 
static sk_sp< SkColorFilterDeserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr)
 
- Static Public Member Functions inherited from SkColorFilter
static sk_sp< SkColorFilterDeserialize (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)
 

Detailed Description

Definition at line 19 of file SkComposeColorFilter.h.

Member Function Documentation

◆ appendStages()

bool SkComposeColorFilter::appendStages ( const SkStageRec rec,
bool  shaderIsOpaque 
) const
overridevirtual

Implements SkColorFilterBase.

Definition at line 29 of file SkComposeColorFilter.cpp.

29 {
30 bool innerIsOpaque = shaderIsOpaque;
31 if (!fInner->isAlphaUnchanged()) {
32 innerIsOpaque = false;
33 }
34 return fInner->appendStages(rec, shaderIsOpaque) && fOuter->appendStages(rec, innerIsOpaque);
35}
virtual bool appendStages(const SkStageRec &rec, bool shaderIsOpaque) const =0
bool isAlphaUnchanged() const

◆ flatten()

void SkComposeColorFilter::flatten ( SkWriteBuffer ) const
overrideprotectedvirtual

Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()).

DEPRECATED public : will move to protected ... use serialize() instead

Reimplemented from SkFlattenable.

Definition at line 37 of file SkComposeColorFilter.cpp.

37 {
38 buffer.writeFlattenable(fOuter.get());
39 buffer.writeFlattenable(fInner.get());
40}
T * get() const
Definition: SkRefCnt.h:303
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

◆ inner()

sk_sp< SkColorFilterBase > SkComposeColorFilter::inner ( ) const
inline

Definition at line 28 of file SkComposeColorFilter.h.

28{ return fInner; }

◆ onIsAlphaUnchanged()

bool SkComposeColorFilter::onIsAlphaUnchanged ( ) const
overridevirtual

Returns the flags for this filter. Override in subclasses to return custom flags.

Reimplemented from SkColorFilterBase.

Definition at line 24 of file SkComposeColorFilter.cpp.

24 {
25 // Can only claim alphaunchanged support if both our proxys do.
26 return fOuter->isAlphaUnchanged() && fInner->isAlphaUnchanged();
27}

◆ outer()

sk_sp< SkColorFilterBase > SkComposeColorFilter::outer ( ) const
inline

Definition at line 27 of file SkComposeColorFilter.h.

27{ return fOuter; }

◆ type()

SkColorFilterBase::Type SkComposeColorFilter::type ( ) const
inlineoverridevirtual

Implements SkColorFilterBase.

Definition at line 25 of file SkComposeColorFilter.h.

25{ return SkColorFilterBase::Type::kCompose; }

Friends And Related Function Documentation

◆ SkColorFilter

friend class SkColorFilter
friend

Definition at line 42 of file SkComposeColorFilter.h.


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