Home | History | Annotate | Download | only in tests

Lines Matching full:reporter

44 static void test_clip_bounds(skiatest::Reporter* reporter, GrContext* context) {
84 REPORTER_ASSERT(reporter, screen == devStackBounds);
85 REPORTER_ASSERT(reporter, isIntersectionOfRects);
97 REPORTER_ASSERT(reporter, intScreen == devGrClipDataBound);
98 REPORTER_ASSERT(reporter, isIntersectionOfRects);
103 static void check_state(skiatest::Reporter* reporter,
108 REPORTER_ASSERT(reporter, clip.getTopmostGenID() == cache.getLastClipGenID());
110 REPORTER_ASSERT(reporter, mask == cache.getLastMask());
114 REPORTER_ASSERT(reporter, bound == cacheBound);
117 static void check_empty_state(skiatest::Reporter* reporter,
119 REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID == cache.getLastClipGenID());
120 REPORTER_ASSERT(reporter, NULL == cache.getLastMask());
127 REPORTER_ASSERT(reporter, emptyBound == cacheBound);
133 static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
143 check_empty_state(reporter, cache);
160 REPORTER_ASSERT(reporter, texture1);
166 check_state(reporter, cache, clip1, texture1, bound1);
167 REPORTER_ASSERT(reporter, texture1->getRefCnt());
173 check_empty_state(reporter, cache);
174 REPORTER_ASSERT(reporter, texture1->getRefCnt());
185 REPORTER_ASSERT(reporter, texture2);
191 check_state(reporter, cache, clip2, texture2, bound2);
192 REPORTER_ASSERT(reporter, texture1->getRefCnt());
193 REPORTER_ASSERT(reporter, texture2->getRefCnt());
196 REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
197 REPORTER_ASSERT(reporter, !cache.canReuse(clip1.getTopmostGenID(), bound1));
203 check_state(reporter, cache, clip1, texture1, bound1);
204 REPORTER_ASSERT(reporter, texture1->getRefCnt());
210 check_empty_state(reporter, cache);
218 check_empty_state(reporter, cache);
222 DEF_GPUTEST(ClipCache, reporter, factory) {
233 test_cache(reporter, context);
234 test_clip_bounds(reporter, context);