diff options
Diffstat (limited to 'src/core/SkRWBuffer.cpp')
-rw-r--r-- | src/core/SkRWBuffer.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp index 8ec2baafac..b90d617b0b 100644 --- a/src/core/SkRWBuffer.cpp +++ b/src/core/SkRWBuffer.cpp @@ -315,10 +315,6 @@ public: return fBuffer->size() == fGlobalOffset; } -#ifdef SK_SUPPORT_LEGACY_STREAM_API - SkStreamAsset* duplicate() const override { return new SkROBufferStreamAsset(fBuffer); } -#endif - size_t getPosition() const override { return fGlobalOffset; } @@ -343,23 +339,16 @@ public: return true; } -#ifdef SK_SUPPORT_LEGACY_STREAM_API - SkStreamAsset* fork() const override { - SkStreamAsset* clone = this->duplicate(); - clone->seek(this->getPosition()); - return clone; +private: + SkStreamAsset* onDuplicate() const override { + return new SkROBufferStreamAsset(fBuffer); } -#endif -private: -#ifndef SK_SUPPORT_LEGACY_STREAM_API - SkStreamAsset* onDuplicate() const override { return new SkROBufferStreamAsset(fBuffer); } SkStreamAsset* onFork() const override { auto clone = this->duplicate(); clone->seek(this->getPosition()); return clone.release(); } -#endif sk_sp<SkROBuffer> fBuffer; SkROBuffer::Iter fIter; |