aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStyle.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-06-24 10:42:16 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-24 10:42:16 -0700
commit8acedde5970ce70de6d9791ffeda87a65af4ed07 (patch)
tree98c806fb10afa72890eaf0f1cbdf63bfe9feda63 /src/gpu/GrStyle.h
parentc2fde8b2272cf80c79414e01451689ffd971b348 (diff)
Use GrShape in GrPathRenderer.
Diffstat (limited to 'src/gpu/GrStyle.h')
-rw-r--r--src/gpu/GrStyle.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
index 326f800442..478564f3f9 100644
--- a/src/gpu/GrStyle.h
+++ b/src/gpu/GrStyle.h
@@ -113,6 +113,13 @@ public:
/** Is this style a hairline with no path effect? */
bool isSimpleHairline() const { return fStrokeRec.isHairlineStyle() && !fPathEffect; }
+ bool couldBeHairline() const {
+ // If the original stroke rec has hairline style then either a null or dash patheffect
+ // would preserve the hairline status. An arbitrary path effect could introduce hairline
+ // style.
+ return this->strokeRec().isHairlineStyle() || this->hasNonDashPathEffect();
+ }
+
SkPathEffect* pathEffect() const { return fPathEffect.get(); }
bool hasPathEffect() const { return SkToBool(fPathEffect.get()); }