aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStyle.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-02 15:54:42 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-02 21:25:06 +0000
commit20aaaeebc10ce7f6b6114dd7a9420dfdb8dab8f9 (patch)
treea8ae6bc1fe72479ccd1da8c7a773c9e0cff6b46b /src/gpu/GrStyle.h
parentc89ac122ef3ec4dd23f33ef5384e9126c923d7c2 (diff)
Avoid initializing SkStrokeRect twice in GrStyle copy constructor.
Change-Id: If4c9c7b8fe0b9aa4b8b3b904c5ccf7ba014dd67b Reviewed-on: https://skia-review.googlesource.com/90381 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrStyle.h')
-rw-r--r--src/gpu/GrStyle.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
index a5599f9b1b..9f7f630a4f 100644
--- a/src/gpu/GrStyle.h
+++ b/src/gpu/GrStyle.h
@@ -81,7 +81,7 @@ public:
this->initPathEffect(std::move(pe));
}
- GrStyle(const GrStyle& that) : fStrokeRec(SkStrokeRec::kFill_InitStyle) { *this = that; }
+ GrStyle(const GrStyle& that) = default;
explicit GrStyle(const SkPaint& paint) : fStrokeRec(paint) {
this->initPathEffect(paint.refPathEffect());
@@ -187,6 +187,7 @@ private:
struct DashInfo {
DashInfo() : fType(SkPathEffect::kNone_DashType) {}
+ DashInfo(const DashInfo& that) { *this = that; }
DashInfo& operator=(const DashInfo& that) {
fType = that.fType;
fPhase = that.fPhase;