diff options
author | Brian Salomon <bsalomon@google.com> | 2018-01-02 15:54:42 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-02 21:25:06 +0000 |
commit | 20aaaeebc10ce7f6b6114dd7a9420dfdb8dab8f9 (patch) | |
tree | a8ae6bc1fe72479ccd1da8c7a773c9e0cff6b46b /src/gpu/GrStyle.h | |
parent | c89ac122ef3ec4dd23f33ef5384e9126c923d7c2 (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.h | 3 |
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; |