Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkPixelSerializer Class Referenceabstract

Interface for serializing pixels, e.g. More...

#include <SkPixelSerializer.h>

Inheritance diagram for SkPixelSerializer:
SkRefCnt SkRefCntBase

Public Member Functions

bool useEncodedData (const void *data, size_t len)
 Call to determine if the client wants to serialize the encoded data. More...
 
SkDataencode (const SkPixmap &pixmap)
 Call to get the client's version of encoding these pixels. More...
 
- 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...
 

Protected Member Functions

virtual bool onUseEncodedData (const void *data, size_t len)=0
 Return true if you want to serialize the encoded data, false if you want another version serialized (e.g. More...
 
virtual SkDataonEncode (const SkPixmap &)=0
 If you want to encode these pixels, return the encoded data as an SkData Return null if you want to serialize the raw pixels.
 
- 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...
 

Detailed Description

Interface for serializing pixels, e.g.

SkBitmaps in an SkPicture.

Member Function Documentation

SkData* SkPixelSerializer::encode ( const SkPixmap pixmap)
inline

Call to get the client's version of encoding these pixels.

If it returns NULL, serialize the raw pixels.

virtual bool SkPixelSerializer::onUseEncodedData ( const void *  data,
size_t  len 
)
protectedpure virtual

Return true if you want to serialize the encoded data, false if you want another version serialized (e.g.

the result of this->encode()).

bool SkPixelSerializer::useEncodedData ( const void *  data,
size_t  len 
)
inline

Call to determine if the client wants to serialize the encoded data.

If false, serialize another version (e.g. the result of encodePixels).


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