• Home
  • Raw
  • Download

Lines Matching full:stack

32     // Build up a clip stack with a path, an empty clip, and a rect.  in test_assign_and_comparison()
124 static void assert_count(skiatest::Reporter* reporter, const SkClipStack& stack, in assert_count() argument
126 SkClipStack::B2TIter iter(stack); in assert_count()
137 SkClipStack stack; in test_iterators() local
148 stack.clipRect(gRects[i], SkMatrix::I(), kUnion_SkClipOp, false); in test_iterators()
151 assert_count(reporter, stack, 4); in test_iterators()
157 SkClipStack::B2TIter iter(stack); in test_iterators()
172 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in test_iterators()
187 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in test_iterators()
250 SkClipStack stack; in test_bounds() local
259 stack.save(); in test_bounds()
273 stack.clipRect(rectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
274 stack.clipRect(rectB, SkMatrix::I(), gOps[op], false); in test_bounds()
277 stack.clipRRect(rrectA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
278 stack.clipRRect(rrectB, SkMatrix::I(), gOps[op], false); in test_bounds()
281 stack.clipPath(pathA, SkMatrix::I(), kIntersect_SkClipOp, false); in test_bounds()
282 stack.clipPath(pathB, SkMatrix::I(), gOps[op], false); in test_bounds()
286 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_bounds()
287 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_bounds()
289 stack.getConservativeBounds(0, 0, 100, 100, &devClipBound, in test_bounds()
303 stack.restore(); in test_bounds()
311 // Empty stack is wide open. Wide open stack means that gen id is wide open. in test_isWideOpen()
312 SkClipStack stack; in test_isWideOpen() local
313 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
314 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
322 // Stack should initially be wide open in test_isWideOpen()
324 SkClipStack stack; in test_isWideOpen() local
326 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
327 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
332 SkClipStack stack; in test_isWideOpen() local
342 stack.clipPath(clipA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
343 stack.clipPath(clipB, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
345 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
346 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
351 SkClipStack stack; in test_isWideOpen() local
353 stack.clipRect(rectA, SkMatrix::I(), kUnion_SkClipOp, false); in test_isWideOpen()
355 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
356 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
361 SkClipStack stack; in test_isWideOpen() local
366 stack.clipRect(emptyRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_isWideOpen()
368 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
369 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
374 SkClipStack stack; in test_isWideOpen() local
376 stack.save(); in test_isWideOpen()
378 stack.clipRect(rectA, SkMatrix::I(), kReplace_SkClipOp, false); in test_isWideOpen()
380 REPORTER_ASSERT(reporter, !stack.isWideOpen()); in test_isWideOpen()
381 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID != stack.getTopmostGenID()); in test_isWideOpen()
383 stack.restore(); in test_isWideOpen()
385 REPORTER_ASSERT(reporter, stack.isWideOpen()); in test_isWideOpen()
386 REPORTER_ASSERT(reporter, SkClipStack::kWideOpenGenID == stack.getTopmostGenID()); in test_isWideOpen()
390 static int count(const SkClipStack& stack) { in count() argument
392 SkClipStack::Iter iter(stack, SkClipStack::Iter::kTop_IterStart); in count()
411 SkClipStack stack; in test_rect_inverse_fill() local
412 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_inverse_fill()
416 stack.getBounds(&bounds, &boundsType); in test_rect_inverse_fill()
430 // the stack depth. BW replacing BW. in test_rect_replace()
432 SkClipStack stack; in test_rect_replace() local
433 REPORTER_ASSERT(reporter, 0 == 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()
436 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
437 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
441 // the stack depth. AA replacing AA. in test_rect_replace()
443 SkClipStack stack; in test_rect_replace() local
444 REPORTER_ASSERT(reporter, 0 == 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()
447 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
448 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
452 // the stack depth. BW replacing AA replacing BW. in test_rect_replace()
454 SkClipStack stack; in test_rect_replace() local
455 REPORTER_ASSERT(reporter, 0 == count(stack)); in test_rect_replace()
456 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
457 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
458 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_replace()
459 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
460 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
461 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
466 SkClipStack stack; in test_rect_replace() local
467 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
468 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
469 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
471 stack.save(); in test_rect_replace()
472 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
473 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
474 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_replace()
476 stack.restore(); in test_rect_replace()
477 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
479 stack.save(); in test_rect_replace()
480 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
481 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
482 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
483 stack.restore(); in test_rect_replace()
484 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
486 stack.save(); in test_rect_replace()
487 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
488 stack.clipRect(rect2, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_replace()
489 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_replace()
490 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_replace()
491 stack.restore(); in test_rect_replace()
492 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_replace()
502 // Replace operation doesn't grow the stack. in test_path_replace()
504 SkClipStack stack; in test_path_replace() local
505 REPORTER_ASSERT(reporter, 0 == 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()
508 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, false); in test_path_replace()
509 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
514 SkClipStack stack; in test_path_replace() local
515 stack.clipRect(rect, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
516 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
517 stack.clipPath(path, SkMatrix::I(), kReplace_SkClipOp, true); in test_path_replace()
518 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_path_replace()
538 SkClipStack stack; in test_rect_merging() local
540 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
542 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
544 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
546 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
553 SkClipStack stack; in test_rect_merging() local
555 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
557 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
559 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
561 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
568 SkClipStack stack; in test_rect_merging() local
570 stack.clipRect(overlapLeft, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
572 stack.clipRect(overlapRight, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
574 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
576 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
583 SkClipStack stack; in test_rect_merging() local
585 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, true); in test_rect_merging()
587 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, false); in test_rect_merging()
589 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
591 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
598 SkClipStack stack; in test_rect_merging() local
600 stack.clipRect(nestedParent, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
602 stack.clipRect(nestedChild, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
604 REPORTER_ASSERT(reporter, 1 == count(stack)); in test_rect_merging()
606 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
613 SkClipStack stack; in test_rect_merging() local
615 stack.clipRect(nestedChild, SkMatrix::I(), kReplace_SkClipOp, false); in test_rect_merging()
617 stack.clipRect(nestedParent, SkMatrix::I(), kIntersect_SkClipOp, true); in test_rect_merging()
619 REPORTER_ASSERT(reporter, 2 == count(stack)); in test_rect_merging()
621 stack.getBounds(&bound, &type, &isIntersectionOfRects); in test_rect_merging()
644 SkClipStack stack; in test_quickContains() local
645 stack.clipRect(outsideRect, SkMatrix::I(), kDifference_SkClipOp, false); in test_quickContains()
647 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
652 SkClipStack stack; in test_quickContains() local
653 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
654 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
658 SkClipStack stack; in test_quickContains() local
659 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
660 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
661 stack.clipRect(outsideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
662 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
663 stack.restore(); in test_quickContains()
667 SkClipStack stack; in test_quickContains() local
668 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
669 stack.save(); // To prevent in-place substitution by replace OP in test_quickContains()
670 stack.clipRect(insideRect, SkMatrix::I(), kReplace_SkClipOp, false); in test_quickContains()
671 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
672 stack.restore(); in test_quickContains()
677 SkClipStack stack; in test_quickContains() local
678 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
680 stack.clipPath(outsideCircle, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
681 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
686 SkClipStack stack; in test_quickContains() local
687 stack.clipRect(outsideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
688 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
692 SkClipStack stack; in test_quickContains() local
693 stack.clipRect(insideRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
694 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
698 SkClipStack stack; in test_quickContains() local
699 stack.clipRect(intersectingRect, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
700 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
704 SkClipStack stack; in test_quickContains() local
705 stack.clipRect(nonIntersectingRect, 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.clipPath(outsideCircle, 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.clipPath(insideCircle, 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.clipPath(intersectingCircle, 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.clipPath(nonIntersectingCircle, 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
740 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
741 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
745 SkClipStack stack; in test_quickContains() local
749 stack.clipPath(path, 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
758 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
759 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, true == stack.quickContains(testRect)); in test_quickContains()
773 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
784 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
785 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
789 SkClipStack stack; in test_quickContains() local
792 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
793 REPORTER_ASSERT(reporter, false == stack.quickContains(testRect)); in test_quickContains()
797 SkClipStack stack; in test_quickContains() local
800 stack.clipPath(path, SkMatrix::I(), kIntersect_SkClipOp, false); in test_quickContains()
801 REPORTER_ASSERT(reporter, true == stack.quickContains(testRect)); in test_quickContains()
805 static void set_region_to_stack(const SkClipStack& stack, const SkIRect& bounds, SkRegion* region) { in set_region_to_stack() argument
807 SkClipStack::Iter iter(stack, SkClipStack::Iter::kBottom_IterStart); in set_region_to_stack()
827 SkClipStack stack; in test_invfill_diff_bug() local
828 stack.clipRect({10, 10, 20, 20}, SkMatrix::I(), kIntersect_SkClipOp, false); in test_invfill_diff_bug()
833 stack.clipPath(path, SkMatrix::I(), kDifference_SkClipOp, false); in test_invfill_diff_bug()
835 REPORTER_ASSERT(reporter, SkClipStack::kEmptyGenID == stack.getTopmostGenID()); in test_invfill_diff_bug()
839 stack.getBounds(&stackBounds, &stackBoundsType); in test_invfill_diff_bug()
845 set_region_to_stack(stack, {0, 0, 50, 30}, &region); in test_invfill_diff_bug()
853 // Functions that add a shape to the clip stack. The shape is computed from a rectangle.
854 // AA is always disabled since the clip stack reducer can cause changes in aa rasterization of the
855 // stack. A fractional edge repeated in different elements may be rasterized fewer times using the
856 // reduced stack.
860 SkClipStack* stack,
863 static void add_round_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_round_rect() argument
871 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_round_rect()
875 stack->clipRRect(rrect, SkMatrix::I(), op, doAA); in add_round_rect()
879 static void add_rect(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_rect() argument
885 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_rect()
887 stack->clipRect(rect, SkMatrix::I(), op, doAA); in add_rect()
891 static void add_oval(const SkRect& rect, bool invert, SkClipOp op, SkClipStack* stack, in add_oval() argument
898 stack->clipPath(path, SkMatrix::I(), op, doAA); in add_oval()
901 static void add_elem_to_stack(const SkClipStack::Element& element, SkClipStack* stack) { in add_elem_to_stack() argument
904 stack->clipRect(element.getRect(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
907 stack->clipRRect(element.getRRect(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
910 stack->clipPath(element.getPath(), SkMatrix::I(), element.getOp(), element.isAA()); in add_elem_to_stack()
914 stack->clipEmpty(); in add_elem_to_stack()
968 // Randomly generate a clip stack. in test_reduced_clip_stack()
969 SkClipStack stack; in test_reduced_clip_stack() local
981 // saves can change the clip stack behavior when an element is added. in test_reduced_clip_stack()
1008 kElementFuncs[r.nextULessThan(SK_ARRAY_COUNT(kElementFuncs))](rect, invert, op, &stack, in test_reduced_clip_stack()
1011 stack.save(); in test_reduced_clip_stack()
1021 // Get the reduced version of the stack. in test_reduced_clip_stack()
1024 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, queryBounds); in test_reduced_clip_stack()
1035 stack.getBounds(&stackBounds, &stackBoundsType); in test_reduced_clip_stack()
1038 // will be true since the stack bounds are completely contained inside the query. in test_reduced_clip_stack()
1046 // Build a new clip stack based on the reduced clip elements in test_reduced_clip_stack()
1060 stack.clipDevRect(ibounds, kIntersect_SkClipOp); in test_reduced_clip_stack()
1062 // convert both the original stack and reduced stack to SkRegions and see if they're equal in test_reduced_clip_stack()
1064 set_region_to_stack(stack, ibounds, &region); in test_reduced_clip_stack()
1083 SkClipStack stack; in test_reduced_clip_stack_genid() local
1084 stack.clipRect(SkRect::MakeXYWH(0, 0, 100, 100), SkMatrix::I(), kReplace_SkClipOp, in test_reduced_clip_stack_genid()
1086 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(50.3), SkScalar(50.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1093 const GrReducedClip* reduced = new (storage.get()) GrReducedClip(stack, bounds); in test_reduced_clip_stack_genid()
1102 SkClipStack stack; in test_reduced_clip_stack_genid() local
1108 stack.clipRect(SkRect::MakeXYWH(0, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1110 uint32_t genIDA = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1111 stack.clipRect(SkRect::MakeXYWH(50, 0, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1113 uint32_t genIDB = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1114 stack.clipRect(SkRect::MakeXYWH(0, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1116 uint32_t genIDC = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1117 stack.clipRect(SkRect::MakeXYWH(50, 50, SkScalar(25.3), SkScalar(25.3)), SkMatrix::I(), in test_reduced_clip_stack_genid()
1119 uint32_t genIDD = stack.getTopmostGenID(); in test_reduced_clip_stack_genid()
1178 const GrReducedClip reduced(stack, testCases[i].testBounds); in test_reduced_clip_stack_genid()
1196 SkClipStack stack; in test_reduced_clip_stack_no_aa_crash() local
1197 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 100, 100), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1198 stack.clipDevRect(SkIRect::MakeXYWH(0, 0, 50, 50), kReplace_SkClipOp); in test_reduced_clip_stack_no_aa_crash()
1202 const GrReducedClip reduced(stack, bounds); in test_reduced_clip_stack_no_aa_crash()
1214 const SkClipStack& stack, const SkMatrix& queryXform, in test_aa_query() argument
1219 const GrReducedClip reduced(stack, queryBounds); in test_aa_query()
1223 stack.getBounds(&stackBounds, &stackBoundsType); in test_aa_query()
1297 SkClipStack stack; in test_reduced_clip_stack_aa() local
1298 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1299 test_aa_query(reporter, name, stack, m, {IL, IT, IR, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1300 test_aa_query(reporter, name, stack, m, {IL, IT-1, IR, IT}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1301 test_aa_query(reporter, name, stack, m, {IL, IT-2, IR, IB}, ClipMethod::kScissor); in test_reduced_clip_stack_aa()
1305 stack.reset(); in test_reduced_clip_stack_aa()
1306 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1307 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1308 test_aa_query(reporter, name, stack, m, {L-.1f, T, L, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1309 test_aa_query(reporter, name, stack, m, {L-.1f, T, L+.1f, B}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1313 stack.reset(); in test_reduced_clip_stack_aa()
1314 stack.clipRect(rect, SkMatrix::I(), kDifference_SkClipOp, true); in test_reduced_clip_stack_aa()
1315 test_aa_query(reporter, name, stack, m, {L, T, R, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1316 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1317 test_aa_query(reporter, name, stack, m, {L, T-.1f, R, T+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1321 stack.reset(); in test_reduced_clip_stack_aa()
1322 stack.clipRect(rect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1323 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1324 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1325 test_aa_query(reporter, name, stack, m, {r-.1f, t, R, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1326 test_aa_query(reporter, name, stack, m, {r-.1f, t, R+.1f, b}, ClipMethod::kAAElements, 2); in test_reduced_clip_stack_aa()
1327 test_aa_query(reporter, name, stack, m, {r, t, R+.1f, b}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1328 test_aa_query(reporter, name, stack, m, {r, t, R, b}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1329 test_aa_query(reporter, name, stack, m, {R, T, R+.1f, B}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1333 stack.reset(); in test_reduced_clip_stack_aa()
1334 stack.clipRect(alignedRect, SkMatrix::I(), kIntersect_SkClipOp, true); in test_reduced_clip_stack_aa()
1335 stack.clipRect(innerRect, SkMatrix::I(), kXOR_SkClipOp, true); in test_reduced_clip_stack_aa()
1336 test_aa_query(reporter, name, stack, m, {l, t, r, b}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1337 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1338 test_aa_query(reporter, name, stack, m, {l, b-.1f, r, IB+.1f}, ClipMethod::kAAElements, 1); in test_reduced_clip_stack_aa()
1339 test_aa_query(reporter, name, stack, m, {l, b, r, IB+.1f}, ClipMethod::kAAElements, 0); in test_reduced_clip_stack_aa()
1340 test_aa_query(reporter, name, stack, m, {l, b, r, IB}, ClipMethod::kIgnoreClip); in test_reduced_clip_stack_aa()
1341 test_aa_query(reporter, name, stack, m, {IL, IB, IR, IB+.1f}, ClipMethod::kSkipDraw); in test_reduced_clip_stack_aa()
1343 // Apply random transforms and try again. This ensures the clip stack reduction is hardened in test_reduced_clip_stack_aa()
1377 for (const SkClipStack& stack : {rectStack, pathStack}) { in test_tiny_query_bounds_assertion_bug()
1382 const GrReducedClip reduced(stack, queryBounds); in test_tiny_query_bounds_assertion_bug()
1394 SkClipStack stack; in DEF_TEST() local
1396 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1397 assert_count(reporter, stack, 0); in DEF_TEST()
1406 stack.clipDevRect(gRects[i], kIntersect_SkClipOp); in DEF_TEST()
1410 SkClipStack::B2TIter iter(stack); in DEF_TEST()
1422 stack.reset(); in DEF_TEST()
1423 REPORTER_ASSERT(reporter, 0 == stack.getSaveCount()); in DEF_TEST()
1424 assert_count(reporter, stack, 0); in DEF_TEST()
1460 SkClipStack stack; in DEF_GPUTEST_FOR_ALL_CONTEXTS() local
1475 stack.save(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1476 stack.clipPath(path, m, SkClipOp::kIntersect, true); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1477 sk_sp<GrTextureProxy> mask = GrClipStackClip(&stack).testingOnly_createClipMask(context); in DEF_GPUTEST_FOR_ALL_CONTEXTS()
1488 stack.restore(); in DEF_GPUTEST_FOR_ALL_CONTEXTS()