• Home
  • Raw
  • Download

Lines Matching full:stack

30     // Build up a clip stack with a path, an empty clip, and a rect.  in test_assign_and_comparison()
122 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack, in assert_count() argument
124 SkClipStack::B2TIter iter(stack); in assert_count()
135 SkClipStack stack; in test_iterators() local
146 stack.clipRect(gRects[i], SkMatrix::I(), kUnion_SkClipOp, false); in test_iterators()
149 assert_count(reporter, stack, 4); in test_iterators()
155 SkClipStack::B2TIter iter(stack); in test_iterators()
170 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in test_iterators()
185 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in test_iterators()
248 SkClipStack stack; in test_bounds() local
257 stack.save(); in test_bounds()
271 stack.clipRect(rectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
272 stack.clipRect(rectB, SkMatrix::I(), gOps[op], false); in test_bounds()
275 stack.clipRRect(rrectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
276 stack.clipRRect(rrectB, SkMatrix::I(), gOps[op], false); in test_bounds()
279 stack.clipPath(pathA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
280 stack.clipPath(pathB, SkMatrix::I(), gOps[op], false); in test_bounds()
284 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_bounds()
285 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_bounds()
287 stack.getConservativeBounds(0, 0, 100, 100, &devClipBound, in test_bounds()
301 stack.restore(); in test_bounds()
309 // Empty stack is wide open. Wide open stack means that gen id is wide open. in test_isWideOpen()
310 SkClipStack stack; in test_isWideOpen() local
311 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
312 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
320 // Stack should initially be wide open in test_isWideOpen()
322 SkClipStack stack; in test_isWideOpen() local
324 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
325 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
330 SkClipStack stack; in test_isWideOpen() local
340 stack.clipPath(clipA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
341 stack.clipPath(clipB, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
343 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
344 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
349 SkClipStack stack; in test_isWideOpen() local
351 stack.clipRect(rectA, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
353 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
354 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
359 SkClipStack stack; in test_isWideOpen() local
364 stack.clipRect(emptyRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_isWideOpen()
366 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
367 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
372 SkClipStack stack; in test_isWideOpen() local
374 stack.save(); in test_isWideOpen()
376 stack.clipRect(rectA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
378 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_isWideOpen()
379 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_isWideOpen()
381 stack.restore(); in test_isWideOpen()
383 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
384 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
388 static int count(const SkClipStack& stack) { in count() argument
390 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in count()
409 SkClipStack stack; in test_rect_inverse_fill() local
410 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_inverse_fill()
414 stack.getBounds(&bounds, &boundsType); in test_rect_inverse_fill()
428 // the stack depth. BW replacing BW. in test_rect_replace()
430 SkClipStack stack; in test_rect_replace() local
431 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
432 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
433 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
434 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
435 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
439 // the stack depth. AA replacing AA. in test_rect_replace()
441 SkClipStack stack; in test_rect_replace() local
442 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
443 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
444 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
445 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
446 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
450 // the stack depth. BW replacing AA replacing BW. in test_rect_replace()
452 SkClipStack stack; in test_rect_replace() local
453 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
454 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
455 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
456 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
457 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
458 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
459 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
464 SkClipStack stack; in test_rect_replace() local
465 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
466 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
467 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
469 stack.save(); in test_rect_replace()
470 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
471 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
472 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_replace()
474 stack.restore(); in test_rect_replace()
475 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
477 stack.save(); in test_rect_replace()
478 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
479 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
480 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
481 stack.restore(); in test_rect_replace()
482 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
484 stack.save(); in test_rect_replace()
485 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
486 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
487 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
488 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
489 stack.restore(); in test_rect_replace()
490 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
500 // Replace operation doesn't grow the stack. in test_path_replace()
502 SkClipStack stack; in test_path_replace() local
503 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_path_replace()
504 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
505 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
506 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
507 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
512 SkClipStack stack; in test_path_replace() local
513 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
514 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
515 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
516 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
536 SkClipStack stack; in test_rect_merging() local
538 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
540 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
542 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
544 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
551 SkClipStack stack; in test_rect_merging() local
553 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
555 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
557 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
559 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
566 SkClipStack stack; in test_rect_merging() local
568 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
570 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
572 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
574 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
581 SkClipStack stack; in test_rect_merging() local
583 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
585 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
587 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
589 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
596 SkClipStack stack; in test_rect_merging() local
598 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
600 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
602 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
604 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
611 SkClipStack stack; in test_rect_merging() local
613 stack.clipRect(nestedChild, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
615 stack.clipRect(nestedParent, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
617 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
619 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
642 SkClipStack stack; in test_quickContains() local
643 stack.clipRect(outsideRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_quickContains()
645 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
650 SkClipStack stack; in test_quickContains() local
651 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
652 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
656 SkClipStack stack; in test_quickContains() local
657 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
658 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
659 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
660 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
661 stack.restore(); in test_quickContains()
665 SkClipStack stack; in test_quickContains() local
666 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
667 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
668 stack.clipRect(insideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
669 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
670 stack.restore(); in test_quickContains()
675 SkClipStack stack; in test_quickContains() local
676 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
678 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
679 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
684 SkClipStack stack; in test_quickContains() local
685 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
686 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
690 SkClipStack stack; in test_quickContains() local
691 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
692 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
696 SkClipStack stack; in test_quickContains() local
697 stack.clipRect(intersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
698 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
702 SkClipStack stack; in test_quickContains() local
703 stack.clipRect(nonIntersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
704 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
709 SkClipStack stack; in test_quickContains() local
710 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
711 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
715 SkClipStack stack; in test_quickContains() local
716 stack.clipPath(insideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
717 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
721 SkClipStack stack; in test_quickContains() local
722 stack.clipPath(intersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
723 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
727 SkClipStack stack; in test_quickContains() local
728 stack.clipPath(nonIntersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
729 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
734 SkClipStack stack; in test_quickContains() local
738 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
739 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
743 SkClipStack stack; in test_quickContains() local
747 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
748 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
752 SkClipStack stack; in test_quickContains() local
756 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
757 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
761 SkClipStack stack; in test_quickContains() local
765 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
766 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
771 SkClipStack stack; in test_quickContains() local
774 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
775 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
779 SkClipStack stack; in test_quickContains() local
782 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
783 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
787 SkClipStack stack; in test_quickContains() local
790 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
791 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
795 SkClipStack stack; in test_quickContains() local
798 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
799 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
803 static void set_region_to_stack(const SkClipStack& stack, const SkIRect& bounds, SkRegion* region) { in set_region_to_stack() argument
805 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in set_region_to_stack()
825 SkClipStack stack; in test_invfill_diff_bug() local
826 stack.clipRect({10, 10, 20, 20}, SkMatrix::I(), kIntersect_SkClipOp, false); in test_invfill_diff_bug()
831 stack.clipPath(path, SkMatrix::I(), kDifference_SkClipOp, false); in test_invfill_diff_bug()
833 REPORTER_ASSERT(reporter, SkClipStack::kEmptyGenID == stack.getTopmostGenID()); in test_invfill_diff_bug()
837 stack.getBounds(&stackBounds, &stackBoundsType); in test_invfill_diff_bug()
843 set_region_to_stack(stack, {0, 0, 50, 30}, &region); in test_invfill_diff_bug()
851 // Functions that add a shape to the clip stack. The shape is computed from a rectangle.
852 // AA is always disabled since the clip stack reducer can cause changes in aa rasterization of the
853 // stack. A fractional edge repeated in different elements may be rasterized fewer times using the
854 // reduced stack.
858 SkClipStack* stack,
861 static void add_round_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_round_rect() argument
869 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_round_rect()
873 stack->clipRRect(rrect, SkMatrix::I(), op, doAA); in add_round_rect()
877 static void add_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_rect() argument
883 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_rect()
885 stack->clipRect(rect, SkMatrix::I(), op, doAA); in add_rect()
889 static void add_oval(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_oval() argument
896 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_oval()
899 static void add_elem_to_stack(const SkClipStack::Element& element, SkClipStack* stack) { in add_elem_to_stack() argument
902 stack->clipRect(element.getRect(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
905 stack->clipRRect(element.getRRect(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
908 stack->clipPath(element.getPath(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
912 stack->clipEmpty(); in add_elem_to_stack()
966 // Randomly generate a clip stack. in test_reduced_clip_stack()
967 SkClipStack stack; in test_reduced_clip_stack() local
979 // saves can change the clip stack behavior when an element is added. in test_reduced_clip_stack()
1006 kElementFuncs[r.nextULessThan(SK_ARRAY_COUNT(kElementFuncs))](rect, invert, op, &stack, in test_reduced_clip_stack()
1009 stack.save(); in test_reduced_clip_stack()
1019 // Get the reduced version of the stack. in test_reduced_clip_stack()
1022 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, queryBounds); in test_reduced_clip_stack()
1033 stack.getBounds(&stackBounds, &stackBoundsType); in test_reduced_clip_stack()
1036 // will be true since the stack bounds are completely contained inside the query. in test_reduced_clip_stack()
1044 // Build a new clip stack based on the reduced clip elements in test_reduced_clip_stack()
1058 stack.clipDevRect(ibounds, kIntersect_SkClipOp); in test_reduced_clip_stack()
1060 // convert both the original stack and reduced stack to SkRegions and see if they're equal in test_reduced_clip_stack()
1062 set_region_to_stack(stack, ibounds, &region); in test_reduced_clip_stack()
1081 SkClipStack stack; in test_reduced_clip_stack_genid() local
1082 stack.clipRect(SkRect::MakeXYWH(0, 0, 100, 100), SkMatrix::I(), kReplace_SkClipOp, in test_reduced_clip_stack_genid()
1084 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(50.3), SkScalar(50.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1091 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, bounds); in test_reduced_clip_stack_genid()
1100 SkClipStack stack; in test_reduced_clip_stack_genid() local
1106 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1108 int32_t genIDA = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1109 stack.clipRect(SkRect::MakeXYWH(50, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1111 int32_t genIDB = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1112 stack.clipRect(SkRect::MakeXYWH(0, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1114 int32_t genIDC = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1115 stack.clipRect(SkRect::MakeXYWH(50, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1117 int32_t genIDD = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1176 const GrReducedClip reduced(stack, testCases[i].testBounds); in test_reduced_clip_stack_genid()
1194 SkClipStack stack; in test_reduced_clip_stack_no_aa_crash() local
1195 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 100, 100), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1196 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 50, 50), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1200 const GrReducedClip reduced(stack, bounds); in test_reduced_clip_stack_no_aa_crash()
1212 const SkClipStack& stack, const SkMatrix& queryXform, in test_aa_query() argument
1217 const GrReducedClip reduced(stack, queryBounds); in test_aa_query()
1221 stack.getBounds(&stackBounds, &stackBoundsType); in test_aa_query()
1295 SkClipStack stack; in test_reduced_clip_stack_aa() local
1296 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1297 test_aa_query(reporter, name, stack, m, {IL, IT, IR, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1298 test_aa_query(reporter, name, stack, m, {IL, IT-1, IR, IT}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1299 test_aa_query(reporter, name, stack, m, {IL, IT-2, IR, IB}, ClipMethod::kScissor); in test_reduced_clip_stack_aa()
1303 stack.reset(); in test_reduced_clip_stack_aa()
1304 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1305 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1306 test_aa_query(reporter, name, stack, m, {L-.1f, T, L, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1307 test_aa_query(reporter, name, stack, m, {L-.1f, T, L+.1f, B}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1311 stack.reset(); in test_reduced_clip_stack_aa()
1312 stack.clipRect(rect, SkMatrix::I(), kDifference_SkClipOp, true); in test_reduced_clip_stack_aa()
1313 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1314 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1315 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1319 stack.reset(); in test_reduced_clip_stack_aa()
1320 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1321 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1322 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1323 test_aa_query(reporter, name, stack, m, {r-.1f, t, R, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1324 test_aa_query(reporter, name, stack, m, {r-.1f, t, R+.1f, b}, ClipMethod::kAAElements, 2); in test_reduced_clip_stack_aa()
1325 test_aa_query(reporter, name, stack, m, {r, t, R+.1f, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1326 test_aa_query(reporter, name, stack, m, {r, t, R, b}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1327 test_aa_query(reporter, name, stack, m, {R, T, R+.1f, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1331 stack.reset(); in test_reduced_clip_stack_aa()
1332 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1333 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1334 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1335 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1336 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1337 test_aa_query(reporter, name, stack, m, {l, b, r, IB+.1f}, ClipMethod::kAAElements, 0); in test_reduced_clip_stack_aa()
1338 test_aa_query(reporter, name, stack, m, {l, b, r, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1339 test_aa_query(reporter, name, stack, m, {IL, IB, IR, IB+.1f}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1341 // Apply random transforms and try again. This ensures the clip stack reduction is hardened in test_reduced_clip_stack_aa()
1362 SkClipStack stack; in DEF_TEST() local
1364 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1365 assert_count(reporter, stack, 0); in DEF_TEST()
1374 stack.clipDevRect(gRects[i], kIntersect_SkClipOp); in DEF_TEST()
1378 SkClipStack::B2TIter iter(stack); in DEF_TEST()
1390 stack.reset(); in DEF_TEST()
1391 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1392 assert_count(reporter, stack, 0); in DEF_TEST()
1427 SkClipStack stack; in DEF_GPUTEST_FOR_ALL_CONTEXTS() local
1442 stack.save(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1443 stack.clipPath(path, m, SkClipOp::kIntersect, true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1444 sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1454 stack.restore(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()