Lines Matching refs:writer
15 static void test1(skiatest::Reporter* reporter, SkWriter32* writer) { in test1() argument
18 REPORTER_ASSERT(reporter, i*4 == writer->size()); in test1()
19 writer->write32(data[i]); in test1()
20 uint32_t* addr = writer->peek32(i * 4); in test1()
25 REPORTER_ASSERT(reporter, sizeof(buffer) == writer->size()); in test1()
26 writer->flatten(buffer); in test1()
30 static void test2(skiatest::Reporter* reporter, SkWriter32* writer) { in test2() argument
37 writer->writeString(gStr, i); in test2()
39 REPORTER_ASSERT(reporter, writer->size() == len); in test2()
42 writer->flatten(storage.get()); in test2()
59 SkWriter32 writer(256 * 4); in Tests() local
60 REPORTER_ASSERT(reporter, NULL == writer.getSingleBlock()); in Tests()
61 test1(reporter, &writer); in Tests()
63 writer.reset(); in Tests()
64 test2(reporter, &writer); in Tests()
69 SkWriter32 writer(0); in Tests() local
71 REPORTER_ASSERT(reporter, NULL == writer.getSingleBlock()); in Tests()
72 writer.reset(storage, sizeof(storage)); in Tests()
73 REPORTER_ASSERT(reporter, (void*)storage == writer.getSingleBlock()); in Tests()
74 test1(reporter, &writer); in Tests()
76 writer.reset(storage, sizeof(storage)); in Tests()
77 test2(reporter, &writer); in Tests()