aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShape.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-09 13:02:01 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-09 13:02:01 -0700
commit97fd2d42b97104fa32a58d7e7a5b7255913f9c9d (patch)
treef1984297182430bf5b706e6514d21c20b37d4db7 /src/gpu/GrShape.h
parent1b4c01c66081cd163535eab21b29a3996b01a6cf (diff)
Incorporate scale into GrStyle and GrShape
Diffstat (limited to 'src/gpu/GrShape.h')
-rw-r--r--src/gpu/GrShape.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h
index f4bd7e581a..d72b17965c 100644
--- a/src/gpu/GrShape.h
+++ b/src/gpu/GrShape.h
@@ -106,7 +106,14 @@ public:
const GrStyle& style() const { return fStyle; }
- GrShape applyStyle(GrStyle::Apply apply) { return GrShape(*this, apply); }
+ /**
+ * Returns a shape that has either applied the path effect or path effect and stroking
+ * information from this shape's style to its geometry. Scale is used when approximating the
+ * output geometry and typically is computed from the view matrix
+ */
+ GrShape applyStyle(GrStyle::Apply apply, SkScalar scale) {
+ return GrShape(*this, apply, scale);
+ }
bool asRRect(SkRRect* rrect) const {
if (Type::kRRect != fType) {
@@ -170,14 +177,14 @@ private:
};
- /** Constructor used by Apply* functions */
- GrShape(const GrShape& parentShape, GrStyle::Apply);
+ /** Constructor used by the applyStyle() function */
+ GrShape(const GrShape& parentShape, GrStyle::Apply, SkScalar scale);
/**
* Determines the key we should inherit from the input shape's geometry and style when
* we are applying the style to create a new shape.
*/
- void setInheritedKey(const GrShape& parentShape, GrStyle::Apply);
+ void setInheritedKey(const GrShape& parentShape, GrStyle::Apply, SkScalar scale);
void attemptToReduceFromPath() {
SkASSERT(Type::kPath == fType);