17constexpr char kTestString[] =
"HELLO, WORLD!";
18constexpr size_t kTestStringLength =
sizeof(kTestString);
28 void* ptr = dm->
data();
33 memcpy(ptr, kTestString,
sizeof(kTestString));
35 bool relockSuccess = dm->
lock();
61 std::unique_ptr<SkDiscardableMemory> dm(
pool->create(kTestStringLength));
DEF_TEST(DiscardableMemory_global, reporter)
static void test_dm(skiatest::Reporter *reporter, SkDiscardableMemory *dm, bool assertRelock)
#define REPORTER_ASSERT(r, cond,...)
static sk_sp< SkDiscardableMemoryPool > Make(size_t size)
static SkDiscardableMemory * Create(size_t bytes)