Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkDWriteFontFileStream Class Reference

#include <SkDWriteFontFileStream.h>

Inheritance diagram for SkDWriteFontFileStream:
SkStreamMemory SkStreamAsset SkStreamSeekable SkStreamRewindable SkStream

Public Member Functions

 SkDWriteFontFileStream (IDWriteFontFileStream *fontFileStream)
 
 ~SkDWriteFontFileStream () override
 
size_t read (void *buffer, size_t size) override
 
bool isAtEnd () const override
 
bool rewind () override
 
size_t getPosition () const override
 
bool seek (size_t position) override
 
bool move (long offset) override
 
size_t getLength () const override
 
const void * getMemoryBase () override
 
std::unique_ptr< SkDWriteFontFileStreamduplicate () const
 
std::unique_ptr< SkDWriteFontFileStreamfork () const
 
- Public Member Functions inherited from SkStreamMemory
const void * getMemoryBase () override=0
 
std::unique_ptr< SkStreamMemoryduplicate () const
 
std::unique_ptr< SkStreamMemoryfork () const
 
- Public Member Functions inherited from SkStreamAsset
bool hasLength () const override
 
size_t getLength () const override=0
 
std::unique_ptr< SkStreamAssetduplicate () const
 
std::unique_ptr< SkStreamAssetfork () const
 
- Public Member Functions inherited from SkStreamSeekable
std::unique_ptr< SkStreamSeekableduplicate () const
 
bool hasPosition () const override
 
size_t getPosition () const override=0
 
bool seek (size_t position) override=0
 
bool move (long offset) override=0
 
std::unique_ptr< SkStreamSeekablefork () const
 
- Public Member Functions inherited from SkStreamRewindable
bool rewind () override=0
 
std::unique_ptr< SkStreamRewindableduplicate () const
 
- Public Member Functions inherited from SkStream
virtual ~SkStream ()
 
 SkStream ()
 
virtual size_t read (void *buffer, size_t size)=0
 
size_t skip (size_t size)
 
virtual size_t peek (void *, size_t) const
 
virtual bool isAtEnd () const =0
 
bool readS8 (int8_t *)
 
bool readS16 (int16_t *)
 
bool readS32 (int32_t *)
 
bool readU8 (uint8_t *i)
 
bool readU16 (uint16_t *i)
 
bool readU32 (uint32_t *i)
 
bool readBool (bool *b)
 
bool readScalar (SkScalar *)
 
bool readPackedUInt (size_t *)
 
virtual bool rewind ()
 
std::unique_ptr< SkStreamduplicate () const
 
std::unique_ptr< SkStreamfork () const
 
virtual bool hasPosition () const
 
virtual size_t getPosition () const
 
virtual bool seek (size_t)
 
virtual bool move (long)
 
virtual bool hasLength () const
 
virtual size_t getLength () const
 
virtual const void * getMemoryBase ()
 
virtual sk_sp< SkDatagetData () const
 

Additional Inherited Members

- Static Public Member Functions inherited from SkStream
static std::unique_ptr< SkStreamAssetMakeFromFile (const char path[])
 

Detailed Description

An SkStream backed by an IDWriteFontFileStream. This allows Skia code to read an IDWriteFontFileStream.

Definition at line 24 of file SkDWriteFontFileStream.h.

Constructor & Destructor Documentation

◆ SkDWriteFontFileStream()

SkDWriteFontFileStream::SkDWriteFontFileStream ( IDWriteFontFileStream *  fontFileStream)
explicit

◆ ~SkDWriteFontFileStream()

SkDWriteFontFileStream::~SkDWriteFontFileStream ( )
override

Member Function Documentation

◆ duplicate()

std::unique_ptr< SkDWriteFontFileStream > SkDWriteFontFileStream::duplicate ( ) const
inline

Definition at line 38 of file SkDWriteFontFileStream.h.

38 {
39 return std::unique_ptr<SkDWriteFontFileStream>(this->onDuplicate());
40 }

◆ fork()

std::unique_ptr< SkDWriteFontFileStream > SkDWriteFontFileStream::fork ( ) const
inline

Definition at line 41 of file SkDWriteFontFileStream.h.

41 {
42 return std::unique_ptr<SkDWriteFontFileStream>(this->onFork());
43 }

◆ getLength()

size_t SkDWriteFontFileStream::getLength ( ) const
overridevirtual

Returns the total length of the stream. If this cannot be done, returns 0.

Implements SkStreamAsset.

◆ getMemoryBase()

const void * SkDWriteFontFileStream::getMemoryBase ( )
overridevirtual

Returns the starting address for the data. If this cannot be done, returns NULL.

Implements SkStreamMemory.

◆ getPosition()

size_t SkDWriteFontFileStream::getPosition ( ) const
overridevirtual

Returns the current position in the stream. If this cannot be done, returns 0.

Implements SkStreamSeekable.

◆ isAtEnd()

bool SkDWriteFontFileStream::isAtEnd ( ) const
overridevirtual

Returns true when all the bytes in the stream have been read. As SkStream represents synchronous I/O, isAtEnd returns false when the final stream length isn't known yet, even when all the bytes available so far have been read. This may return true early (when there are no more bytes to be read) or late (after the first unsuccessful read).

Implements SkStream.

◆ move()

bool SkDWriteFontFileStream::move ( long  )
overridevirtual

Seeks to an relative offset in the stream. If this cannot be done, returns false. If an attempt is made to move to a position outside the stream, the position will be set to the closest point within the stream (beginning or end).

Implements SkStreamSeekable.

◆ read()

size_t SkDWriteFontFileStream::read ( void *  buffer,
size_t  size 
)
overridevirtual

Reads or skips size number of bytes. If buffer == NULL, skip size bytes, return how many were skipped. If buffer != NULL, copy size bytes into buffer, return how many were copied.

Parameters
bufferwhen NULL skip size bytes, otherwise copy size bytes into buffer
sizethe number of bytes to skip or copy
Returns
the number of bytes actually read.

Implements SkStream.

◆ rewind()

bool SkDWriteFontFileStream::rewind ( )
overridevirtual

Rewinds to the beginning of the stream. Returns true if the stream is known to be at the beginning after this call returns.

Implements SkStreamRewindable.

◆ seek()

bool SkDWriteFontFileStream::seek ( size_t  )
overridevirtual

Seeks to an absolute position in the stream. If this cannot be done, returns false. If an attempt is made to seek past the end of the stream, the position will be set to the end of the stream.

Implements SkStreamSeekable.


The documentation for this class was generated from the following file: