Flutter Engine
The Flutter Engine
Static Public Member Functions | Protected Member Functions | List of all members
sksg::RadialGradient Class Referencefinal

#include <SkSGGradient.h>

Inheritance diagram for sksg::RadialGradient:
sksg::Gradient sksg::Shader sksg::Node SkRefCnt SkRefCntBase

Static Public Member Functions

static sk_sp< RadialGradientMake ()
 

Protected Member Functions

sk_sp< SkShaderonMakeShader (const std::vector< SkColor4f > &, const std::vector< SkScalar > &) const override
 
- Protected Member Functions inherited from sksg::Gradient
sk_sp< SkShaderonRevalidateShader () final
 
virtual sk_sp< SkShaderonMakeShader (const std::vector< SkColor4f > &colors, const std::vector< SkScalar > &positions) const =0
 
 Gradient ()=default
 
- Protected Member Functions inherited from sksg::Shader
 Shader ()
 
SkRect onRevalidate (InvalidationController *, const SkMatrix &) final
 
virtual sk_sp< SkShaderonRevalidateShader ()=0
 
- Protected Member Functions inherited from sksg::Node
 Node (uint32_t invalTraits)
 
 ~Node () override
 
const SkRectbounds () const
 
bool hasInval () const
 
virtual SkRect onRevalidate (InvalidationController *, const SkMatrix &ctm)=0
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

Additional Inherited Members

- Public Member Functions inherited from sksg::Shader
 ~Shader () override
 
const sk_sp< SkShader > & getShader () const
 
- Public Member Functions inherited from sksg::Node
const SkRectrevalidate (InvalidationController *, const SkMatrix &)
 
void invalidate (bool damage=true)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 
- Protected Types inherited from sksg::Node
enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 

Detailed Description

Definition at line 80 of file SkSGGradient.h.

Member Function Documentation

◆ Make()

static sk_sp< RadialGradient > sksg::RadialGradient::Make ( )
inlinestatic

Definition at line 82 of file SkSGGradient.h.

82 {
83 return sk_sp<RadialGradient>(new RadialGradient());
84 }

◆ onMakeShader()

sk_sp< SkShader > sksg::RadialGradient::onMakeShader ( const std::vector< SkColor4f > &  colors,
const std::vector< SkScalar > &  positions 
) const
overrideprotectedvirtual

Implements sksg::Gradient.

Definition at line 49 of file SkSGGradient.cpp.

50 {
51 SkASSERT(colors.size() == positions.size());
52
53 return (fStartRadius <= 0 && fStartCenter == fEndCenter)
54 ? SkGradientShader::MakeRadial(fEndCenter, fEndRadius,
55 colors.data(), nullptr, positions.data(),
56 SkToInt(colors.size()), this->getTileMode())
57 : SkGradientShader::MakeTwoPointConical(fStartCenter, fStartRadius,
58 fEndCenter, fEndRadius,
59 colors.data(), nullptr, positions.data(),
60 SkToInt(colors.size()), this->getTileMode());
61}
#define SkASSERT(cond)
Definition: SkAssert.h:116
constexpr int SkToInt(S x)
Definition: SkTo.h:29
static sk_sp< SkShader > MakeRadial(const SkPoint &center, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
PODArray< SkColor > colors
Definition: SkRecords.h:276
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

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