• Home
  • Raw
  • Download

Lines Matching full:stack

54     // Build up a clip stack with a path, an empty clip, and a rect.  in test_assign_and_comparison()
146 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack, in assert_count() argument
148 SkClipStack::B2TIter iter(stack); in assert_count()
159 SkClipStack stack; in test_iterators() local
170 stack.clipRect(gRects[i], SkMatrix::I(), kUnion_SkClipOp, false); in test_iterators()
173 assert_count(reporter, stack, 4); in test_iterators()
179 SkClipStack::B2TIter iter(stack); in test_iterators()
195 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in test_iterators()
211 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in test_iterators()
276 SkClipStack stack; in test_bounds() local
285 stack.save(); in test_bounds()
299 stack.clipRect(rectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
300 stack.clipRect(rectB, SkMatrix::I(), gOps[op], false); in test_bounds()
303 stack.clipRRect(rrectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
304 stack.clipRRect(rrectB, SkMatrix::I(), gOps[op], false); in test_bounds()
307 stack.clipPath(pathA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
308 stack.clipPath(pathB, SkMatrix::I(), gOps[op], false); in test_bounds()
312 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_bounds()
313 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_bounds()
315 stack.getConservativeBounds(0, 0, 100, 100, &devClipBound, in test_bounds()
329 stack.restore(); in test_bounds()
337 // Empty stack is wide open. Wide open stack means that gen id is wide open. in test_isWideOpen()
338 SkClipStack stack; in test_isWideOpen() local
339 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
340 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
348 // Stack should initially be wide open in test_isWideOpen()
350 SkClipStack stack; in test_isWideOpen() local
352 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
353 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
358 SkClipStack stack; in test_isWideOpen() local
368 stack.clipPath(clipA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
369 stack.clipPath(clipB, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
371 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
372 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
377 SkClipStack stack; in test_isWideOpen() local
379 stack.clipRect(rectA, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
381 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
382 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
387 SkClipStack stack; in test_isWideOpen() local
392 stack.clipRect(emptyRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_isWideOpen()
394 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
395 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
400 SkClipStack stack; in test_isWideOpen() local
402 stack.save(); in test_isWideOpen()
404 stack.clipRect(rectA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
406 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_isWideOpen()
407 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_isWideOpen()
409 stack.restore(); in test_isWideOpen()
411 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
412 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
416 static int count(const SkClipStack& stack) { in count() argument
418 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in count()
436 SkClipStack stack; in test_rect_inverse_fill() local
437 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_inverse_fill()
441 stack.getBounds(&bounds, &boundsType); in test_rect_inverse_fill()
455 // the stack depth. BW replacing BW. in test_rect_replace()
457 SkClipStack stack; in test_rect_replace() local
458 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
459 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
460 REPORTER_ASSERT(reporter, 1 == 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()
466 // the stack depth. AA replacing AA. in test_rect_replace()
468 SkClipStack stack; in test_rect_replace() local
469 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
470 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
471 REPORTER_ASSERT(reporter, 1 == 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()
477 // the stack depth. BW replacing AA replacing BW. in test_rect_replace()
479 SkClipStack stack; in test_rect_replace() local
480 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
481 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
482 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
483 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
484 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
485 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
486 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
491 SkClipStack stack; in test_rect_replace() local
492 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
493 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
494 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
496 stack.save(); in test_rect_replace()
497 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
498 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
499 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_replace()
501 stack.restore(); in test_rect_replace()
502 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
504 stack.save(); in test_rect_replace()
505 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
506 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
507 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
508 stack.restore(); in test_rect_replace()
509 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
511 stack.save(); in test_rect_replace()
512 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
513 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
514 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
515 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
516 stack.restore(); in test_rect_replace()
517 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
527 // Replace operation doesn't grow the stack. in test_path_replace()
529 SkClipStack stack; in test_path_replace() local
530 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_path_replace()
531 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
532 REPORTER_ASSERT(reporter, 1 == 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()
539 SkClipStack stack; in test_path_replace() local
540 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
541 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
542 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
543 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
563 SkClipStack stack; in test_rect_merging() local
565 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
567 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
569 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
571 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
578 SkClipStack stack; in test_rect_merging() local
580 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
582 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
584 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
586 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
593 SkClipStack stack; in test_rect_merging() local
595 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
597 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
599 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
601 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
608 SkClipStack stack; in test_rect_merging() local
610 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
612 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
614 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
616 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
623 SkClipStack stack; in test_rect_merging() local
625 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
627 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
629 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
631 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
638 SkClipStack stack; in test_rect_merging() local
640 stack.clipRect(nestedChild, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
642 stack.clipRect(nestedParent, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
644 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
646 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
669 SkClipStack stack; in test_quickContains() local
670 stack.clipRect(outsideRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_quickContains()
672 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
677 SkClipStack stack; in test_quickContains() local
678 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
679 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
683 SkClipStack stack; in test_quickContains() local
684 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
685 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
686 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
687 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
688 stack.restore(); in test_quickContains()
692 SkClipStack stack; in test_quickContains() local
693 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
694 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
695 stack.clipRect(insideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
696 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
697 stack.restore(); in test_quickContains()
702 SkClipStack stack; in test_quickContains() local
703 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
705 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
706 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
711 SkClipStack stack; in test_quickContains() local
712 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
713 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
717 SkClipStack stack; in test_quickContains() local
718 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
719 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
723 SkClipStack stack; in test_quickContains() local
724 stack.clipRect(intersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
725 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
729 SkClipStack stack; in test_quickContains() local
730 stack.clipRect(nonIntersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
731 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
736 SkClipStack stack; in test_quickContains() local
737 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
738 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
742 SkClipStack stack; in test_quickContains() local
743 stack.clipPath(insideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
744 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
748 SkClipStack stack; in test_quickContains() local
749 stack.clipPath(intersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
750 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
754 SkClipStack stack; in test_quickContains() local
755 stack.clipPath(nonIntersectingCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
756 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, false == stack.quickContains(testRect)); in test_quickContains()
770 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
783 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
784 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
788 SkClipStack stack; in test_quickContains() local
792 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
793 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
798 SkClipStack stack; in test_quickContains() local
801 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
802 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
806 SkClipStack stack; in test_quickContains() local
809 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
810 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
814 SkClipStack stack; in test_quickContains() local
817 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
818 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
822 SkClipStack stack; in test_quickContains() local
825 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
826 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
830 static void set_region_to_stack(const SkClipStack& stack, const SkIRect& bounds, SkRegion* region) { in set_region_to_stack() argument
832 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in set_region_to_stack()
852 SkClipStack stack; in test_invfill_diff_bug() local
853 stack.clipRect({10, 10, 20, 20}, SkMatrix::I(), kIntersect_SkClipOp, false); in test_invfill_diff_bug()
858 stack.clipPath(path, SkMatrix::I(), kDifference_SkClipOp, false); in test_invfill_diff_bug()
860 REPORTER_ASSERT(reporter, SkClipStack::kEmptyGenID == stack.getTopmostGenID()); in test_invfill_diff_bug()
864 stack.getBounds(&stackBounds, &stackBoundsType); in test_invfill_diff_bug()
870 set_region_to_stack(stack, {0, 0, 50, 30}, &region); in test_invfill_diff_bug()
877 // Functions that add a shape to the clip stack. The shape is computed from a rectangle.
878 // AA is always disabled since the clip stack reducer can cause changes in aa rasterization of the
879 // stack. A fractional edge repeated in different elements may be rasterized fewer times using the
880 // reduced stack.
884 SkClipStack* stack,
887 static void add_round_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_round_rect() argument
895 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_round_rect()
899 stack->clipRRect(rrect, SkMatrix::I(), op, doAA); in add_round_rect()
903 static void add_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_rect() argument
909 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_rect()
911 stack->clipRect(rect, SkMatrix::I(), op, doAA); in add_rect()
915 static void add_oval(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_oval() argument
922 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_oval()
925 static void add_elem_to_stack(const SkClipStack::Element& element, SkClipStack* stack) { in add_elem_to_stack() argument
928 stack->clipRect(element.getDeviceSpaceRect(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
932 stack->clipRRect(element.getDeviceSpaceRRect(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
936 stack->clipPath(element.getDeviceSpacePath(), SkMatrix::I(), element.getOp(), in add_elem_to_stack()
941 stack->clipEmpty(); in add_elem_to_stack()
995 // Randomly generate a clip stack. in test_reduced_clip_stack()
996 SkClipStack stack; in test_reduced_clip_stack() local
1008 // saves can change the clip stack behavior when an element is added. in test_reduced_clip_stack()
1035 kElementFuncs[r.nextULessThan(SK_ARRAY_COUNT(kElementFuncs))](rect, invert, op, &stack, in test_reduced_clip_stack()
1038 stack.save(); in test_reduced_clip_stack()
1051 // Get the reduced version of the stack. in test_reduced_clip_stack()
1054 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, queryBounds, caps); in test_reduced_clip_stack()
1065 stack.getBounds(&stackBounds, &stackBoundsType); in test_reduced_clip_stack()
1069 // Build a new clip stack based on the reduced clip elements in test_reduced_clip_stack()
1083 stack.clipDevRect(scissor, kIntersect_SkClipOp); in test_reduced_clip_stack()
1085 // convert both the original stack and reduced stack to SkRegions and see if they're equal in test_reduced_clip_stack()
1087 set_region_to_stack(stack, scissor, &region); in test_reduced_clip_stack()
1106 SkClipStack stack; in test_reduced_clip_stack_genid() local
1107 stack.clipRect(SkRect::MakeXYWH(0, 0, 100, 100), SkMatrix::I(), kReplace_SkClipOp, in test_reduced_clip_stack_genid()
1109 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(50.3), SkScalar(50.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1119 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, bounds, caps); in test_reduced_clip_stack_genid()
1128 SkClipStack stack; in test_reduced_clip_stack_genid() local
1134 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1136 uint32_t genIDA = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1137 stack.clipRect(SkRect::MakeXYWH(50, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1139 uint32_t genIDB = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1140 stack.clipRect(SkRect::MakeXYWH(0, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1142 uint32_t genIDC = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1143 stack.clipRect(SkRect::MakeXYWH(50, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1145 uint32_t genIDD = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1206 const GrReducedClip reduced(stack, testCases[i].testBounds, caps); in test_reduced_clip_stack_genid()
1225 SkClipStack stack; in test_reduced_clip_stack_no_aa_crash() local
1226 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 100, 100), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1227 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 50, 50), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1234 const GrReducedClip reduced(stack, bounds, caps); in test_reduced_clip_stack_no_aa_crash()
1246 const SkClipStack& stack, const SkMatrix& queryXform, in test_aa_query() argument
1254 const GrReducedClip reduced(stack, queryBounds, caps); in test_aa_query()
1258 stack.getBounds(&stackBounds, &stackBoundsType); in test_aa_query()
1331 SkClipStack stack; in test_reduced_clip_stack_aa() local
1332 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1333 test_aa_query(reporter, name, stack, m, {IL, IT, IR, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1334 test_aa_query(reporter, name, stack, m, {IL, IT-1, IR, IT}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1335 test_aa_query(reporter, name, stack, m, {IL, IT-2, IR, IB}, ClipMethod::kScissor); in test_reduced_clip_stack_aa()
1339 stack.reset(); in test_reduced_clip_stack_aa()
1340 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1341 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1342 test_aa_query(reporter, name, stack, m, {L-.1f, T, L, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1343 test_aa_query(reporter, name, stack, m, {L-.1f, T, L+.1f, B}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1347 stack.reset(); in test_reduced_clip_stack_aa()
1348 stack.clipRect(rect, SkMatrix::I(), kDifference_SkClipOp, true); in test_reduced_clip_stack_aa()
1349 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1350 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1351 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1355 stack.reset(); in test_reduced_clip_stack_aa()
1356 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1357 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1358 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1359 test_aa_query(reporter, name, stack, m, {r-.1f, t, R, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1360 test_aa_query(reporter, name, stack, m, {r-.1f, t, R+.1f, b}, ClipMethod::kAAElements, 2); in test_reduced_clip_stack_aa()
1361 test_aa_query(reporter, name, stack, m, {r, t, R+.1f, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1362 test_aa_query(reporter, name, stack, m, {r, t, R, b}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1363 test_aa_query(reporter, name, stack, m, {R, T, R+.1f, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1367 stack.reset(); in test_reduced_clip_stack_aa()
1368 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1369 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1370 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1371 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1372 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1373 test_aa_query(reporter, name, stack, m, {l, b, r, IB+.1f}, ClipMethod::kAAElements, 0); in test_reduced_clip_stack_aa()
1374 test_aa_query(reporter, name, stack, m, {l, b, r, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1375 test_aa_query(reporter, name, stack, m, {IL, IB, IR, IB+.1f}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1377 // Apply random transforms and try again. This ensures the clip stack reduction is hardened in test_reduced_clip_stack_aa()
1414 for (const SkClipStack& stack : {rectStack, pathStack}) { in test_tiny_query_bounds_assertion_bug()
1419 const GrReducedClip reduced(stack, queryBounds, caps); in test_tiny_query_bounds_assertion_bug()
1432 SkClipStack stack; in test_is_rrect_deep_rect_stack() local
1434 stack.save(); in test_is_rrect_deep_rect_stack()
1435 stack.clipRect(SkRect::MakeLTRB(i, 0.5, kTargetBounds.width(), kTargetBounds.height()), in test_is_rrect_deep_rect_stack()
1442 if (stack.isRRect(kTargetBounds, &rrect, &isAA)) { in test_is_rrect_deep_rect_stack()
1450 SkClipStack stack; in test_is_rrect_deep_rect_stack() local
1454 stack.save(); in test_is_rrect_deep_rect_stack()
1455 stack.clipRect(SkRect::MakeLTRB(i, j + 0.5, kTargetBounds.width(), kTargetBounds.height()), in test_is_rrect_deep_rect_stack()
1460 REPORTER_ASSERT(reporter, !stack.isRRect(kTargetBounds, &rrect, &isAA)); in test_is_rrect_deep_rect_stack()
1464 SkClipStack stack; in DEF_TEST() local
1466 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1467 assert_count(reporter, stack, 0); in DEF_TEST()
1476 stack.clipDevRect(gRects[i], kIntersect_SkClipOp); in DEF_TEST()
1480 SkClipStack::B2TIter iter(stack); in DEF_TEST()
1493 stack.reset(); in DEF_TEST()
1494 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1495 assert_count(reporter, stack, 0); in DEF_TEST()
1530 SkClipStack stack; in DEF_GPUTEST_FOR_ALL_CONTEXTS() local
1545 stack.save(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1546 stack.clipPath(path, m, SkClipOp::kIntersect, true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1547 sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1558 stack.restore(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()