aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkStrokeRec.h
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2015-05-18 22:23:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-18 22:23:54 -0700
commitd156d36af871c23ce471a18764f4597f09cfca95 (patch)
tree6c8c8abd9795eea5b6725376f466f97770e29c1d /include/core/SkStrokeRec.h
parent72743b165424efc4ef6f6614add9033ea1ef31db (diff)
Make GrStrokeInfo inherit from SkStrokeRec
Make the code more readable by inheriting GrStrokeInfo from SkStrokeRec. This should avoid the long .getStrokeRec() and .getStrokeRecPtr(). These were a bit cumbersome especially in cases where an alias variable was created for these, and then the reader had to keep track to which StrokeInfo member the StrokeRec alias was pointing. Removes SkStrokeRec::SkStrokeRec(const SkStrokeRec&). It was memcpying. Try to play it safe wrt compiler using the possible padding of superclass for subclass members. Instead, let the compiler generate the copy constructor. Assignment operator was already compiler-generated, so at least in that way this is consistent. Renames GrStrokeInfo::applyDash to applyDashToPath for consistency with superclass applyToPath. Review URL: https://codereview.chromium.org/1128113008
Diffstat (limited to 'include/core/SkStrokeRec.h')
-rw-r--r--include/core/SkStrokeRec.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/core/SkStrokeRec.h b/include/core/SkStrokeRec.h
index b56dacb42c..50810f7324 100644
--- a/include/core/SkStrokeRec.h
+++ b/include/core/SkStrokeRec.h
@@ -19,8 +19,6 @@ public:
kFill_InitStyle
};
SkStrokeRec(InitStyle style);
-
- SkStrokeRec(const SkStrokeRec&);
SkStrokeRec(const SkPaint&, SkPaint::Style, SkScalar resScale = 1);
explicit SkStrokeRec(const SkPaint&, SkScalar resScale = 1);