Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/gpu/GrShape.h

Issue 1952383003: Incorporate scale into GrStyle and GrShape (Closed) Base URL: https://skia.googlesource.com/skia.git@fixapply
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrShape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrShape.h
diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h
index f4bd7e581a44ffc7b3a0f6dada7a01cc47db06cb..d72b17965ce4f4eb21e16237263307b19477b13f 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);
« no previous file with comments | « no previous file | src/gpu/GrShape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698