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

Unified Diff: src/utils/SkFrontBufferedStream.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/sfnt/SkOTUtils.h ('k') | src/utils/SkPDFRasterizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkFrontBufferedStream.cpp
diff --git a/src/utils/SkFrontBufferedStream.cpp b/src/utils/SkFrontBufferedStream.cpp
index ad5ae6e4afb2a5db8a94bc5b3fd6ddfc7d8d971e..562d376c1c9badd4f637810ae406a14b2f2f0752 100644
--- a/src/utils/SkFrontBufferedStream.cpp
+++ b/src/utils/SkFrontBufferedStream.cpp
@@ -31,7 +31,7 @@ public:
SkStreamRewindable* duplicate() const SK_OVERRIDE { return NULL; }
private:
- SkAutoTUnref<SkStream> fStream;
+ SkAutoTDelete<SkStream> fStream;
const bool fHasLength;
const size_t fLength;
// Current offset into the stream. Always >= 0.
@@ -71,7 +71,7 @@ SkStreamRewindable* SkFrontBufferedStream::Create(SkStream* stream, size_t buffe
}
FrontBufferedStream::FrontBufferedStream(SkStream* stream, size_t bufferSize)
- : fStream(SkRef(stream))
+ : fStream(stream)
, fHasLength(stream->hasPosition() && stream->hasLength())
, fLength(stream->getLength() - stream->getPosition())
, fOffset(0)
« no previous file with comments | « src/sfnt/SkOTUtils.h ('k') | src/utils/SkPDFRasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698