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

Unified Diff: src/core/SkPathRef.cpp

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 2 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
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index 844c40a505b1df9e20daa737f121bd60537f7c98..ef051f7e84f80537506fa8943e3024bd1a0ff063 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -12,7 +12,7 @@
#include <limits>
//////////////////////////////////////////////////////////////////////////////
-SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
+SkPathRef::Editor::Editor(sk_sp<SkPathRef>* pathRef,
int incReserveVerbs,
int incReservePoints)
{
@@ -23,7 +23,7 @@ SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
copy->copy(**pathRef, incReserveVerbs, incReservePoints);
pathRef->reset(copy);
}
- fPathRef = *pathRef;
+ fPathRef = pathRef->get();
fPathRef->callGenIDChangeListeners();
fPathRef->fGenerationID = 0;
SkDEBUGCODE(sk_atomic_inc(&fPathRef->fEditorsAttached);)
@@ -111,12 +111,12 @@ static void transform_dir_and_start(const SkMatrix& matrix, bool isRRect, bool*
}
}
-void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst,
+void SkPathRef::CreateTransformedCopy(sk_sp<SkPathRef>* dst,
const SkPathRef& src,
const SkMatrix& matrix) {
SkDEBUGCODE(src.validate();)
if (matrix.isIdentity()) {
- if (*dst != &src) {
+ if (dst->get() != &src) {
src.ref();
dst->reset(const_cast<SkPathRef*>(&src));
SkDEBUGCODE((*dst)->validate();)
@@ -128,7 +128,7 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst,
dst->reset(new SkPathRef);
}
- if (*dst != &src) {
+ if (dst->get() != &src) {
(*dst)->resetToSize(src.fVerbCnt, src.fPointCnt, src.fConicWeights.count());
sk_careful_memcpy((*dst)->verbsMemWritable(), src.verbsMemBegin(),
src.fVerbCnt * sizeof(uint8_t));
@@ -242,7 +242,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
return ref;
}
-void SkPathRef::Rewind(SkAutoTUnref<SkPathRef>* pathRef) {
+void SkPathRef::Rewind(sk_sp<SkPathRef>* pathRef) {
if ((*pathRef)->unique()) {
SkDEBUGCODE((*pathRef)->validate();)
(*pathRef)->callGenIDChangeListeners();
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkPictureData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698