77 return packedID.
hash();
91 : fID{PackIDSkPoint(
glyphID, pt, mask)} { }
97 return fID == that.fID;
100 return !(*
this == that);
103 return this->fID < that.fID;
167 using namespace skvx;
173 XY
pos{pt.
x(), pt.
y()};
175 SubXY sub = cast<int>(subPos *
magic) & SubXY{mask.
x(), mask.
y()};
182 x = (
x - floorf(
x)) + 1.0f;
183 y = (
y - floorf(
y)) + 1.0f;
185 (
int)(
x * magicX) & mask.
x(),
186 (
int)(
y * magicY) & mask.
y(),
196 return PackIDSubXSubY(
glyphID, FixedToSub(
x), FixedToSub(
y));
199 static constexpr uint32_t FixedToSub(
SkFixed n) {
203 constexpr uint32_t subPixelField(uint32_t subPixelPosBit)
const {
207 constexpr SkFixed subToFixed(uint32_t subPixelPosBit)
const {
208 uint32_t subPixelPosition = this->subPixelField(subPixelPosBit);
257 return -fRect[0] >= fRect[2] || -fRect[1] >= fRect[3];
266 return this->
offset(pt.
x(), pt.
y());
282 SkPoint negLeftTop()
const {
return {fRect[0], fRect[1]}; }
359 return this->
maxDimension() <= kSkSideTooBigForAtlas - 2;
373 return packedID.
hash();
381 const uint64_t mask = 0b11 << actionType;
397 uint16_t fWidth, fHeight;
408 SkRect onGetBounds()
override;
409 size_t onApproximateBytesUsed()
override;
410 void onDraw(
SkCanvas* canvas)
override;
508 return SkGlyphRect(fLeft, fTop, fLeft + fWidth, fTop + fHeight);
510 int left()
const {
return fLeft; }
511 int top()
const {
return fTop; }
512 int width()
const {
return fWidth; }
515 return fWidth == 0 || fHeight == 0;
519 uint16_t
extraBits()
const {
return fScalerContextBits; }
563 inline static constexpr uint16_t kMaxGlyphWidth = 1u << 13u;
577 Intercept* fIntercept{
nullptr};
579 bool fHasPath{
false};
584 bool fHairline{
false};
587 struct DrawableData {
588 Intercept* fIntercept{
nullptr};
590 bool fHasDrawable{
false};
595 void installImage(
void* imageData) {
615 void* fImage =
nullptr;
620 PathData* fPathData =
nullptr;
621 DrawableData* fDrawableData =
nullptr;
631 uint16_t fScalerContextBits = 0;
635 SkDEBUGCODE(
bool fAdvancesBoundsFormatAndInitialPathDone{
false};)
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
SkGlyphRect bounds() const
SkMask::Format maskFormat() const
static uint32_t Hash(SkPackedGlyphID packedID)
static bool FitsInAtlas(const SkGlyph &glyph)
uint16_t maxDimension() const
static constexpr uint16_t kSkSideTooBigForAtlas
bool fitsInAtlasInterpolated() const
void setActionFor(skglyph::ActionType, SkGlyph *, sktext::StrikeForGPU *)
static SkPackedGlyphID GetKey(SkGlyphDigest digest)
bool fitsInAtlasDirect() const
skglyph::GlyphAction actionFor(skglyph::ActionType actionType) const
SkPoint rightBottom() const
SkPoint widthHeight() const
SkGlyphRect scaleAndOffset(SkScalar scale, SkPoint offset) const
SkGlyphRect offset(SkPoint pt) const
SkGlyphRect offset(SkScalar x, SkScalar y) const
SkGlyphRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
SkGlyphRect inset(SkScalar dx, SkScalar dy) const
bool setPathHasBeenCalled() const
uint16_t extraBits() const
size_t addPathFromBuffer(SkReadBuffer &, SkArenaAlloc *)
bool imageTooLarge() const
SkGlyphID getGlyphID() const
size_t formatAlignment() const
void ensureIntercepts(const SkScalar bounds[2], SkScalar scale, SkScalar xPos, SkScalar *array, int *count, SkArenaAlloc *alloc)
void flattenMetrics(SkWriteBuffer &) const
bool setDrawableHasBeenCalled() const
bool setImageHasBeenCalled() const
size_t setMetricsAndImage(SkArenaAlloc *alloc, const SkGlyph &from)
const SkPath * path() const
SkMask::Format maskFormat() const
SkGlyph & operator=(const SkGlyph &)
bool setDrawable(SkArenaAlloc *alloc, SkScalerContext *scalerContext)
bool setPath(SkArenaAlloc *alloc, SkScalerContext *scalerContext)
constexpr SkGlyph(SkPackedGlyphID id)
bool pathIsHairline() const
void flattenPath(SkWriteBuffer &) const
size_t rowBytesUsingFormat(SkMask::Format format) const
bool setImage(SkArenaAlloc *alloc, SkScalerContext *scalerContext)
SkGlyph & operator=(SkGlyph &&)
void flattenDrawable(SkWriteBuffer &) const
SkScalar advanceX() const
void setImage(void *image)
SkScalar advanceY() const
size_t addImageFromBuffer(SkReadBuffer &, SkArenaAlloc *)
SkFixed getSubYFixed() const
size_t addDrawableFromBuffer(SkReadBuffer &, SkArenaAlloc *)
SkFixed getSubXFixed() const
SkGlyphRect glyphRect() const
void flattenImage(SkWriteBuffer &) const
SkDrawable * drawable() const
SkPackedGlyphID getPackedID() const
SkVector advanceVector() const
const void * image() const
static std::optional< SkGlyph > MakeFromBuffer(SkReadBuffer &)
SkPictureBackedGlyphDrawable(sk_sp< SkPicture > self)
static sk_sp< SkPictureBackedGlyphDrawable > MakeFromBuffer(SkReadBuffer &buffer)
static void FlattenDrawable(SkWriteBuffer &buffer, SkDrawable *drawable)
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
uint32_t uint32_t * format
static float max(float r, float g, float b)
static uint32_t CheapMix(uint32_t hash)
Optional< SkRect > bounds
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
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
SkGlyphRect rect_union(SkGlyphRect, SkGlyphRect)
SkGlyphRect rect_intersection(SkGlyphRect, SkGlyphRect)
SIT T max(const Vec< 1, T > &x)
SIT T min(const Vec< 1, T > &x)
SIN Vec< N, float > floor(const Vec< N, float > &x)
const SkVector halfAxisSampleFreq
const SkIPoint ignorePositionFieldMask
const SkIPoint ignorePositionMask
SkGlyphPositionRoundingSpec(bool isSubpixel, SkAxisAlignment axisAlignment)
constexpr int32_t y() const
constexpr int32_t x() const
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
@ kARGB32_Format
SkPMColor.
@ kBW_Format
1bit per pixel mask (e.g. monochrome)
uint32_t operator()(SkPackedGlyphID packedID) const
SkString shortDump() const
constexpr SkPackedGlyphID(uint32_t v)
SkFixed getSubXFixed() const
constexpr SkPackedGlyphID(SkGlyphID glyphID, SkFixed x, SkFixed y)
@ kFixedPointBinaryPointPos
@ kFixedPointSubPixelPosBits
bool operator<(SkPackedGlyphID that) const
bool operator!=(const SkPackedGlyphID &that) const
constexpr SkPackedGlyphID(SkGlyphID glyphID, uint32_t x, uint32_t y)
constexpr SkPackedGlyphID(SkGlyphID glyphID)
bool operator==(const SkPackedGlyphID &that) const
SkPackedGlyphID(SkGlyphID glyphID, SkPoint pt, SkIPoint mask)
static const constexpr SkScalar kSubpixelRound
static const constexpr SkIPoint kXYFieldMask
static constexpr uint32_t kImpossibleID
constexpr SkPackedGlyphID()
SkFixed getSubYFixed() const
SkGlyphID glyphID() const
constexpr float y() const
constexpr float x() const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)