Lines Matching refs:fShape
15 fShape = that.fShape; in operator =()
46 bool newIsInverted = is_inverted(original.fShape.inverted(), inversion); in MakeFilled()
47 if (original.style().isSimpleFill() && newIsInverted == original.fShape.inverted()) { in MakeFilled()
58 result.fShape = original.fShape; in MakeFilled()
60 result.fShape.setInverted(newIsInverted); in MakeFilled()
74 SkASSERT((!original.fShape.isLine() && !original.fShape.isPoint()) || result.fShape.isEmpty()); in MakeFilled()
139 switch(fShape.type()) { in unstyledKeySize()
164 int dataKeySize = path_key_from_data_size(fShape.path()); in unstyledKeySize()
173 SkASSERT(fShape.isEmpty()); in unstyledKeySize()
188 SkASSERT((fShape.isRect() || fShape.isRRect()) || in writeUnstyledKey()
189 (fShape.dir() == GrShape::kDefaultDir && in writeUnstyledKey()
190 fShape.startIndex() == GrShape::kDefaultStart)); in writeUnstyledKey()
194 *key++ = fShape.stateKey(); in writeUnstyledKey()
196 switch(fShape.type()) { in writeUnstyledKey()
200 SkASSERT(fShape.inverted() == fShape.path().isInverseFillType()); in writeUnstyledKey()
202 int dataKeySize = path_key_from_data_size(fShape.path()); in writeUnstyledKey()
204 write_path_key_from_data(fShape.path(), key); in writeUnstyledKey()
211 memcpy(key, &fShape.point(), sizeof(SkPoint)); in writeUnstyledKey()
215 memcpy(key, &fShape.rect(), sizeof(SkRect)); in writeUnstyledKey()
219 fShape.rrect().writeToMemory(key); in writeUnstyledKey()
224 memcpy(key, &fShape.arc(), sizeof(SkRect) + 2 * sizeof(float)); in writeUnstyledKey()
227 *key++ = fShape.arc().fUseCenter ? 1 : 0; in writeUnstyledKey()
230 memcpy(key, &fShape.line(), sizeof(GrLineSegment)); in writeUnstyledKey()
235 SkASSERT(fShape.isEmpty()); in writeUnstyledKey()
245 if (fShape.isPath()) { in setInheritedKey()
294 } else if (fShape.isPath() && !fShape.path().isVolatile()) { in originalPathForListeners()
295 return &fShape.path(); in originalPathForListeners()
310 result.fShape.setArc({oval.makeSorted(), startAngleDegrees, sweepAngleDegrees, useCenter}); in MakeArc()
319 : fShape(that.fShape) in GrStyledShape()
348 fShape.setPath(SkPath()); in GrStyledShape()
352 if (parent.fShape.isPath()) { in GrStyledShape()
353 srcForPathEffect = &parent.fShape.path(); in GrStyledShape()
361 if (!parent.fStyle.applyPathEffectToPath(&fShape.path(), &strokeRec, *srcForPathEffect, in GrStyledShape()
378 tmpParent.init(fShape.path(), GrStyle(strokeRec, nullptr)); in GrStyledShape()
387 SkAssertResult(tmpParent.get()->style().applyToPath(&fShape.path(), &fillOrHairline, in GrStyledShape()
402 if (parent.fShape.isPath()) { in GrStyledShape()
403 srcForParentStyle = &parent.fShape.path(); in GrStyledShape()
411 SkAssertResult(parent.fStyle.applyToPath(&fShape.path(), &fillOrHairline, in GrStyledShape()
418 } else if (parent.fShape.isPath() && !parent.fShape.path().isVolatile()) { in GrStyledShape()
419 fInheritedPathForListeners.set(parent.fShape.path()); in GrStyledShape()
427 if (!fShape.isRRect() && !fShape.isRect()) { in asRRect()
433 SkASSERT(fStyle.hasPathEffect() || (fShape.dir() == GrShape::kDefaultDir && in asRRect()
434 fShape.startIndex() == GrShape::kDefaultStart)); in asRRect()
438 if (fShape.isRect()) { in asRRect()
440 *rrect = SkRRect::MakeRect(fShape.rect()); in asRRect()
454 SkPathDirection rectDir = fShape.dir(); in asRRect()
455 unsigned rectStart = fShape.startIndex(); in asRRect()
457 if (fShape.rect().fLeft > fShape.rect().fRight) { in asRRect()
464 if (fShape.rect().fTop > fShape.rect().fBottom) { in asRRect()
485 *rrect = fShape.rrect(); in asRRect()
488 *dir = fShape.dir(); in asRRect()
491 *start = fShape.startIndex(); in asRRect()
494 if (fShape.rrect().isOval()) { in asRRect()
501 *inverted = fShape.inverted(); in asRRect()
508 if (!fShape.isLine()) { in asLine()
513 pts[0] = fShape.line().fP1; in asLine()
514 pts[1] = fShape.line().fP2; in asLine()
517 *inverted = fShape.inverted(); in asLine()
523 if (!fShape.isPath()) { in asNestedRects()
529 if (fShape.path().isInverseFillType()) { in asNestedRects()
534 if (!SkPathPriv::IsNestedFillRects(fShape.path(), rects, dirs)) { in asNestedRects()
538 if (SkPathFillType::kWinding == fShape.path().getFillType() && dirs[0] == dirs[1]) { in asNestedRects()
570 : fShape(shape), fInverted(!style.isDashed() && fShape->inverted()) {} in AutoRestoreInverseness()
574 fShape->setInverted(fInverted); in ~AutoRestoreInverseness()
575 SkASSERT(!fShape->isPath() || fInverted == fShape->path().isInverseFillType()); in ~AutoRestoreInverseness()
579 GrShape* fShape; member in AutoRestoreInverseness
584 AutoRestoreInverseness ari(&fShape, fStyle); in simplify()
591 if (!fShape.isArc() || fStyle.strokeRec().getCap() == SkPaint::kButt_Cap) { in simplify()
599 GrShape::Type oldType = fShape.type(); in simplify()
600 fClosed = fShape.simplify(simplifyFlags); in simplify()
601 fSimplified = oldType != fShape.type(); in simplify()
603 if (fShape.isPath()) { in simplify()
605 if (fInheritedKey.count() || fShape.path().isVolatile()) { in simplify()
608 fGenID = fShape.path().getGenerationID(); in simplify()
613 fShape.path().isConvex())) { in simplify()
617 fShape.path().setFillType(GrShape::kDefaultFillType); in simplify()
631 AutoRestoreInverseness ari(&fShape, fStyle); in simplifyStroke()
635 if (!fStyle.hasPathEffect() && fShape.isRect() && in simplifyStroke()
645 fShape.rect().outset(r, r); in simplifyStroke()
649 fShape.setRRect(SkRRect::MakeRectXY(fShape.rect(), r, r)); in simplifyStroke()
658 if ((!fShape.isPoint() && !fShape.isLine()) || fStyle.hasNonDashPathEffect() || in simplifyStroke()
669 if (fShape.isPoint()) { in simplifyStroke()
698 fShape.reset(); in simplifyStroke()
714 if (fShape.isLine() && fStyle.strokeRec().getJoin() == SkPaint::kRound_Join) { in simplifyStroke()
719 } else if (fShape.isPoint() && fStyle.strokeRec().getJoin() == SkPaint::kMiter_Join && in simplifyStroke()
745 if (fShape.isPoint()) { in simplifyStroke()
749 fShape.reset(); in simplifyStroke()
752 SkRect r = {fShape.point().fX, fShape.point().fY, fShape.point().fX, fShape.point().fY}; in simplifyStroke()
756 fShape.setRRect(SkRRect::MakeOval(r)); in simplifyStroke()
758 fShape.setRect(r); in simplifyStroke()
766 if (fShape.line().fP1.fY == fShape.line().fP2.fY) { in simplifyStroke()
767 rect.fLeft = std::min(fShape.line().fP1.fX, fShape.line().fP2.fX); in simplifyStroke()
768 rect.fRight = std::max(fShape.line().fP1.fX, fShape.line().fP2.fX); in simplifyStroke()
769 rect.fTop = rect.fBottom = fShape.line().fP1.fY; in simplifyStroke()
772 } else if (fShape.line().fP1.fX == fShape.line().fP2.fX) { in simplifyStroke()
773 rect.fTop = std::min(fShape.line().fP1.fY, fShape.line().fP2.fY); in simplifyStroke()
774 rect.fBottom = std::max(fShape.line().fP1.fY, fShape.line().fP2.fY); in simplifyStroke()
775 rect.fLeft = rect.fRight = fShape.line().fP1.fX; in simplifyStroke()
786 fShape.reset(); in simplifyStroke()
789 fShape.setRRect(SkRRect::MakeRectXY(rect, outset.fX, outset.fY)); in simplifyStroke()
791 fShape.setRect(rect); in simplifyStroke()