aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-08-02 14:40:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-02 14:40:46 -0700
commit38d909ec2875f79952de08f36adfaac5680d2c53 (patch)
treea11067146b42f3faa8531d6ef912f7246bbde1f2 /include/gpu
parentada5a44f3bdac10a8a0c53b34f5add7aea9fdbb0 (diff)
Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.
This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004 Review-Url: https://codereview.chromium.org/2206633004
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrResourceKey.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index 9f8063d955..0ead35ea3f 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;
};
/**