static void check_empty_state(skiatest::Reporter* reporter, const GrClipMaskCache& cache) { REPORTER_ASSERT(reporter, SkClipStack::kInvalidGenID == cache.getLastClipGenID()); REPORTER_ASSERT(reporter, NULL == cache.getLastMask()); SkIRect emptyBound; emptyBound.setEmpty(); SkIRect cacheBound; cache.getLastBound(&cacheBound); REPORTER_ASSERT(reporter, emptyBound == cacheBound); }
//////////////////////////////////////////////////////////////////////////////// // verify that the top state of the stack matches the passed in state static void check_state(skiatest::Reporter* reporter, const GrClipMaskCache& cache, const SkClipStack& clip, GrTexture* mask, const SkIRect& bound) { REPORTER_ASSERT(reporter, clip.getTopmostGenID() == cache.getLastClipGenID()); REPORTER_ASSERT(reporter, mask == cache.getLastMask()); SkIRect cacheBound; cache.getLastBound(&cacheBound); REPORTER_ASSERT(reporter, bound == cacheBound); }