/external/skia/src/gpu/vk/ |
D | GrVkResource.h | 69 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/ |
D | GrNonAtomicRef.h | 20 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/ |
D | GrProgramElement.h | 46 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 …]
|
D | GrGpuResource.h | 54 ++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/ |
D | SkCachedData.cpp | 34 , 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()
|
D | SkRegionPriv.h | 45 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()
|
D | SkString.cpp | 234 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 …]
|
D | SkRWBuffer.cpp | 64 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()
|
D | SkCachedData.h | 30 int testing_only_getRefCnt() const { return fRefCnt; } in testing_only_getRefCnt() 56 int fRefCnt; // low-bit means we're owned by the cache variable
|
D | SkRegion.cpp | 92 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()
|
D | SkAAClip.cpp | 58 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/ |
D | GrSurfaceProxy.h | 33 ++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
|
D | SkWeakRefCnt.h | 87 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/ |
D | SkRefCnt.h | 33 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 …]
|
D | SkString.h | 243 int32_t fRefCnt; member
|
/external/skia/tests/ |
D | RefCntTest.cpp | 99 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()
|
D | ProxyRefTest.cpp | 20 return fRefCnt; in getProxyRefCnt_TestOnly() 25 return fTarget->fRefCnt; in getBackingRefCnt_TestOnly() 28 return fRefCnt; in getBackingRefCnt_TestOnly()
|
D | ProcessorTest.cpp | 120 *refCnt = resource->fRefCnt; in testingOnly_getIORefCnts()
|
/external/skia/src/gpu/ops/ |
D | GrDrawPathOp.h | 116 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/ |
D | SkFontHost_FreeType.cpp | 237 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()
|