Lines Matching refs:desc
17 static void SetLength(SkDescriptor* desc, size_t length) { desc->fLength = length; } in SetLength() argument
18 static void SetCount(SkDescriptor* desc, uint32_t count) { desc->fCount = count; } in SetCount() argument
24 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
25 REPORTER_ASSERT(r, desc->isValid()); in DEF_TEST()
26 REPORTER_ASSERT(r, desc->getLength() == size); in DEF_TEST()
33 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
35 desc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec); in DEF_TEST()
36 REPORTER_ASSERT(r, desc->isValid()); in DEF_TEST()
37 REPORTER_ASSERT(r, desc->getLength() == size); in DEF_TEST()
39 SkDescriptorTestHelper::SetLength(desc.get(), size - 4); in DEF_TEST()
40 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
48 auto desc = SkDescriptor::Alloc(size + extra_space); in DEF_TEST() local
50 desc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec); in DEF_TEST()
51 REPORTER_ASSERT(r, desc->isValid()); in DEF_TEST()
52 REPORTER_ASSERT(r, desc->getLength() == size); in DEF_TEST()
54 SkDescriptorTestHelper::SetLength(desc.get(), size - 4); in DEF_TEST()
55 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
64 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
66 desc->addEntry(kRec_SkDescriptorTag, sizeof(rec), &rec); in DEF_TEST()
67 desc->addEntry(kEffects_SkDescriptorTag, effectSize, nullptr); in DEF_TEST()
68 desc->addEntry(SkSetFourByteTag('t', 'e', 's', 't'), testSize, nullptr); in DEF_TEST()
69 REPORTER_ASSERT(r, desc->isValid()); in DEF_TEST()
70 REPORTER_ASSERT(r, desc->getLength() == size); in DEF_TEST()
72 SkDescriptorTestHelper::SetLength(desc.get(), size - 4); in DEF_TEST()
73 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
80 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
82 desc->addEntry(kRec_SkDescriptorTag, sizeof(rec) - 4, &rec); in DEF_TEST()
83 REPORTER_ASSERT(r, desc->getLength() == size); in DEF_TEST()
84 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
91 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
92 desc->addEntry(kEffects_SkDescriptorTag, effect_size, nullptr); in DEF_TEST()
94 SkDescriptorTestHelper::SetLength(desc.get(), size); in DEF_TEST()
95 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
97 SkDescriptorTestHelper::SetLength(desc.get(), size + effect_size); in DEF_TEST()
98 REPORTER_ASSERT(r, desc->isValid()); in DEF_TEST()
106 auto desc = SkDescriptor::Alloc(size); in DEF_TEST() local
108 desc->addEntry(kEffects_SkDescriptorTag, effect_size, nullptr); in DEF_TEST()
110 SkDescriptorTestHelper::SetLength(desc.get(), size); in DEF_TEST()
111 SkDescriptorTestHelper::SetCount(desc.get(), 2); in DEF_TEST()
112 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
114 SkDescriptorTestHelper::SetLength(desc.get(), size); in DEF_TEST()
115 SkDescriptorTestHelper::SetCount(desc.get(), 1); in DEF_TEST()
116 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()
120 auto desc = SkDescriptor::Alloc(36); in DEF_TEST() local
125 desc->addEntry(kEffects_SkDescriptorTag, 12, nullptr); in DEF_TEST()
127 SkDescriptorTestHelper::SetLength(desc.get(), 36); in DEF_TEST()
128 SkDescriptorTestHelper::SetCount(desc.get(), 2); in DEF_TEST()
129 REPORTER_ASSERT(r, !desc->isValid()); in DEF_TEST()