Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: include/gpu/GrResourceKey.h

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
};
/**
« include/core/SkData.h ('K') | « include/core/SkData.h ('k') | public.bzl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698