DescriptionAdd a method to read a stream without advancing it.
Add a virtual method on SkStream which will do a "peek" some bytes, so
that those bytes are read, but the next call to read will be
unaffected.
Implement peek for SkMemoryStream, where the implementation is simple
and obvious.
Implement peek on SkFrontBufferedStream.
Add tests.
Motivated by decoding streams which cannot be rewound.
TBR=reed@google.com
BUG=skia:3257
Committed: https://skia.googlesource.com/skia/+/028a4135aa6404ccd3a494813befe6e1a35e5e6c
Patch Set 1 #
Total comments: 3
Patch Set 2 : Add error messages for SkStream::peek(). #
Total comments: 3
Patch Set 3 : Use kEnums. #
Total comments: 3
Patch Set 4 : No half measures, Walter. #
Total comments: 5
Patch Set 5 : SkDEBUGCODE; fix a bug #Patch Set 6 : Stop declaring parameters I do not use. #
Messages
Total messages: 23 (8 generated)
|