Home
last modified time | relevance | path

Searched refs:fRefCnt (Results 1 – 13 of 13) sorted by relevance

/third_party/skia/src/gpu/
DGrNonAtomicRef.h21 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 …]
DGrManagedResource.h79 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
DGrGpuResource.h32 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/
DSkRefCnt.h34 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 …]
DSkString.h244 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/
DSkCachedData.cpp15 , 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()
DSkRegionPriv.h61 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()
DSkCachedData.h31 int testing_only_getRefCnt() const { return fRefCnt; } in testing_only_getRefCnt()
57 int fRefCnt; // low-bit means we're owned by the cache variable
DSkString.cpp235 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()
DSkAAClip.cpp166 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()
DSkRegion.cpp136 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/
DRefCntTest.cpp91 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/
DSkWeakRefCnt.h82 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()