| Index: src/gpu/GrShape.h
|
| diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h
|
| index efc28cf73719718289e670a6a279ebc23555ac61..f4bd7e581a44ffc7b3a0f6dada7a01cc47db06cb 100644
|
| --- a/src/gpu/GrShape.h
|
| +++ b/src/gpu/GrShape.h
|
| @@ -120,6 +120,9 @@ public:
|
|
|
| void asPath(SkPath* out) const {
|
| switch (fType) {
|
| + case Type::kEmpty:
|
| + out->reset();
|
| + break;
|
| case Type::kRRect:
|
| out->reset();
|
| out->addRRect(fRRect);
|
| @@ -127,10 +130,23 @@ public:
|
| case Type::kPath:
|
| *out = *fPath.get();
|
| break;
|
| + }
|
| + }
|
| +
|
| + /**
|
| + * Is it known that the shape has no unclosed contours. This means that it will not have
|
| + * any caps if stroked (modulo the effect of any path effect).
|
| + */
|
| + bool knownToBeClosed() const {
|
| + switch (fType) {
|
| case Type::kEmpty:
|
| - out->reset();
|
| - break;
|
| + return true;
|
| + case Type::kRRect:
|
| + return true;
|
| + case Type::kPath:
|
| + return false;
|
| }
|
| + return false;
|
| }
|
|
|
| /**
|
|
|