Home
last modified time | relevance | path

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

/external/skia/src/gpu/vk/
DGrVkResource.h69 GrVkResource() : fRefCnt(1) { in GrVkResource()
80 SkASSERTF(fRefCnt == 1, "fRefCnt was %d", fRefCnt); in ~GrVkResource()
81 fRefCnt = 0; // illegal value, to catch us if we reuse after delete in ~GrVkResource()
87 int32_t getRefCnt() const { return fRefCnt; } in getRefCnt()
94 if (1 == sk_atomic_load(&fRefCnt, sk_memory_order_acquire)) { in unique()
107 SkASSERT(fRefCnt > 0); in ref()
108 (void)sk_atomic_fetch_add(&fRefCnt, +1, sk_memory_order_relaxed); // No barrier required. in ref()
117 SkASSERT(fRefCnt > 0); in unref()
120 if (1 == sk_atomic_fetch_add(&fRefCnt, -1, sk_memory_order_acq_rel)) { in unref()
129 SkASSERT(fRefCnt > 0); in unrefAndAbandon()
[all …]
/external/skia/src/gpu/
DGrNonAtomicRef.h20 GrNonAtomicRef() : fRefCnt(1) {} in GrNonAtomicRef()
25 SkASSERT((0 == fRefCnt || 1 == fRefCnt)); in ~GrNonAtomicRef()
27 fRefCnt = -10; in ~GrNonAtomicRef()
31 bool unique() const { return 1 == fRefCnt; } in unique()
35 SkASSERT(fRefCnt > 0); in ref()
36 ++fRefCnt; in ref()
40 SkASSERT(fRefCnt > 0); in unref()
41 --fRefCnt; in unref()
42 if (0 == fRefCnt) { in unref()
49 mutable int32_t fRefCnt;
/external/skia/include/gpu/
DGrProgramElement.h46 SkASSERT((0 == fRefCnt || 1 == fRefCnt) && 0 == fPendingExecutions); in ~GrProgramElement()
48 SkDEBUGCODE(fRefCnt = fPendingExecutions = -10;) in ~GrProgramElement()
54 SkASSERT(fRefCnt > 0); in ref()
55 ++fRefCnt; in ref()
61 --fRefCnt; in unref()
62 if (0 == fRefCnt) { in unref()
76 SkASSERT(fRefCnt >= 0); in validate()
78 SkASSERT(fRefCnt + fPendingExecutions > 0); in validate()
83 GrProgramElement() : fRefCnt(1), fPendingExecutions(0) {} in GrProgramElement()
98 if (0 == fRefCnt) { in completedExecution()
[all …]
DGrGpuResource.h54 ++fRefCnt; in ref()
60 if (!(--fRefCnt)) { in unref()
71 SkASSERT(fRefCnt >= 0); in validate()
74 SkASSERT(fRefCnt + fPendingReads + fPendingWrites >= 0); in validate()
79 GrIORef() : fRefCnt(1), fPendingReads(0), fPendingWrites(0) { } in GrIORef()
93 bool internalHasRef() const { return SkToBool(fRefCnt); } in internalHasRef()
125 if (0 == fPendingReads && 0 == fPendingWrites && 0 == fRefCnt) { in didRemoveRefOrPendingIO()
130 mutable int32_t fRefCnt; variable
/external/skia/src/core/
DSkCachedData.cpp34 , fRefCnt(1) in SkCachedData()
46 , fRefCnt(1) in SkCachedData()
99 if ((1 == fRefCnt) && fInCache) { in inMutexRef()
103 fRefCnt += 1; in inMutexRef()
111 switch (--fRefCnt) { in inMutexUnref()
136 return 0 == fRefCnt; in inMutexUnref()
185 SkASSERT((fInCache && fRefCnt > 1) || !fInCache); in validate()
195 SkASSERT((fInCache && 1 == fRefCnt) || (0 == fRefCnt)); in validate()
DSkRegionPriv.h45 int32_t fRefCnt;
79 head->fRefCnt = 1; in Alloc()
102 SkASSERT(fRefCnt == 1); in writable_runs()
112 if (fRefCnt > 1) { in ensureWritable()
123 if (sk_atomic_dec(&fRefCnt) == 1) { in ensureWritable()
DSkString.cpp234 rec->fRefCnt = 1; in AllocRec()
245 sk_atomic_inc(&src->fRefCnt); in RefRec()
254 SkASSERT(0 == gEmptyRec.fRefCnt); in validate()
259 SkASSERT(fRec->fRefCnt > 0); in validate()
301 SkASSERT(fRec->fRefCnt > 0); in ~SkString()
302 if (sk_atomic_dec(&fRec->fRefCnt) == 1) { in ~SkString()
354 SkASSERT(fRec->fRefCnt > 0); in reset()
355 if (sk_atomic_dec(&fRec->fRefCnt) == 1) { in reset()
367 if (fRec->fRefCnt > 1) { in writable_str()
369 if (sk_atomic_dec(&fRec->fRefCnt) == 1) { in writable_str()
[all …]
DSkRWBuffer.cpp64 mutable int32_t fRefCnt; member
67 SkBufferHead(size_t capacity) : fRefCnt(1), fBlock(capacity) {} in SkBufferHead()
82 SkASSERT(fRefCnt > 0); in ref()
83 sk_atomic_inc(&fRefCnt); in ref()
87 SkASSERT(fRefCnt > 0); in unref()
89 if (1 == sk_atomic_fetch_add(&fRefCnt, -1, sk_memory_order_acq_rel)) { in unref()
103 SkASSERT(fRefCnt > 0); in validate()
DSkCachedData.h30 int testing_only_getRefCnt() const { return fRefCnt; } in testing_only_getRefCnt()
56 int fRefCnt; // low-bit means we're owned by the cache variable
DSkRegion.cpp92 SkASSERT(fRunHead->fRefCnt >= 1); in freeRuns()
93 if (sk_atomic_dec(&fRunHead->fRefCnt) == 1) { in freeRuns()
164 sk_atomic_inc(&fRunHead->fRefCnt); in setRegion()
1260 return fRunHead && fRunHead->fRefCnt > 0 && in isValid()
DSkAAClip.cpp58 int32_t fRefCnt; member
78 head->fRefCnt = 1; in Alloc()
197 SkASSERT(head->fRefCnt > 0); in validate()
619 SkASSERT(fRunHead->fRefCnt >= 1); in freeRuns()
620 if (1 == sk_atomic_dec(&fRunHead->fRefCnt)) { in freeRuns()
650 sk_atomic_inc(&fRunHead->fRefCnt); in operator =()
1842 sk_atomic_inc(&fRunHead->fRefCnt); in translate()
/external/skia/include/private/
DGrSurfaceProxy.h33 ++fRefCnt; in ref()
46 if (!(--fRefCnt)) { in unref()
56 SkASSERT(fRefCnt >= 1); in validate()
59 SkASSERT(fRefCnt + fPendingReads + fPendingWrites >= 1); in validate()
66 SkASSERT(fTarget->fRefCnt >= fRefCnt); in validate()
77 GrIORefProxy() : fTarget(nullptr), fRefCnt(1), fPendingReads(0), fPendingWrites(0) {} in GrIORefProxy()
78 GrIORefProxy(sk_sp<GrSurface> surface) : fRefCnt(1), fPendingReads(0), fPendingWrites(0) { in GrIORefProxy()
94 fTarget->fRefCnt += (fRefCnt-1); // don't xfer the proxy's creation ref in transferRefs()
163 mutable int32_t fRefCnt; variable
DSkWeakRefCnt.h87 int32_t prev = fRefCnt.load(std::memory_order_relaxed); in atomic_conditional_acquire_strong_ref()
92 } while(!fRefCnt.compare_exchange_weak(prev, prev+1, std::memory_order_acquire, in atomic_conditional_acquire_strong_ref()
147 return fRefCnt.load(std::memory_order_relaxed) == 0; in weak_expired()
/external/skia/include/core/
DSkRefCnt.h33 SkRefCntBase() : fRefCnt(1) {} in SkRefCntBase()
41 fRefCnt.store(0, std::memory_order_relaxed); in ~SkRefCntBase()
48 return fRefCnt.load(std::memory_order_relaxed); in getRefCnt()
60 if (1 == fRefCnt.load(std::memory_order_acquire)) { in unique()
74 (void)fRefCnt.fetch_add(+1, std::memory_order_relaxed); in ref()
84 if (1 == fRefCnt.fetch_add(-1, std::memory_order_acq_rel)) { in unref()
99 fRefCnt.store(1, std::memory_order_relaxed); in internal_dispose_restore_refcnt_to_1()
115 mutable std::atomic<int32_t> fRefCnt; variable
211 SkNVRefCnt() : fRefCnt(1) {} in SkNVRefCnt()
219 bool unique() const { return 1 == fRefCnt.load(std::memory_order_acquire); } in unique()
[all …]
DSkString.h243 int32_t fRefCnt; member
/external/skia/tests/
DRefCntTest.cpp99 Effect() : fRefCnt(1) { in Effect()
104 int fRefCnt; member in Effect
108 fRefCnt += 1; in ref()
113 SkASSERT(fRefCnt > 0); in unref()
114 if (0 == --fRefCnt) { in unref()
168 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 1); in DEF_TEST()
201 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 2); in DEF_TEST()
206 REPORTER_ASSERT(reporter, paint.fEffect.get()->fRefCnt == 3); in DEF_TEST()
DProxyRefTest.cpp20 return fRefCnt; in getProxyRefCnt_TestOnly()
25 return fTarget->fRefCnt; in getBackingRefCnt_TestOnly()
28 return fRefCnt; in getBackingRefCnt_TestOnly()
DProcessorTest.cpp120 *refCnt = resource->fRefCnt; in testingOnly_getIORefCnts()
/external/skia/src/gpu/ops/
DGrDrawPathOp.h116 instanceData->fRefCnt = 1; in Alloc()
140 void ref() const { ++fRefCnt; } in ref()
143 if (0 == --fRefCnt) { in unref()
158 mutable int fRefCnt; member
/external/skia/src/ports/
DSkFontHost_FreeType.cpp237 uint32_t fRefCnt; member
274 : fNext(nullptr), fSkStream(std::move(stream)), fRefCnt(1), fFontID(fontID) in SkFaceRec()
338 cachedRec->fRefCnt += 1; in ref_ft_face()
401 if (--rec->fRefCnt == 0) { in unref_ft_face()