Flutter Engine
The Flutter Engine
|
#include <SkTriColorShader.h>
Public Member Functions | |
SkTriColorShader (bool isOpaque, bool usePersp) | |
ShaderType | type () const override |
bool | update (const SkMatrix &ctmInv, const SkPoint pts[], const SkPMColor4f colors[], int index0, int index1, int index2) |
Public Member Functions inherited from SkShaderBase | |
~SkShaderBase () override | |
sk_sp< SkShader > | makeInvertAlpha () const |
sk_sp< SkShader > | makeWithCTM (const SkMatrix &) const |
virtual bool | isConstant () const |
virtual GradientType | asGradient (GradientInfo *info=nullptr, SkMatrix *localMatrix=nullptr) const |
Context * | makeContext (const ContextRec &, SkArenaAlloc *) const |
bool | asLuminanceColor (SkColor4f *) const |
bool | appendRootStages (const SkStageRec &rec, const SkMatrix &ctm) const |
virtual SkImage * | onIsAImage (SkMatrix *, SkTileMode[2]) const |
virtual SkRuntimeEffect * | asRuntimeEffect () const |
Type | getFlattenableType () const override |
virtual sk_sp< SkShader > | makeAsALocalMatrixShader (SkMatrix *localMatrix) const |
Public Member Functions inherited from SkShader | |
SkImage * | isAImage (SkMatrix *localMatrix, SkTileMode xy[2]) const |
bool | isAImage () const |
sk_sp< SkShader > | makeWithLocalMatrix (const SkMatrix &) const |
sk_sp< SkShader > | makeWithColorFilter (sk_sp< SkColorFilter >) const |
sk_sp< SkShader > | makeWithWorkingColorSpace (sk_sp< SkColorSpace >) const |
Public Member Functions inherited from SkFlattenable | |
SkFlattenable () | |
sk_sp< SkData > | serialize (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 | |
bool | appendStages (const SkStageRec &rec, const SkShaders::MatrixRec &) const override |
Protected Member Functions inherited from SkShaderBase | |
SkShaderBase () | |
void | flatten (SkWriteBuffer &) const override |
virtual bool | onAsLuminanceColor (SkColor4f *) const |
Private Member Functions | |
bool | isOpaque () const override |
Factory | getFactory () const override |
const char * | getTypeName () const override |
Additional Inherited Members | |
Public Types inherited from SkShaderBase | |
enum class | ShaderType { M } |
enum class | GradientType { kNone , M } |
enum | Flags { kOpaqueAlpha_Flag = 1 << 0 } |
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 SkShaderBase | |
static Type | GetFlattenableType () |
static sk_sp< SkShaderBase > | Deserialize (const void *data, size_t size, const SkDeserialProcs *procs=nullptr) |
static void | RegisterFlattenables () |
static SkMatrix | ConcatLocalMatrices (const SkMatrix &parentLM, const SkMatrix &childLM) |
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< SkFlattenable > | Deserialize (Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr) |
Definition at line 18 of file SkTriColorShader.h.
|
inline |
Definition at line 20 of file SkTriColorShader.h.
|
overrideprotectedvirtual |
Adds stages to implement this shader. To ensure that the correct input coords are present in r,g MatrixRec::apply() must be called (unless the shader doesn't require it's input coords). The default impl creates shadercontext and calls that (not very efficient).
Implements SkShaderBase.
Definition at line 19 of file SkTriColorShader.cpp.
|
inlineoverrideprivatevirtual |
Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().
Implements SkFlattenable.
Definition at line 38 of file SkTriColorShader.h.
|
inlineoverrideprivatevirtual |
Returns the name of the object's class.
Implements SkFlattenable.
Definition at line 39 of file SkTriColorShader.h.
|
inlineoverrideprivatevirtual |
Returns true if the shader is guaranteed to produce only opaque colors, subject to the SkPaint using the shader to apply an opaque alpha value. Subclasses should override this to allow some optimizations.
Reimplemented from SkShader.
Definition at line 36 of file SkTriColorShader.h.
|
inlineoverridevirtual |
Implements SkShaderBase.
Definition at line 22 of file SkTriColorShader.h.
bool SkTriColorShader::update | ( | const SkMatrix & | ctmInv, |
const SkPoint | pts[], | ||
const SkPMColor4f | colors[], | ||
int | index0, | ||
int | index1, | ||
int | index2 | ||
) |
Definition at line 28 of file SkTriColorShader.cpp.