Index: include/gpu/GrResourceKey.h |
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h |
index 9f8063d955d9945b2dfc88c01bbed127f6b770da..0ead35ea3f79a1b359766b995c335fdd1be39b16 100644 |
--- a/include/gpu/GrResourceKey.h |
+++ b/include/gpu/GrResourceKey.h |
@@ -238,7 +238,7 @@ public: |
GrUniqueKey& operator=(const GrUniqueKey& that) { |
this->INHERITED::operator=(that); |
- this->setCustomData(that.getCustomData()); |
+ this->setCustomData(sk_ref_sp(that.getCustomData())); |
return *this; |
} |
@@ -247,11 +247,10 @@ public: |
} |
bool operator!=(const GrUniqueKey& that) const { return !(*this == that); } |
- void setCustomData(const SkData* data) { |
- SkSafeRef(data); |
- fData.reset(data); |
+ void setCustomData(sk_sp<SkData> data) { |
+ fData = std::move(data); |
} |
- const SkData* getCustomData() const { |
+ SkData* getCustomData() const { |
return fData.get(); |
} |
@@ -280,7 +279,7 @@ public: |
}; |
private: |
- SkAutoTUnref<const SkData> fData; |
+ sk_sp<SkData> fData; |
}; |
/** |