DescriptionRemove 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
Committed: https://skia.googlesource.com/skia/+/ef0fed3bf06de231b66be5f5279468afd01e6f75
Patch Set 1 #
Total comments: 1
Patch Set 2 : Fix test_peeking_front_buffered_stream #
Messages
Total messages: 18 (8 generated)
|