Lines Matching refs:shape
40 static bool make_key(Key* key, const GrStyledShape& shape) {
41 int size = shape.unstyledKeySize();
48 shape.writeUnstyledKey(key->begin());
98 static bool can_interchange_winding_and_even_odd_fill(const GrStyledShape& shape) {
100 shape.asPath(&path);
101 if (shape.style().hasNonDashPathEffect()) {
104 const SkStrokeRec::Style strokeRecStyle = shape.style().strokeRec().getStyle();
107 (shape.style().isSimpleFill() && path.isConvex());
116 // for the shape without the path effect. If *both* have path effects then they should have both
249 // empty). If we started with a simple shape or a volatile path, our original path should have
259 // If the path effect produces a simple shape, then there are no unbroken chains to test
263 // From here on, we know that the path effect produced a shape that was a "real" path
280 void test_inversions(skiatest::Reporter* r, const GrStyledShape& shape, const Key& shapeKey) {
282 shape, GrStyledShape::FillInversion::kPreserve);
286 GrStyledShape flip = GrStyledShape::MakeFilled(shape, GrStyledShape::FillInversion::kFlip);
291 shape, GrStyledShape::FillInversion::kForceInverted);
296 shape, GrStyledShape::FillInversion::kForceNoninverted);
303 if (shape.style().isSimpleFill()) {
304 check_equivalence(r, shape, preserve, shapeKey, preserveKey);
306 if (shape.inverseFilled()) {
318 // original shape has an inherited style key. That gets dropped on the first inversion flip.
537 TestCase(const GrStyledShape& shape, skiatest::Reporter* r, SkScalar scale = SK_Scalar1)
538 : fBase(new GrStyledShape(shape)) {
563 // The returned array's count will be 0 if the key shape has no key.
570 static void CheckBounds(skiatest::Reporter* r, const GrStyledShape& shape,
573 shape.asPath(&path);
925 // Scale affects the stroke, but check to make sure this didn't become a simpler shape (e.g.
1030 GrStyledShape shape = geo.makeShape(hairline);
1032 bool affectsStroke = !shape.knownToBeClosed();
1044 static bool shape_known_not_to_have_joins(const GrStyledShape& shape) {
1045 return shape.asLine(nullptr, nullptr) || shape.isEmpty();
1052 GrStyledShape shape = geo.makeShape(hairline);
1057 bool affectsStroke = !shape_known_not_to_have_joins(shape);
1080 GrStyledShape shape = geo.makeShape(hairline);
1081 bool mayHaveJoins = !shape_known_not_to_have_joins(shape);
1201 // Check whether constructing the filled case would cause the base shape to have a different
1220 // Applying the path effect should make a SkRRect shape. There is no further stroking in the
1277 // a styled result with a key is to produce a non-path shape that has a purely geometric key.
1333 // The base shape cannot perform canonicalization on the path's fill type because of an
1335 // shape will canonicalize the path fill type since hairlines (and stroking in general)
1359 // We expect a shape made from a volatile path to have a key iff the shape is recognized
1503 // for at least two reasons: 1) We will initially treat the shape as unkeyable because of the
1584 // A shape made from an empty rrect should behave the same as an empty path when filled and
1585 // when stroked. The shape is closed so it does not produce caps when stroked. When dashed there
1698 // Get the keys for some example shape instances that we'll use for comparision against the
2312 // Test that swapping starting and ending angle doesn't change the shape unless the arc