diff options
author | bungeman <bungeman@google.com> | 2015-01-22 06:08:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-22 06:08:31 -0800 |
commit | 2dca817edb0d741b7d8930009417bf9bd071808d (patch) | |
tree | 1d4f4ae993a84972bb984621593e41b54f969c70 /src/utils/win | |
parent | faff2c45985a5e0fdb72bdf416d97babecd44833 (diff) |
Remove staging SkStream::unref().
SkStream::unref() was added to ease transitioning off of SkStream
deriving from SkRefCnt. It is no longer needed, remove it.
TBR=reed@google.com
Review URL: https://codereview.chromium.org/861413002
Diffstat (limited to 'src/utils/win')
-rw-r--r-- | src/utils/win/SkDWriteFontFileStream.cpp | 2 | ||||
-rw-r--r-- | src/utils/win/SkIStream.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/win/SkDWriteFontFileStream.cpp b/src/utils/win/SkDWriteFontFileStream.cpp index 5569db5ac1..809ae7bd9a 100644 --- a/src/utils/win/SkDWriteFontFileStream.cpp +++ b/src/utils/win/SkDWriteFontFileStream.cpp @@ -103,7 +103,7 @@ bool SkDWriteFontFileStream::move(long offset) { } SkDWriteFontFileStream* SkDWriteFontFileStream::fork() const { - SkAutoTUnref<SkDWriteFontFileStream> that(this->duplicate()); + SkAutoTDelete<SkDWriteFontFileStream> that(this->duplicate()); that->seek(fPos); return that.detach(); } diff --git a/src/utils/win/SkIStream.cpp b/src/utils/win/SkIStream.cpp index 6274e717a2..2e9510cf95 100644 --- a/src/utils/win/SkIStream.cpp +++ b/src/utils/win/SkIStream.cpp @@ -103,29 +103,29 @@ HRESULT STDMETHODCALLTYPE SkBaseIStream::Stat(STATSTG* pStatstg /** * SkIStream */ -SkIStream::SkIStream(SkStream* stream, bool unrefOnRelease) +SkIStream::SkIStream(SkStream* stream, bool deleteOnRelease) : SkBaseIStream() , fSkStream(stream) - , fUnrefOnRelease(unrefOnRelease) + , fDeleteOnRelease(deleteOnRelease) , fLocation() { this->fSkStream->rewind(); } SkIStream::~SkIStream() { - if (this->fSkStream && fUnrefOnRelease) { - this->fSkStream->unref(); + if (this->fSkStream && fDeleteOnRelease) { + delete this->fSkStream; } } HRESULT SkIStream::CreateFromSkStream(SkStream* stream - , bool unrefOnRelease + , bool deleteOnRelease , IStream ** ppStream) { if (NULL == stream) { return E_INVALIDARG; } - *ppStream = new SkIStream(stream, unrefOnRelease); + *ppStream = new SkIStream(stream, deleteOnRelease); return S_OK; } |