Skia
2DGraphicsLibrary
|
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. More...
#include <SkFlattenable.h>
Classes | |
class | PrivateInitializer |
Public Types | |
enum | Type { kSkColorFilter_Type, kSkDrawable_Type, kSkDrawLooper_Type, kSkImageFilter_Type, kSkMaskFilter_Type, kSkPathEffect_Type, kSkPixelRef_Type, kSkRasterizer_Type, kSkShaderBase_Type, kSkUnused_Type, kSkUnused_Xfermode_Type, kSkNormalSource_Type } |
typedef sk_sp< SkFlattenable >(* | Factory )(SkReadBuffer &) |
Public Member Functions | |
virtual Factory | getFactory () const =0 |
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(). | |
virtual const char * | getTypeName () const |
Returns the name of the object's class. More... | |
virtual void | flatten (SkWriteBuffer &) const |
Override this if your subclass needs to record data that it will need to recreate itself from its CreateProc (returned by getFactory()). | |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
Default construct, initializing the reference count to 1. | |
virtual | ~SkRefCntBase () |
Destruct, asserting that the reference count is 1. | |
int32_t | getRefCnt () const |
Return the reference count. More... | |
void | validate () const |
bool | unique () const |
May return true if the caller is the only owner. More... | |
void | ref () const |
Increment the reference count. More... | |
void | unref () const |
Decrement the reference count. More... | |
Private Types | |
typedef SkRefCnt | INHERITED |
Static Private Member Functions | |
static void | InitializeFlattenablesIfNeeded () |
Friends | |
class | SkGraphics |
Additional Inherited Members | |
Protected Member Functions inherited from SkRefCntBase | |
void | internal_dispose_restore_refcnt_to_1 () const |
Allow subclasses to call this if they've overridden internal_dispose so they can reset fRefCnt before the destructor is called or if they choose not to call the destructor (e.g. More... | |
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.
|
inlinevirtual |
Returns the name of the object's class.
Subclasses should override this function if they intend to provide support for flattening without using the global registry.
If the flattenable is registered, there is no need to override.