Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Friends | List of all members
SkTypefaceProxyPrototype Class Reference

#include <SkTypeface_remote.h>

Public Member Functions

 SkTypefaceProxyPrototype (const SkTypeface &typeface)
 
 SkTypefaceProxyPrototype (SkTypefaceID typefaceID, int glyphCount, int32_t styleValue, bool isFixedPitch, bool glyphMaskNeedsCurrentColor)
 
void flatten (SkWriteBuffer &buffer) const
 
SkTypefaceID serverTypefaceID () const
 

Static Public Member Functions

static std::optional< SkTypefaceProxyPrototypeMakeFromBuffer (SkReadBuffer &buffer)
 

Friends

class SkTypefaceProxy
 

Detailed Description

Definition at line 60 of file SkTypeface_remote.h.

Constructor & Destructor Documentation

◆ SkTypefaceProxyPrototype() [1/2]

SkTypefaceProxyPrototype::SkTypefaceProxyPrototype ( const SkTypeface typeface)
explicit

Definition at line 112 of file SkTypeface_remote.cpp.

113 : fServerTypefaceID{typeface.uniqueID()}
114 , fGlyphCount{typeface.countGlyphs()}
115 , fStyleValue{typeface.fontStyle().fValue}
116 , fIsFixedPitch{typeface.isFixedPitch()}
117 , fGlyphMaskNeedsCurrentColor{typeface.glyphMaskNeedsCurrentColor()} {}
int countGlyphs() const
SkTypefaceID uniqueID() const
Definition SkTypeface.h:101
SkFontStyle fontStyle() const
Definition SkTypeface.h:55
bool isFixedPitch() const
Definition SkTypeface.h:68

◆ SkTypefaceProxyPrototype() [2/2]

SkTypefaceProxyPrototype::SkTypefaceProxyPrototype ( SkTypefaceID  typefaceID,
int  glyphCount,
int32_t  styleValue,
bool  isFixedPitch,
bool  glyphMaskNeedsCurrentColor 
)

Definition at line 119 of file SkTypeface_remote.cpp.

122 : fServerTypefaceID {typefaceID}
123 , fGlyphCount{glyphCount}
124 , fStyleValue{styleValue}
125 , fIsFixedPitch{isFixedPitch}
126 , fGlyphMaskNeedsCurrentColor{glyphMaskNeedsCurrentColor} {}

Member Function Documentation

◆ flatten()

void SkTypefaceProxyPrototype::flatten ( SkWriteBuffer buffer) const

Definition at line 128 of file SkTypeface_remote.cpp.

128 {
129 buffer.writeUInt(fServerTypefaceID);
130 buffer.writeInt(fGlyphCount);
131 buffer.write32(fStyleValue);
132 buffer.writeBool(fIsFixedPitch);
133 buffer.writeBool(fGlyphMaskNeedsCurrentColor);
134}
static const uint8_t buffer[]

◆ MakeFromBuffer()

std::optional< SkTypefaceProxyPrototype > SkTypefaceProxyPrototype::MakeFromBuffer ( SkReadBuffer buffer)
static

Definition at line 96 of file SkTypeface_remote.cpp.

96 {
97 SkASSERT(buffer.isValid());
98 const SkTypefaceID typefaceID = buffer.readUInt();
99 const int glyphCount = buffer.readInt();
100 const int32_t styleValue = buffer.read32();
101 const bool isFixedPitch = buffer.readBool();
102 const bool glyphMaskNeedsCurrentColor = buffer.readBool();
103
104 if (buffer.isValid()) {
106 typefaceID, glyphCount, styleValue, isFixedPitch, glyphMaskNeedsCurrentColor};
107 }
108
109 return std::nullopt;
110}
#define SkASSERT(cond)
Definition SkAssert.h:116
uint32_t SkTypefaceID
Definition SkTypeface.h:38

◆ serverTypefaceID()

SkTypefaceID SkTypefaceProxyPrototype::serverTypefaceID ( ) const
inline

Definition at line 71 of file SkTypeface_remote.h.

71{ return fServerTypefaceID; }

Friends And Related Symbol Documentation

◆ SkTypefaceProxy

friend class SkTypefaceProxy
friend

Definition at line 74 of file SkTypeface_remote.h.


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