Go to the source code of this file.
◆ decrement_counter_proc()
static void decrement_counter_proc |
( |
void * |
pixels, |
|
|
void * |
ctx |
|
) |
| |
|
static |
Definition at line 16 of file PixelRefTest.cpp.
16 {
17 int* counter = (int*)ctx;
18 *counter -= 1;
19}
◆ DEF_TEST()
DEF_TEST |
( |
PixelRef_GenIDChange |
, |
|
|
r |
|
|
) |
| |
Definition at line 72 of file PixelRefTest.cpp.
72 {
74
76
77
81
82
83
86
87
89
90
93
94
99
100
102 auto listener = sk_make_sp<TestListener>(&
count);
105 listener->markShouldDeregister();
108
109
111 listener = sk_make_sp<TestListener>(&
count);
114 listener->markShouldDeregister();
115
118
119
123
126}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void test_dont_leak_install(skiatest::Reporter *reporter)
static void test_install(skiatest::Reporter *reporter)
#define REPORTER_ASSERT(r, cond,...)
void notifyPixelsChanged()
uint32_t getGenerationID() const
void addGenIDChangeListener(sk_sp< SkIDChangeListener > listener)
SK_API sk_sp< SkPixelRef > MakeAllocate(const SkImageInfo &, size_t rowBytes)
static SkImageInfo MakeN32Premul(int width, int height)
◆ test_dont_leak_install()
Definition at line 21 of file PixelRefTest.cpp.
21 {
22 bool success;
23 int release_counter;
26
28 release_counter = 1;
33
35 release_counter = 1;
40
42 release_counter = 1;
47}
static void decrement_counter_proc(void *pixels, void *ctx)
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
◆ test_install()