19 for (
int i = 0;
i < 100000; ++
i) {
40 for (
int i = 0;
i < 100000; ++
i) {
49 for (
int i = 0;
i < 100000; ++
i) {
85#define check(reporter, ref, unref, make, kill) \
86 REPORTER_ASSERT(reporter, gRefCounter == ref); \
87 REPORTER_ASSERT(reporter, gUnrefCounter == unref); \
88 REPORTER_ASSERT(reporter, gNewCounter == make); \
89 REPORTER_ASSERT(reporter, gDeleteCounter == kill)
118 return sk_make_sp<Effect>();
298 void reset() { bar.reset(); }
316 ~StructB()
override {}
320 StructA*
a =
new StructA;
321 a->b.reset(
new StructB);
334struct FooAbstract :
public SkRefCnt {
335 virtual void f() = 0;
337struct FooConcrete :
public FooAbstract {
344 return sk_make_sp<FooConcrete>();
static void bounce_weak_ref(void *data)
DEF_TEST(RefCnt, reporter)
#define check(reporter, ref, unref, make, kill)
static void bounce_weak_weak_ref(void *data)
static void test_weakRefCnt(skiatest::Reporter *reporter)
static int gDeleteCounter
static void bounce_ref(void *data)
static sk_sp< Effect > make_effect()
static void test_refCnt(skiatest::Reporter *reporter)
static void reset_counters()
static sk_sp< FooAbstract > make_foo()
static sk_sp< Effect > Create()
sk_sp< T > sk_make_sp(Args &&... args)
sk_sp< T > sk_ref_sp(T *obj)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
#define REPORTER_ASSERT(r, cond,...)
void set(sk_sp< Effect > value)
const sk_sp< Effect > & get() const
void reset(T *ptr=nullptr)
EMSCRIPTEN_KEEPALIVE void empty()
static sk_sp< EffectImpl > Create()
std::shared_ptr< const fml::Mapping > data