Skia
2DGraphicsLibrary
|
SkStreamRewindable is a SkStream for which rewind and duplicate are required. More...
#include <SkStream.h>
Public Member Functions | |
bool | rewind () override=0 |
Rewinds to the beginning of the stream. More... | |
SkStreamRewindable * | duplicate () const override=0 |
Duplicates this stream. More... | |
Public Member Functions inherited from SkStream | |
virtual size_t | read (void *buffer, size_t size)=0 |
Reads or skips size number of bytes. More... | |
size_t | skip (size_t size) |
Skip size number of bytes. More... | |
virtual size_t | peek (void *, size_t) const |
Attempt to peek at size bytes. More... | |
virtual bool | isAtEnd () const =0 |
Returns true when all the bytes in the stream have been read. More... | |
int8_t | readS8 () |
int16_t | readS16 () |
int32_t | readS32 () |
uint8_t | readU8 () |
uint16_t | readU16 () |
uint32_t | readU32 () |
bool | readBool () |
SkScalar | readScalar () |
size_t | readPackedUInt () |
virtual bool | hasPosition () const |
Returns true if this stream can report it's current position. More... | |
virtual size_t | getPosition () const |
Returns the current position in the stream. More... | |
virtual bool | seek (size_t) |
Seeks to an absolute position in the stream. More... | |
virtual bool | move (long) |
Seeks to an relative offset in the stream. More... | |
virtual SkStreamSeekable * | fork () const |
Duplicates this stream. More... | |
virtual bool | hasLength () const |
Returns true if this stream can report it's total length. More... | |
virtual size_t | getLength () const |
Returns the total length of the stream. More... | |
virtual const void * | getMemoryBase () |
Returns the starting address for the data. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SkStream | |
static std::unique_ptr < SkStreamAsset > | MakeFromFile (const char path[]) |
Attempts to open the specified file as a stream, returns nullptr on failure. | |
SkStreamRewindable is a SkStream for which rewind and duplicate are required.
|
overridepure virtual |
Duplicates this stream.
If this cannot be done, returns NULL. The returned stream will be positioned at the beginning of its data.
Reimplemented from SkStream.
Implemented in SkMemoryStream, SkFILEStream, SkStreamMemory, SkStreamAsset, and SkStreamSeekable.
|
overridepure virtual |
Rewinds to the beginning of the stream.
Returns true if the stream is known to be at the beginning after this call returns.
Reimplemented from SkStream.
Implemented in SkMemoryStream, and SkFILEStream.