Skia
2DGraphicsLibrary
|
Interface for serializing pixels, e.g. More...
#include <SkPixelSerializer.h>
Public Member Functions | |
bool | useEncodedData (const void *data, size_t len) |
Call to determine if the client wants to serialize the encoded data. More... | |
SkData * | encode (const SkPixmap &pixmap) |
Call to get the client's version of encoding these pixels. More... | |
![]() | |
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 SkData * | onEncode (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. | |
![]() | |
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... | |
Interface for serializing pixels, e.g.
SkBitmaps in an SkPicture.
Call to get the client's version of encoding these pixels.
If it returns NULL, serialize the raw pixels.
|
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()).
|
inline |
Call to determine if the client wants to serialize the encoded data.
If false, serialize another version (e.g. the result of encodePixels).