#include <SkMallocPixelRef.h>
Inherits SkPixelRef.
Public Member Functions | |
SkMallocPixelRef (void *addr, size_t size, SkColorTable *ctable) | |
virtual | ~SkMallocPixelRef () |
size_t | getSize () const |
Return the allocation size for the pixels. | |
virtual void | flatten (SkFlattenableWriteBuffer &) const |
virtual Factory | getFactory () const |
Static Public Member Functions | |
static SkPixelRef * | Create (SkFlattenableReadBuffer &buffer) |
Protected Member Functions | |
virtual void * | onLockPixels (SkColorTable **) |
virtual void | onUnlockPixels () |
SkMallocPixelRef (SkFlattenableReadBuffer &buffer) |
We explicitly use the same allocator for our pixels that SkMask does, so that we can freely assign memory allocated by one class to the other.
Definition at line 25 of file SkMallocPixelRef.h.
SkMallocPixelRef::SkMallocPixelRef | ( | void * | addr, | |
size_t | size, | |||
SkColorTable * | ctable | |||
) |
Allocate the specified buffer for pixels. The memory is freed when the last owner of this pixelref is gone.
virtual SkMallocPixelRef::~SkMallocPixelRef | ( | ) | [virtual] |
SkMallocPixelRef::SkMallocPixelRef | ( | SkFlattenableReadBuffer & | buffer | ) | [protected] |
static SkPixelRef* SkMallocPixelRef::Create | ( | SkFlattenableReadBuffer & | buffer | ) | [inline, static] |
Definition at line 41 of file SkMallocPixelRef.h.
virtual void SkMallocPixelRef::flatten | ( | SkFlattenableWriteBuffer & | ) | const [virtual] |
Reimplemented from SkPixelRef.
virtual Factory SkMallocPixelRef::getFactory | ( | ) | const [inline, virtual] |
Reimplemented from SkPixelRef.
Definition at line 38 of file SkMallocPixelRef.h.
size_t SkMallocPixelRef::getSize | ( | ) | const [inline] |
Return the allocation size for the pixels.
Definition at line 34 of file SkMallocPixelRef.h.
virtual void* SkMallocPixelRef::onLockPixels | ( | SkColorTable ** | ) | [protected, virtual] |
Called when the lockCount goes from 0 to 1. The caller will have already acquire a mutex for thread safety, so this method need not do that.
Implements SkPixelRef.
virtual void SkMallocPixelRef::onUnlockPixels | ( | ) | [protected, virtual] |
Called when the lock count goes from 1 to 0. The caller will have already acquire a mutex for thread safety, so this method need not do that.
Implements SkPixelRef.