Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkFontConfigInterface::FontIdentity Struct Reference

#include <SkFontConfigInterface.h>

Public Member Functions

 FontIdentity ()
 
bool operator== (const FontIdentity &other) const
 
bool operator!= (const FontIdentity &other) const
 
size_t writeToMemory (void *buffer=nullptr) const
 
size_t readFromMemory (const void *buffer, size_t length)
 

Public Attributes

uint32_t fID
 
int32_t fTTCIndex
 
SkString fString
 
SkFontStyle fStyle
 

Detailed Description

This should be treated as private to the impl of SkFontConfigInterface. Callers should not change or expect any particular values. It is meant to be a union of possible storage types to aid the impl.

Definition at line 45 of file SkFontConfigInterface.h.

Constructor & Destructor Documentation

◆ FontIdentity()

SkFontConfigInterface::FontIdentity::FontIdentity ( )
inline

Member Function Documentation

◆ operator!=()

bool SkFontConfigInterface::FontIdentity::operator!= ( const FontIdentity other) const
inline

Definition at line 53 of file SkFontConfigInterface.h.

53 {
54 return !(*this == other);
55 }

◆ operator==()

bool SkFontConfigInterface::FontIdentity::operator== ( const FontIdentity other) const
inline

Definition at line 48 of file SkFontConfigInterface.h.

48 {
49 return fID == other.fID &&
50 fTTCIndex == other.fTTCIndex &&
51 fString == other.fString;
52 }

◆ readFromMemory()

size_t SkFontConfigInterface::FontIdentity::readFromMemory ( const void *  buffer,
size_t  length 
)

Definition at line 85 of file SkFontConfigInterface_direct.cpp.

86 {
88
89 (void)buffer.readU32(&fID);
90 (void)buffer.readS32(&fTTCIndex);
91 uint32_t strLen, weight, width;
92 (void)buffer.readU32(&strLen);
93 (void)buffer.readU32(&weight);
94 (void)buffer.readU32(&width);
95 uint8_t u8;
96 (void)buffer.readU8(&u8);
98 fStyle = SkFontStyle(weight, width, slant);
99 fString.resize(strLen);
100 (void)buffer.read(fString.data(), strLen);
101 buffer.skipToAlign4();
102
103 return buffer.pos(); // the actual number of bytes read
104}
const char * data() const
Definition: SkString.h:132
void resize(size_t len)
Definition: SkString.cpp:374
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
int32_t width

◆ writeToMemory()

size_t SkFontConfigInterface::FontIdentity::writeToMemory ( void *  buffer = nullptr) const

Definition at line 64 of file SkFontConfigInterface_direct.cpp.

64 {
65 size_t size = sizeof(fID) + sizeof(fTTCIndex);
66 size += sizeof(int32_t) + sizeof(int32_t) + sizeof(uint8_t); // weight, width, italic
67 size += sizeof(int32_t) + fString.size(); // store length+data
68 if (addr) {
70
71 buffer.write32(fID);
72 buffer.write32(fTTCIndex);
73 buffer.write32(fString.size());
74 buffer.write32(fStyle.weight());
75 buffer.write32(fStyle.width());
76 buffer.write8(fStyle.slant());
77 buffer.write(fString.c_str(), fString.size());
78 buffer.padToAlign4();
79
80 SkASSERT(buffer.pos() == size);
81 }
82 return size;
83}
#define SkASSERT(cond)
Definition: SkAssert.h:116
Slant slant() const
Definition: SkFontStyle.h:64
int width() const
Definition: SkFontStyle.h:63
int weight() const
Definition: SkFontStyle.h:62
size_t size() const
Definition: SkString.h:131
const char * c_str() const
Definition: SkString.h:133

Member Data Documentation

◆ fID

uint32_t SkFontConfigInterface::FontIdentity::fID

Definition at line 57 of file SkFontConfigInterface.h.

◆ fString

SkString SkFontConfigInterface::FontIdentity::fString

Definition at line 59 of file SkFontConfigInterface.h.

◆ fStyle

SkFontStyle SkFontConfigInterface::FontIdentity::fStyle

Definition at line 60 of file SkFontConfigInterface.h.

◆ fTTCIndex

int32_t SkFontConfigInterface::FontIdentity::fTTCIndex

Definition at line 58 of file SkFontConfigInterface.h.


The documentation for this struct was generated from the following files: