| Index: src/gpu/GrStyle.h
|
| diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
|
| index 6166b56fb707eafffcc013b160b71dc0c1478247..07efb40866b91df4f9fbbfd9bef3763c0712d3e2 100644
|
| --- a/src/gpu/GrStyle.h
|
| +++ b/src/gpu/GrStyle.h
|
| @@ -85,6 +85,11 @@ public:
|
| this->initPathEffect(paint.getPathEffect());
|
| }
|
|
|
| + explicit GrStyle(const SkPaint& paint, SkPaint::Style overrideStyle)
|
| + : fStrokeRec(paint, overrideStyle) {
|
| + this->initPathEffect(paint.getPathEffect());
|
| + }
|
| +
|
| GrStyle& operator=(const GrStyle& that) {
|
| fPathEffect = that.fPathEffect;
|
| fDashInfo = that.fDashInfo;
|
| @@ -133,6 +138,12 @@ public:
|
| return this->pathEffect() || (!fStrokeRec.isFillStyle() && !fStrokeRec.isHairlineStyle());
|
| }
|
|
|
| + static SkScalar MatrixToScaleFactor(const SkMatrix& matrix) {
|
| + // getMaxScale will return -1 if the matrix has perspective. In that case we can use a scale
|
| + // factor of 1. This isn't necessarily a good choice and in the future we might consider
|
| + // taking a bounds here for the perspective case.
|
| + return SkScalarAbs(matrix.getMaxScale());
|
| + }
|
| /**
|
| * Applies just the path effect and returns remaining stroke information. This will fail if
|
| * there is no path effect. dst may or may not have been overwritten on failure. Scale controls
|
|
|