Lines Matching refs:Reporter
45 static void test_clip_bounds(skiatest::Reporter* reporter, GrContext* context) {
85 REPORTER_ASSERT(reporter, screen == devStackBounds);
86 REPORTER_ASSERT(reporter, isIntersectionOfRects);
98 REPORTER_ASSERT(reporter, intScreen == devGrClipDataBound);
99 REPORTER_ASSERT(reporter, isIntersectionOfRects);
104 static void check_state(skiatest::Reporter* reporter,
109 REPORTER_ASSERT(reporter, clip.getTopmostGenID() == cache.getLastClipGenID());
111 REPORTER_ASSERT(reporter, mask == cache.getLastMask());
115 REPORTER_ASSERT(reporter, bound == cacheBound);
118 static void check_empty_state(skiatest::Reporter* reporter,
120 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID == cache.getLastClipGenID());
121 REPORTER_ASSERT(reporter, NULL == cache.getLastMask());
128 REPORTER_ASSERT(reporter, emptyBound == cacheBound);
134 static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
144 check_empty_state(reporter, cache);
161 REPORTER_ASSERT(reporter, texture1);
167 check_state(reporter, cache, clip1, texture1, bound1);
168 REPORTER_ASSERT(reporter, texture1->getRefCnt());
174 check_empty_state(reporter, cache);
175 REPORTER_ASSERT(reporter, texture1->getRefCnt());
186 REPORTER_ASSERT(reporter, texture2);
192 check_state(reporter, cache, clip2, texture2, bound2);
193 REPORTER_ASSERT(reporter, texture1->getRefCnt());
194 REPORTER_ASSERT(reporter, texture2->getRefCnt());
197 REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
198 REPORTER_ASSERT(reporter, !cache.canReuse(clip1.getTopmostGenID(), bound1));
204 check_state(reporter, cache, clip1, texture1, bound1);
205 REPORTER_ASSERT(reporter, texture1->getRefCnt());
211 check_empty_state(reporter, cache);
219 check_empty_state(reporter, cache);
224 static void TestClipCache(skiatest::Reporter* reporter, GrContextFactory* factory) {
235 test_cache(reporter, context);
236 test_clip_bounds(reporter, context);