Flutter Engine
The Flutter Engine
|
#include <SkPtrRecorder.h>
Classes | |
class | Iter |
Public Member Functions | |
uint32_t | find (void *) const |
uint32_t | add (void *) |
int | count () const |
void | copyToArray (void *array[]) const |
void | reset () |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Protected Member Functions | |
virtual void | incPtr (void *) |
virtual void | decPtr (void *) |
Maintains a set of ptrs, assigning each a unique ID [1...N]. Duplicate ptrs return the same ID (since its a set). Subclasses can override inPtr() and decPtr(). incPtr() is called each time a unique ptr is added ot the set. decPtr() is called on each ptr when the set is destroyed or reset.
Definition at line 24 of file SkPtrRecorder.h.
uint32_t SkPtrSet::add | ( | void * | ptr | ) |
Add the specified ptr to the set, returning a unique 32bit ID for it [1...N]. Duplicate ptrs will return the same ID.
If the ptr is nullptr, it is not added, and 0 is returned.
Definition at line 42 of file SkPtrRecorder.cpp.
void SkPtrSet::copyToArray | ( | void * | array[] | ) | const |
Copy the ptrs in the set into the specified array (allocated by the caller). The ptrs are assgined to the array based on their corresponding ID. e.g. array[ptr.ID - 1] = ptr.
incPtr() and decPtr() are not called during this operation.
Definition at line 63 of file SkPtrRecorder.cpp.
|
inline |
|
inlineprotectedvirtual |
uint32_t SkPtrSet::find | ( | void * | ptr | ) | const |
Search for the specified ptr in the set. If it is found, return its 32bit ID [1..N], or if not found, return 0. Always returns 0 for nullptr.
Definition at line 26 of file SkPtrRecorder.cpp.
|
inlineprotectedvirtual |
void SkPtrSet::reset | ( | ) |