From 2dca817edb0d741b7d8930009417bf9bd071808d Mon Sep 17 00:00:00 2001 From: bungeman Date: Thu, 22 Jan 2015 06:08:31 -0800 Subject: 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 --- src/utils/win/SkDWriteFontFileStream.cpp | 2 +- src/utils/win/SkIStream.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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 that(this->duplicate()); + SkAutoTDelete 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; } -- cgit v1.2.3