Skia
2DGraphicsLibrary
|
SkStreamAsset is a SkStreamSeekable for which getLength is required. More...
#include <SkStream.h>
Public Member Functions | |
SkStreamAsset * | duplicate () const override=0 |
Duplicates this stream. More... | |
SkStreamAsset * | fork () const override=0 |
Duplicates this stream. More... | |
bool | hasLength () const override |
Returns true if this stream can report it's total length. More... | |
size_t | getLength () const override=0 |
Returns the total length of the stream. More... | |
Public Member Functions inherited from SkStreamSeekable | |
bool | hasPosition () const override |
Returns true if this stream can report it's current position. More... | |
size_t | getPosition () const override=0 |
Returns the current position in the stream. More... | |
bool | seek (size_t position) override=0 |
Seeks to an absolute position in the stream. More... | |
bool | move (long offset) override=0 |
Seeks to an relative offset in the stream. More... | |
Public Member Functions inherited from SkStreamRewindable | |
bool | rewind () override=0 |
Rewinds to the beginning of the 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 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. | |
SkStreamAsset is a SkStreamSeekable for which getLength is 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.
Implements SkStreamSeekable.
Implemented in SkMemoryStream, SkFILEStream, and SkStreamMemory.
|
overridepure virtual |
Duplicates this stream.
If this cannot be done, returns NULL. The returned stream will be positioned the same as this stream.
Implements SkStreamSeekable.
Implemented in SkMemoryStream, SkFILEStream, and SkStreamMemory.
|
overridepure virtual |
Returns the total length of the stream.
If this cannot be done, returns 0.
Reimplemented from SkStream.
Implemented in SkMemoryStream, and SkFILEStream.
|
inlineoverridevirtual |
Returns true if this stream can report it's total length.
Reimplemented from SkStream.