/third_party/skia/src/gpu/ |
D | GrNonAtomicRef.h | 21 GrNonAtomicRef() : fRefCnt(1) {} in GrNonAtomicRef() 26 SkASSERT((0 == fRefCnt || 1 == fRefCnt)); in ~GrNonAtomicRef() 28 fRefCnt = -10; in ~GrNonAtomicRef() 32 bool unique() const { return 1 == fRefCnt; } in unique() 36 int refCnt() const { return fRefCnt; } in refCnt() 40 SkASSERT(fRefCnt > 0); in ref() 41 ++fRefCnt; in ref() 45 SkASSERT(fRefCnt > 0); in unref() 46 --fRefCnt; in unref() 47 if (0 == fRefCnt) { in unref() [all …]
|
D | GrManagedResource.h | 79 GrManagedResource() : fRefCnt(1) { in GrManagedResource() 92 fRefCnt.store(0); // illegal value, to catch us if we reuse after delete in ~GrManagedResource() 98 int32_t getRefCnt() const { return fRefCnt.load(); } in getRefCnt() 108 return 1 == fRefCnt.load(std::memory_order_acquire); in unique() 116 SkDEBUGCODE(int newRefCount = )fRefCnt.fetch_add(+1, std::memory_order_relaxed); in ref() 127 int newRefCount = fRefCnt.fetch_add(-1, std::memory_order_acq_rel); in unref() 179 fRefCnt.store(1); in internal_dispose() 184 mutable std::atomic<int32_t> fRefCnt; variable
|
D | GrGpuResource.h | 32 bool unique() const { return fRefCnt == 1; } in unique() 38 (void)fRefCnt.fetch_add(+1, std::memory_order_relaxed); in ref() 49 if (1 == fRefCnt.fetch_add(-1, std::memory_order_acq_rel)) { in unref() 71 GrIORef() : fRefCnt(1), fCommandBufferUsageCnt(0) {} in GrIORef() 80 SkASSERT(fRefCnt >= 0); in addInitialRef() 82 (void)fRefCnt.fetch_add(+1, std::memory_order_relaxed); in addInitialRef() 90 int32_t getRefCnt() const { return fRefCnt.load(std::memory_order_relaxed); } in getRefCnt() 102 mutable std::atomic<int32_t> fRefCnt; variable
|
/third_party/skia/include/core/ |
D | SkRefCnt.h | 34 SkRefCntBase() : fRefCnt(1) {} in SkRefCntBase() 42 fRefCnt.store(0, std::memory_order_relaxed); in ~SkRefCntBase() 50 if (1 == fRefCnt.load(std::memory_order_acquire)) { in unique() 64 (void)fRefCnt.fetch_add(+1, std::memory_order_relaxed); in ref() 74 if (1 == fRefCnt.fetch_add(-1, std::memory_order_acq_rel)) { in unref() 86 return fRefCnt.load(std::memory_order_relaxed); in getRefCnt() 96 fRefCnt.store(1, std::memory_order_relaxed); in internal_dispose() 105 mutable std::atomic<int32_t> fRefCnt; variable 161 SkNVRefCnt() : fRefCnt(1) {} in SkNVRefCnt() 164 int rc = fRefCnt.load(std::memory_order_relaxed); in ~SkNVRefCnt() [all …]
|
D | SkString.h | 244 constexpr Rec(uint32_t len, int32_t refCnt) : fLength(len), fRefCnt(refCnt) {} in Rec() 257 mutable std::atomic<int32_t> fRefCnt;
|
/third_party/skia/src/core/ |
D | SkCachedData.cpp | 15 , fRefCnt(1) in SkCachedData() 26 , fRefCnt(1) in SkCachedData() 77 if ((1 == fRefCnt) && fInCache) { in inMutexRef() 81 fRefCnt += 1; in inMutexRef() 89 switch (--fRefCnt) { in inMutexUnref() 114 return 0 == fRefCnt; in inMutexUnref() 163 SkASSERT((fInCache && fRefCnt > 1) || !fInCache); in validate() 173 SkASSERT((fInCache && 1 == fRefCnt) || (0 == fRefCnt)); in validate()
|
D | SkRegionPriv.h | 61 std::atomic<int32_t> fRefCnt; 92 head->fRefCnt = 1; in Alloc() 115 SkASSERT(fRefCnt == 1); in writable_runs() 125 if (fRefCnt > 1) { in ensureWritable() 135 if (--fRefCnt == 0) { in ensureWritable()
|
D | SkCachedData.h | 31 int testing_only_getRefCnt() const { return fRefCnt; } in testing_only_getRefCnt() 57 int fRefCnt; // low-bit means we're owned by the cache variable
|
D | SkString.cpp | 235 SkAssertResult(this->fRefCnt.fetch_add(+1, std::memory_order_relaxed)); in ref() 242 int32_t oldRefCnt = this->fRefCnt.fetch_add(-1, std::memory_order_acq_rel); in unref() 250 return fRefCnt.load(std::memory_order_acquire) == 1; in unique() 255 return fRefCnt.load(std::memory_order_relaxed); in getRefCnt()
|
D | SkAAClip.cpp | 166 std::atomic<int32_t> fRefCnt; member 186 head->fRefCnt.store(1); in Alloc() 895 SkASSERT(head->fRefCnt.load() > 0); in validate() 1252 fRunHead->fRefCnt++; in operator =() 1528 fRunHead->fRefCnt++; in translate() 1539 SkASSERT(fRunHead->fRefCnt.load() >= 1); in freeRuns() 1540 if (1 == fRunHead->fRefCnt--) { in freeRuns()
|
D | SkRegion.cpp | 136 SkASSERT(fRunHead->fRefCnt >= 1); in freeRuns() 137 if (--fRunHead->fRefCnt == 0) { in freeRuns() 203 fRunHead->fRefCnt++; in setRegion() 1325 return fRunHead && fRunHead->fRefCnt > 0 && in isValid()
|
/third_party/skia/tests/ |
D | RefCntTest.cpp | 91 Effect() : fRefCnt(1) { in Effect() 96 int fRefCnt; member in Effect 100 fRefCnt += 1; in ref() 105 SkASSERT(fRefCnt > 0); in unref() 106 if (0 == --fRefCnt) { in unref() 160 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 1); in DEF_TEST() 193 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 2); in DEF_TEST() 198 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 3); in DEF_TEST()
|
/third_party/skia/include/private/ |
D | SkWeakRefCnt.h | 82 int32_t prev = fRefCnt.load(std::memory_order_relaxed); in atomic_conditional_acquire_strong_ref() 87 } while(!fRefCnt.compare_exchange_weak(prev, prev+1, std::memory_order_acquire, in atomic_conditional_acquire_strong_ref() 142 return fRefCnt.load(std::memory_order_relaxed) == 0; in weak_expired()
|