SkMallocPixelRef Class Reference

#include <SkMallocPixelRef.h>

Inherits SkPixelRef.

Collaboration diagram for SkMallocPixelRef:
Collaboration graph
[legend]

List of all members.

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 SkPixelRefCreate (SkFlattenableReadBuffer &buffer)

Protected Member Functions

virtual void * onLockPixels (SkColorTable **)
virtual void onUnlockPixels ()
 SkMallocPixelRef (SkFlattenableReadBuffer &buffer)

Detailed Description

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.


Constructor & Destructor Documentation

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]

Member Function Documentation

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.


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

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1