diff options
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; } |