Lines Matching full:stack
56 // Build up a clip stack with a path, an empty clip, and a rect. in test_assign_and_comparison()
148 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack, in assert_count() argument
150 SkClipStack::B2TIter iter(stack); in assert_count()
161 SkClipStack stack; in test_iterators() local
172 stack.clipRect(gRects[i], SkMatrix::I(), kUnion_SkClipOp, false); in test_iterators()
175 assert_count(reporter, stack, 4); in test_iterators()
181 SkClipStack::B2TIter iter(stack); in test_iterators()
197 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in test_iterators()
213 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in test_iterators()
278 SkClipStack stack; in test_bounds() local
287 stack.save(); in test_bounds()
301 stack.clipRect(rectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
302 stack.clipRect(rectB, SkMatrix::I(), gOps[op], false); in test_bounds()
305 stack.clipRRect(rrectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
306 stack.clipRRect(rrectB, SkMatrix::I(), gOps[op], false); in test_bounds()
309 stack.clipPath(pathA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
310 stack.clipPath(pathB, SkMatrix::I(), gOps[op], false); in test_bounds()
314 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_bounds()
315 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_bounds()
317 stack.getConservativeBounds(0, 0, 100, 100, &devClipBound, in test_bounds()
331 stack.restore(); in test_bounds()
339 // Empty stack is wide open. Wide open stack means that gen id is wide open. in test_isWideOpen()
340 SkClipStack stack; in test_isWideOpen() local
341 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
342 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
350 // Stack should initially be wide open in test_isWideOpen()
352 SkClipStack stack; in test_isWideOpen() local
354 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
355 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
360 SkClipStack stack; in test_isWideOpen() local
370 stack.clipPath(clipA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
371 stack.clipPath(clipB, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
373 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
374 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
379 SkClipStack stack; in test_isWideOpen() local
381 stack.clipRect(rectA, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
383 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
384 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
389 SkClipStack stack; in test_isWideOpen() local
394 stack.clipRect(emptyRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_isWideOpen()
396 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
397 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
402 SkClipStack stack; in test_isWideOpen() local
404 stack.save(); in test_isWideOpen()
406 stack.clipRect(rectA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
408 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_isWideOpen()
409 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_isWideOpen()
411 stack.restore(); in test_isWideOpen()
413 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
414 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
418 static int count(const SkClipStack& stack) { in count() argument
420 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in count()
438 SkClipStack stack; in test_rect_inverse_fill() local
439 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_inverse_fill()
443 stack.getBounds(&bounds, &boundsType); in test_rect_inverse_fill()
457 // the stack depth. BW replacing BW. in test_rect_replace()
459 SkClipStack stack; in test_rect_replace() local
460 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
461 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
462 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
463 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
464 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
468 // the stack depth. AA replacing AA. in test_rect_replace()
470 SkClipStack stack; in test_rect_replace() local
471 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
472 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
473 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
474 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
475 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
479 // the stack depth. BW replacing AA replacing BW. in test_rect_replace()
481 SkClipStack stack; in test_rect_replace() local
482 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
483 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
484 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
485 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
486 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
487 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
488 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
493 SkClipStack stack; in test_rect_replace() local
494 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
495 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
496 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
498 stack.save(); in test_rect_replace()
499 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
500 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
501 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_replace()
503 stack.restore(); in test_rect_replace()
504 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
506 stack.save(); in test_rect_replace()
507 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
508 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
509 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
510 stack.restore(); in test_rect_replace()
511 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
513 stack.save(); in test_rect_replace()
514 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
515 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
516 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
517 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
518 stack.restore(); in test_rect_replace()
519 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
529 // Replace operation doesn't grow the stack. in test_path_replace()
531 SkClipStack stack; in test_path_replace() local
532 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_path_replace()
533 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
534 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
535 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
536 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
541 SkClipStack stack; in test_path_replace() local
542 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
543 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
544 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
545 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
565 SkClipStack stack; in test_rect_merging() local
567 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
569 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
571 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
573 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
580 SkClipStack stack; in test_rect_merging() local
582 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
584 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
586 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
588 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
595 SkClipStack stack; in test_rect_merging() local
597 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
599 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
601 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
603 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
610 SkClipStack stack; in test_rect_merging() local
612 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
614 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
616 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
618 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
625 SkClipStack stack; in test_rect_merging() local
627 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
629 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
631 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
633 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
640 SkClipStack stack; in test_rect_merging() local
642 stack.clipRect(nestedChild, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
644 stack.clipRect(nestedParent, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
646 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
648 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
671 SkClipStack stack; in test_quickContains() local
672 stack.clipRect(outsideRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_quickContains()
674 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
679 SkClipStack stack; in test_quickContains() local
680 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
681 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
685 SkClipStack stack; in test_quickContains() local
686 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
687 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
688 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
689 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
690 stack.restore(); in test_quickContains()
694 SkClipStack stack; in test_quickContains() local
695 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
696 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
697 stack.clipRect(insideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
698 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
699 stack.restore(); in test_quickContains()
704 SkClipStack stack; in test_quickContains() local
705 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
707 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
708 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
713 SkClipStack stack; in test_quickContains() local
714 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
715 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
719 SkClipStack stack; in test_quickContains() local
720 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
721 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
725 SkClipStack stack; in test_quickContains() local
726 stack.clipRect(intersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
727 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
731 SkClipStack stack; in test_quickContains() local
732 stack.clipRect(nonIntersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
733 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
738 SkClipStack stack; in test_quickContains() local
739 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
740 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
744 SkClipStack stack; in test_quickContains() local
745 stack.clipPath(insideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
746 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
750 SkClipStack stack; in test_quickContains() local
751 stack.clipPath(intersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
752 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
756 SkClipStack stack; in test_quickContains() local
757 stack.clipPath(nonIntersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
758 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
763 SkClipStack stack; in test_quickContains() local
767 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
768 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
772 SkClipStack stack; in test_quickContains() local
776 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
777 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
781 SkClipStack stack; in test_quickContains() local
785 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
786 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
790 SkClipStack stack; in test_quickContains() local
794 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
795 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
800 SkClipStack stack; in test_quickContains() local
803 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
804 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
808 SkClipStack stack; in test_quickContains() local
811 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
812 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
816 SkClipStack stack; in test_quickContains() local
819 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
820 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
824 SkClipStack stack; in test_quickContains() local
827 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
828 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
832 static void set_region_to_stack(const SkClipStack& stack, const SkIRect& bounds, SkRegion* region) { in set_region_to_stack() argument
834 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in set_region_to_stack()
854 SkClipStack stack; in test_invfill_diff_bug() local
855 stack.clipRect({10, 10, 20, 20}, SkMatrix::I(), kIntersect_SkClipOp, false); in test_invfill_diff_bug()
860 stack.clipPath(path, SkMatrix::I(), kDifference_SkClipOp, false); in test_invfill_diff_bug()
862 REPORTER_ASSERT(reporter, SkClipStack::kEmptyGenID == stack.getTopmostGenID()); in test_invfill_diff_bug()
866 stack.getBounds(&stackBounds, &stackBoundsType); in test_invfill_diff_bug()
872 set_region_to_stack(stack, {0, 0, 50, 30}, ®ion); in test_invfill_diff_bug()
879 // Functions that add a shape to the clip stack. The shape is computed from a rectangle.
880 // AA is always disabled since the clip stack reducer can cause changes in aa rasterization of the
881 // stack. A fractional edge repeated in different elements may be rasterized fewer times using the
882 // reduced stack.
886 SkClipStack* stack,
889 static void add_round_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_round_rect() argument
897 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_round_rect()
901 stack->clipRRect(rrect, SkMatrix::I(), op, doAA); in add_round_rect()
905 static void add_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_rect() argument
911 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_rect()
913 stack->clipRect(rect, SkMatrix::I(), op, doAA); in add_rect()
917 static void add_oval(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_oval() argument
924 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_oval()
927 static void add_elem_to_stack(const SkClipStack::Element& element, SkClipStack* stack) { in add_elem_to_stack() argument
930 stack->clipRect(element.getDeviceSpaceRect(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
934 stack->clipRRect(element.getDeviceSpaceRRect(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
938 stack->clipPath(element.getDeviceSpacePath(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
943 stack->clipEmpty(); in add_elem_to_stack()
997 // Randomly generate a clip stack. in test_reduced_clip_stack()
998 SkClipStack stack; in test_reduced_clip_stack() local
1010 // saves can change the clip stack behavior when an element is added. in test_reduced_clip_stack()
1037 kElementFuncs[r.nextULessThan(SK_ARRAY_COUNT(kElementFuncs))](rect, invert, op, &stack, in test_reduced_clip_stack()
1040 stack.save(); in test_reduced_clip_stack()
1053 // Get the reduced version of the stack. in test_reduced_clip_stack()
1056 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, queryBounds, caps); in test_reduced_clip_stack()
1067 stack.getBounds(&stackBounds, &stackBoundsType); in test_reduced_clip_stack()
1071 // Build a new clip stack based on the reduced clip elements in test_reduced_clip_stack()
1085 stack.clipDevRect(scissor, kIntersect_SkClipOp); in test_reduced_clip_stack()
1087 // convert both the original stack and reduced stack to SkRegions and see if they're equal in test_reduced_clip_stack()
1089 set_region_to_stack(stack, scissor, ®ion); in test_reduced_clip_stack()
1108 SkClipStack stack; in test_reduced_clip_stack_genid() local
1109 stack.clipRect(SkRect::MakeXYWH(0, 0, 100, 100), SkMatrix::I(), kReplace_SkClipOp, in test_reduced_clip_stack_genid()
1111 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(50.3), SkScalar(50.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1121 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, bounds, caps); in test_reduced_clip_stack_genid()
1130 SkClipStack stack; in test_reduced_clip_stack_genid() local
1136 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1138 uint32_t genIDA = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1139 stack.clipRect(SkRect::MakeXYWH(50, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1141 uint32_t genIDB = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1142 stack.clipRect(SkRect::MakeXYWH(0, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1144 uint32_t genIDC = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1145 stack.clipRect(SkRect::MakeXYWH(50, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1147 uint32_t genIDD = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1208 const GrReducedClip reduced(stack, testCases[i].testBounds, caps); in test_reduced_clip_stack_genid()
1227 SkClipStack stack; in test_reduced_clip_stack_no_aa_crash() local
1228 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 100, 100), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1229 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 50, 50), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1236 const GrReducedClip reduced(stack, bounds, caps); in test_reduced_clip_stack_no_aa_crash()
1248 const SkClipStack& stack, const SkMatrix& queryXform, in test_aa_query() argument
1256 const GrReducedClip reduced(stack, queryBounds, caps); in test_aa_query()
1260 stack.getBounds(&stackBounds, &stackBoundsType); in test_aa_query()
1333 SkClipStack stack; in test_reduced_clip_stack_aa() local
1334 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1335 test_aa_query(reporter, name, stack, m, {IL, IT, IR, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1336 test_aa_query(reporter, name, stack, m, {IL, IT-1, IR, IT}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1337 test_aa_query(reporter, name, stack, m, {IL, IT-2, IR, IB}, ClipMethod::kScissor); in test_reduced_clip_stack_aa()
1341 stack.reset(); in test_reduced_clip_stack_aa()
1342 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1343 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1344 test_aa_query(reporter, name, stack, m, {L-.1f, T, L, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1345 test_aa_query(reporter, name, stack, m, {L-.1f, T, L+.1f, B}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1349 stack.reset(); in test_reduced_clip_stack_aa()
1350 stack.clipRect(rect, SkMatrix::I(), kDifference_SkClipOp, true); in test_reduced_clip_stack_aa()
1351 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1352 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1353 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1357 stack.reset(); in test_reduced_clip_stack_aa()
1358 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1359 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1360 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1361 test_aa_query(reporter, name, stack, m, {r-.1f, t, R, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1362 test_aa_query(reporter, name, stack, m, {r-.1f, t, R+.1f, b}, ClipMethod::kAAElements, 2); in test_reduced_clip_stack_aa()
1363 test_aa_query(reporter, name, stack, m, {r, t, R+.1f, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1364 test_aa_query(reporter, name, stack, m, {r, t, R, b}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1365 test_aa_query(reporter, name, stack, m, {R, T, R+.1f, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1369 stack.reset(); in test_reduced_clip_stack_aa()
1370 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1371 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1372 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1373 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1374 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1375 test_aa_query(reporter, name, stack, m, {l, b, r, IB+.1f}, ClipMethod::kAAElements, 0); in test_reduced_clip_stack_aa()
1376 test_aa_query(reporter, name, stack, m, {l, b, r, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1377 test_aa_query(reporter, name, stack, m, {IL, IB, IR, IB+.1f}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1379 // Apply random transforms and try again. This ensures the clip stack reduction is hardened in test_reduced_clip_stack_aa()
1416 for (const SkClipStack& stack : {rectStack, pathStack}) { in test_tiny_query_bounds_assertion_bug()
1421 const GrReducedClip reduced(stack, queryBounds, caps); in test_tiny_query_bounds_assertion_bug()
1434 SkClipStack stack; in test_is_rrect_deep_rect_stack() local
1436 stack.save(); in test_is_rrect_deep_rect_stack()
1437 stack.clipRect(SkRect::MakeLTRB(i, 0.5, kTargetBounds.width(), kTargetBounds.height()), in test_is_rrect_deep_rect_stack()
1444 if (stack.isRRect(kTargetBounds, &rrect, &isAA)) { in test_is_rrect_deep_rect_stack()
1452 SkClipStack stack; in test_is_rrect_deep_rect_stack() local
1456 stack.save(); in test_is_rrect_deep_rect_stack()
1457 stack.clipRect(SkRect::MakeLTRB(i, j + 0.5, kTargetBounds.width(), kTargetBounds.height()), in test_is_rrect_deep_rect_stack()
1462 REPORTER_ASSERT(reporter, !stack.isRRect(kTargetBounds, &rrect, &isAA)); in test_is_rrect_deep_rect_stack()
1466 SkClipStack stack; in DEF_TEST() local
1468 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1469 assert_count(reporter, stack, 0); in DEF_TEST()
1478 stack.clipDevRect(gRects[i], kIntersect_SkClipOp); in DEF_TEST()
1482 SkClipStack::B2TIter iter(stack); in DEF_TEST()
1495 stack.reset(); in DEF_TEST()
1496 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1497 assert_count(reporter, stack, 0); in DEF_TEST()
1532 SkClipStack stack; in DEF_GPUTEST_FOR_ALL_CONTEXTS() local
1547 stack.save(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1548 stack.clipPath(path, m, SkClipOp::kIntersect, true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1549 sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1560 stack.restore(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()