aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRecordedDrawable.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-10-27 09:30:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-27 09:30:08 -0700
commit6bd5284415bd983b0628c4941dff5def40018f5a (patch)
tree7de7e45431f76db69807204ecdce3ed6fcc4d9e8 /src/core/SkRecordedDrawable.h
parent56380524d903f27627a75e2e1189463999725008 (diff)
Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few public APIs modified by this change appear to be unused outside of Skia. Removing these from the public API makes it easier to ensure users are no longer using them. This also updates GrGpu::wrapBackendXXX and the ::onWrapBackendXXX methods to clarify ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002 Review-Url: https://codereview.chromium.org/2448593002
Diffstat (limited to 'src/core/SkRecordedDrawable.h')
-rw-r--r--src/core/SkRecordedDrawable.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/SkRecordedDrawable.h b/src/core/SkRecordedDrawable.h
index 7e2d9bc599..de1fca5233 100644
--- a/src/core/SkRecordedDrawable.h
+++ b/src/core/SkRecordedDrawable.h
@@ -12,11 +12,11 @@
class SkRecordedDrawable : public SkDrawable {
public:
- SkRecordedDrawable(SkRecord* record, SkBBoxHierarchy* bbh, SkDrawableList* drawableList,
- const SkRect& bounds)
- : fRecord(SkRef(record))
- , fBBH(SkSafeRef(bbh))
- , fDrawableList(drawableList) // we take ownership
+ SkRecordedDrawable(sk_sp<SkRecord> record, sk_sp<SkBBoxHierarchy> bbh,
+ std::unique_ptr<SkDrawableList> drawableList, const SkRect& bounds)
+ : fRecord(std::move(record))
+ , fBBH(std::move(bbh))
+ , fDrawableList(std::move(drawableList))
, fBounds(bounds)
{}
@@ -34,8 +34,8 @@ protected:
SkPicture* onNewPictureSnapshot() override;
private:
- SkAutoTUnref<SkRecord> fRecord;
- SkAutoTUnref<SkBBoxHierarchy> fBBH;
- SkAutoTDelete<SkDrawableList> fDrawableList;
+ sk_sp<SkRecord> fRecord;
+ sk_sp<SkBBoxHierarchy> fBBH;
+ std::unique_ptr<SkDrawableList> fDrawableList;
const SkRect fBounds;
};