Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
SkRefCntSet Class Reference

#include <SkPtrRecorder.h>

Inheritance diagram for SkRefCntSet:
SkTPtrSet< SkRefCnt * > SkPtrSet SkRefCnt SkRefCntBase

Public Member Functions

 ~SkRefCntSet () override
 
- Public Member Functions inherited from SkTPtrSet< SkRefCnt * >
uint32_t find (SkRefCnt * ptr)
 
uint32_t add (SkRefCnt * ptr)
 
void copyToArray (SkRefCnt * *array) const
 
- Public Member Functions inherited from SkPtrSet
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

void incPtr (void *) override
 
void decPtr (void *) override
 
virtual void incPtr (void *)
 
virtual void decPtr (void *)
 

Detailed Description

Subclass of SkTPtrSet specialed to call ref() and unref() when the base class's incPtr() and decPtr() are called. This makes it a valid owner of each ptr, which is released when the set is reset or destroyed.

Definition at line 130 of file SkPtrRecorder.h.

Constructor & Destructor Documentation

◆ ~SkRefCntSet()

SkRefCntSet::~SkRefCntSet ( )
override

Definition at line 48 of file SkFlattenable.cpp.

48 {
49 // call this now, while our decPtr() is sill in scope
50 this->reset();
51}
void reset()

Member Function Documentation

◆ decPtr()

void SkRefCntSet::decPtr ( void *  ptr)
overrideprotectedvirtual

Reimplemented from SkPtrSet.

Definition at line 57 of file SkFlattenable.cpp.

57 {
58 ((SkRefCnt*)ptr)->unref();
59}

◆ incPtr()

void SkRefCntSet::incPtr ( void *  ptr)
overrideprotectedvirtual

Reimplemented from SkPtrSet.

Definition at line 53 of file SkFlattenable.cpp.

53 {
54 ((SkRefCnt*)ptr)->ref();
55}

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