aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStyle.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-05-03 09:31:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-03 09:31:44 -0700
commit46db22f1cfc65a7a4f1de13d774718347362f60f (patch)
tree3aa44cd02366d1ebfad6b34df1e682d35d182504 /src/gpu/GrStyle.h
parent92605b35efa0155c44d24bd8415b4cc1db8831db (diff)
Make GrStyle more sk_sp savy
Diffstat (limited to 'src/gpu/GrStyle.h')
-rw-r--r--src/gpu/GrStyle.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
index 4eef252de4..62165bf311 100644
--- a/src/gpu/GrStyle.h
+++ b/src/gpu/GrStyle.h
@@ -29,9 +29,9 @@ public:
fDashInfo.fType = SkPathEffect::kNone_DashType;
}
- GrStyle(const SkStrokeRec& strokeRec, SkPathEffect* pe) : fStrokeRec(strokeRec) {
+ GrStyle(const SkStrokeRec& strokeRec, sk_sp<SkPathEffect> pe) : fStrokeRec(strokeRec) {
SkASSERT(SkStrokeRec::kStrokeAndFill_Style != strokeRec.getStyle());
- this->initPathEffect(pe);
+ this->initPathEffect(std::move(pe));
}
GrStyle(const GrStyle& that) : fStrokeRec(SkStrokeRec::kFill_InitStyle) {
@@ -40,7 +40,7 @@ public:
explicit GrStyle(const SkPaint& paint) : fStrokeRec(paint) {
SkASSERT(SkStrokeRec::kStrokeAndFill_Style != fStrokeRec.getStyle());
- this->initPathEffect(paint.getPathEffect());
+ this->initPathEffect(sk_ref_sp(paint.getPathEffect()));
}
GrStyle& operator=(const GrStyle& that) {
@@ -68,7 +68,7 @@ public:
const SkStrokeRec& strokeRec() const { return fStrokeRec; }
private:
- void initPathEffect(SkPathEffect* pe);
+ void initPathEffect(sk_sp<SkPathEffect> pe);
struct DashInfo {
DashInfo& operator=(const DashInfo& that) {