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

Unified Diff: src/core/SkStream.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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/SkPictureData.h ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStream.cpp
diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp
index 2b190b0e7bc4d032c0c05cf20c048f479fa37d61..38432c4b693067ab7f167f8bfee69bd2357dc51e 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -239,7 +239,7 @@ SkStreamAsset* SkFILEStream::duplicate() const {
}
if (!fName.isEmpty()) {
- SkAutoTUnref<SkFILEStream> that(new SkFILEStream(fName.c_str()));
+ SkAutoTDelete<SkFILEStream> that(new SkFILEStream(fName.c_str()));
if (sk_fidentical(that->fFILE, this->fFILE)) {
return that.detach();
}
@@ -265,7 +265,7 @@ bool SkFILEStream::move(long offset) {
}
SkStreamAsset* SkFILEStream::fork() const {
- SkAutoTUnref<SkStreamAsset> that(this->duplicate());
+ SkAutoTDelete<SkStreamAsset> that(this->duplicate());
that->seek(this->getPosition());
return that.detach();
}
@@ -396,7 +396,7 @@ bool SkMemoryStream::move(long offset) {
}
SkMemoryStream* SkMemoryStream::fork() const {
- SkAutoTUnref<SkMemoryStream> that(this->duplicate());
+ SkAutoTDelete<SkMemoryStream> that(this->duplicate());
that->seek(fOffset);
return that.detach();
}
@@ -741,7 +741,7 @@ public:
}
SkBlockMemoryStream* fork() const SK_OVERRIDE {
- SkAutoTUnref<SkBlockMemoryStream> that(this->duplicate());
+ SkAutoTDelete<SkBlockMemoryStream> that(this->duplicate());
that->fCurrent = this->fCurrent;
that->fOffset = this->fOffset;
that->fCurrentOffset = this->fCurrentOffset;
@@ -827,7 +827,7 @@ SkStreamAsset* SkStream::NewFromFile(const char path[]) {
// file access.
SkFILEStream* stream = SkNEW_ARGS(SkFILEStream, (path));
if (!stream->isValid()) {
- stream->unref();
+ SkDELETE(stream);
stream = NULL;
}
return stream;
@@ -886,7 +886,7 @@ SkStreamRewindable* SkStreamRewindableFromSkStream(SkStream* stream) {
if (!stream) {
return NULL;
}
- SkAutoTUnref<SkStreamRewindable> dupStream(stream->duplicate());
+ SkAutoTDelete<SkStreamRewindable> dupStream(stream->duplicate());
if (dupStream) {
return dupStream.detach();
}
« no previous file with comments | « src/core/SkPictureData.h ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698