#include <SkCachedData.h>
Definition at line 19 of file SkCachedData.h.
◆ SkCachedData() [1/2]
SkCachedData::SkCachedData |
( |
void * |
mallocData, |
|
|
size_t |
size |
|
) |
| |
Definition at line 12 of file SkCachedData.cpp.
15 , fRefCnt(1)
16 , fStorageType(kMalloc_StorageType)
17 , fInCache(false)
18 , fIsLocked(true)
19{
20 fStorage.fMalloc =
data;
21}
const void * data() const
◆ SkCachedData() [2/2]
Definition at line 23 of file SkCachedData.cpp.
26 , fRefCnt(1)
27 , fStorageType(kDiscardableMemory_StorageType)
28 , fInCache(false)
29 , fIsLocked(true)
30{
31 fStorage.fDM = dm;
32}
◆ ~SkCachedData()
SkCachedData::~SkCachedData |
( |
| ) |
|
|
virtual |
Definition at line 34 of file SkCachedData.cpp.
34 {
35 switch (fStorageType) {
36 case kMalloc_StorageType:
38 break;
39 case kDiscardableMemory_StorageType:
40 delete fStorage.fDM;
41 break;
42 }
43}
SK_API void sk_free(void *)
◆ attachToCacheAndRef()
void SkCachedData::attachToCacheAndRef |
( |
| ) |
const |
|
inline |
◆ data()
const void * SkCachedData::data |
( |
| ) |
const |
|
inline |
◆ detachFromCacheAndUnref()
void SkCachedData::detachFromCacheAndUnref |
( |
| ) |
const |
|
inline |
◆ diagnostic_only_getDiscardable()
Definition at line 37 of file SkCachedData.h.
37 {
38 return kDiscardableMemory_StorageType == fStorageType ? fStorage.fDM : nullptr;
39 }
◆ onDataChange()
virtual void SkCachedData::onDataChange |
( |
void * |
oldData, |
|
|
void * |
newData |
|
) |
| |
|
inlineprotectedvirtual |
◆ ref()
void SkCachedData::ref |
( |
| ) |
const |
|
inline |
◆ size()
size_t SkCachedData::size |
( |
| ) |
const |
|
inline |
◆ testing_only_getRefCnt()
int SkCachedData::testing_only_getRefCnt |
( |
| ) |
const |
|
inline |
◆ testing_only_isInCache()
bool SkCachedData::testing_only_isInCache |
( |
| ) |
const |
|
inline |
◆ testing_only_isLocked()
bool SkCachedData::testing_only_isLocked |
( |
| ) |
const |
|
inline |
◆ unref()
void SkCachedData::unref |
( |
| ) |
const |
|
inline |
◆ validate()
void SkCachedData::validate |
( |
| ) |
const |
|
inline |
◆ writable_data()
void * SkCachedData::writable_data |
( |
| ) |
|
|
inline |
◆ fDM
◆ fMalloc
void* SkCachedData::fMalloc |
The documentation for this class was generated from the following files: