aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2016-02-18 05:59:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-18 05:59:25 -0800
commitef0fed3bf06de231b66be5f5279468afd01e6f75 (patch)
tree6354bcd42067a865522af79c208aca2f907a3a8c /src
parent6b14c6b329fde5402ce7458d8261e80944279d06 (diff)
Remove position from FrontBufferedStream
When FrontBufferedStream was written, it implemented getPosition() and returned true for hasPosition(). The CL that introduced it (crrev.com/23717055) does not have any indication why, but I'm guessing it was because it was easy to implement. None of our decoders rely on this (only some tests do). Now that we have a decoder (SkRawCodec) that expects to be able to seek a stream if it has a position (which makes sense - SkStream.h associates that with SkStreamSeekable, and there is no other way to check to see if a stream is seekable), it is failing because FrontBufferedStream reports it has a position and the decoder tries to seek. Remove FrontBufferedStream::hasPosition() (reverting to the default, false) and ::getPosition() (so it will return 0). Fix tests - do not call FrontBufferedStream::getPosition() Update CodexTest to test using an FrontBufferedStream, like Android does. BUG=b/27218441 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1703293002 Review URL: https://codereview.chromium.org/1703293002
Diffstat (limited to 'src')
-rw-r--r--src/utils/SkFrontBufferedStream.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/utils/SkFrontBufferedStream.cpp b/src/utils/SkFrontBufferedStream.cpp
index e0b586a29d..a0dbeb6a7a 100644
--- a/src/utils/SkFrontBufferedStream.cpp
+++ b/src/utils/SkFrontBufferedStream.cpp
@@ -22,10 +22,6 @@ public:
bool rewind() override;
- bool hasPosition() const override { return true; }
-
- size_t getPosition() const override { return fOffset; }
-
bool hasLength() const override { return fHasLength; }
size_t getLength() const override { return fLength; }