Flutter Engine
The Flutter Engine
|
#include <SkFlattenable.h>
Classes | |
class | PrivateInitializer |
Public Types | |
enum | Type { kSkColorFilter_Type , kSkBlender_Type , kSkDrawable_Type , kSkDrawLooper_Type , kSkImageFilter_Type , kSkMaskFilter_Type , kSkPathEffect_Type , kSkShader_Type } |
typedef sk_sp< SkFlattenable >(* | Factory) (SkReadBuffer &) |
Public Member Functions | |
SkFlattenable () | |
virtual Factory | getFactory () const =0 |
virtual const char * | getTypeName () const =0 |
virtual void | flatten (SkWriteBuffer &) const |
virtual Type | getFlattenableType () const =0 |
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 |
Static Public Member Functions | |
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) |
Friends | |
class | SkGraphics |
SkFlattenable is the base class for objects that need to be flattened into a data stream for either transport or as part of the key to the font cache.
Definition at line 28 of file SkFlattenable.h.
typedef sk_sp< SkFlattenable >(* SkFlattenable::Factory) (SkReadBuffer &) |
Definition at line 41 of file SkFlattenable.h.
enum SkFlattenable::Type |
Enumerator | |
---|---|
kSkColorFilter_Type | |
kSkBlender_Type | |
kSkDrawable_Type | |
kSkDrawLooper_Type | |
kSkImageFilter_Type | |
kSkMaskFilter_Type | |
kSkPathEffect_Type | |
kSkShader_Type |
Definition at line 30 of file SkFlattenable.h.
|
inline |
Definition at line 43 of file SkFlattenable.h.
|
static |
Definition at line 151 of file SkFlattenable.cpp.
|
static |
Definition at line 112 of file SkFlattenable.cpp.
|
inlinevirtual |
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 in SkImageFilter_Base, SkLocalMatrixImageFilter, SkGaussianColorFilter, SkRuntimeImageFilter, SkDashImpl, SkEmbossMaskFilter, SkTableMaskFilterImpl, SkTrimPE, SkGradientBaseShader, SkBlendShader, SkCoordClampShader, SkLocalMatrixShader, SkCTMShader, SkPerlinNoiseShader, SkPictureShader, SkShaderBase, SkPairPathEffect, SkRecordedDrawable, SkRuntimeBlender, SkColorSpaceXformColorFilter, SkComposeColorFilter, SkRuntimeColorFilter, SkTableColorFilter, SkPath1DPathEffectImpl, Sk2DPathEffect, SkLine2DPathEffectImpl, SkPath2DPathEffectImpl, SkCornerPathEffectImpl, SkDiscretePathEffectImpl, SkConicalGradient, SkLinearGradient, SkRadialGradient, SkSweepGradient, SkEmptyShader, SkRuntimeShader, IntDrawable, PaintDrawable, CompoundDrawable, and RootDrawable.
Definition at line 67 of file SkFlattenable.h.
|
pure virtual |
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().
Implemented in SkDrawable, SkPath1DPathEffectImpl, SkLine2DPathEffectImpl, SkPath2DPathEffectImpl, SkCornerPathEffectImpl, SkDiscretePathEffectImpl, SkTransformShader, FailureColorFilter, IntDrawable, PaintDrawable, CompoundDrawable, and RootDrawable.
|
pure virtual |
Implemented in SkDrawable, SkBlenderBase, SkImageFilter_Base, SkMaskFilterBase, SkPathEffectBase, SkColorFilterBase, and SkShaderBase.
|
pure virtual |
Returns the name of the object's class.
Implemented in SkDrawable, SkPath1DPathEffectImpl, SkLine2DPathEffectImpl, SkPath2DPathEffectImpl, SkCornerPathEffectImpl, SkDiscretePathEffectImpl, SkTransformShader, FailureColorFilter, IntDrawable, PaintDrawable, CompoundDrawable, and RootDrawable.
|
static |
Definition at line 101 of file SkFlattenable.cpp.
|
static |
sk_sp< SkData > SkFlattenable::serialize | ( | const SkSerialProcs * | procs = nullptr | ) | const |
Definition at line 126 of file SkFlattenable.cpp.
size_t SkFlattenable::serialize | ( | void * | memory, |
size_t | memory_size, | ||
const SkSerialProcs * | procs = nullptr |
||
) | const |
Definition at line 140 of file SkFlattenable.cpp.
|
friend |
Definition at line 91 of file SkFlattenable.h.