#include <SkGlyph.h>
Definition at line 329 of file SkGlyph.h.
◆ SkGlyphDigest() [1/2]
SkGlyphDigest::SkGlyphDigest |
( |
| ) |
|
|
default |
◆ SkGlyphDigest() [2/2]
SkGlyphDigest::SkGlyphDigest |
( |
size_t |
index, |
|
|
const SkGlyph & |
glyph |
|
) |
| |
Definition at line 623 of file SkGlyph.cpp.
629 , fLeft{SkTo<int16_t>(glyph.
left())}
630 , fTop{SkTo<int16_t>(glyph.
top())}
631 , fWidth{SkTo<uint16_t>(glyph.
width())}
632 , fHeight{SkTo<uint16_t>(glyph.
height())} {}
SkMask::Format maskFormat() const
SkPackedGlyphID getPackedID() const
◆ actionFor()
skglyph::GlyphAction SkGlyphDigest::actionFor |
( |
skglyph::ActionType |
actionType | ) |
const |
|
inline |
Definition at line 343 of file SkGlyph.h.
343 {
344 return static_cast<skglyph::GlyphAction
>((
fActions >> actionType) & 0b11);
345 }
◆ bounds()
◆ FitsInAtlas()
bool SkGlyphDigest::FitsInAtlas |
( |
const SkGlyph & |
glyph | ) |
|
|
static |
Definition at line 684 of file SkGlyph.cpp.
684 {
686}
static constexpr uint16_t kSkSideTooBigForAtlas
◆ fitsInAtlasDirect()
bool SkGlyphDigest::fitsInAtlasDirect |
( |
| ) |
const |
|
inline |
Definition at line 353 of file SkGlyph.h.
353 {
355 }
uint16_t maxDimension() const
◆ fitsInAtlasInterpolated()
bool SkGlyphDigest::fitsInAtlasInterpolated |
( |
| ) |
const |
|
inline |
◆ GetKey()
◆ Hash()
Definition at line 372 of file SkGlyph.h.
372 {
373 return packedID.
hash();
374 }
◆ index()
int SkGlyphDigest::index |
( |
| ) |
const |
|
inline |
◆ isColor()
bool SkGlyphDigest::isColor |
( |
| ) |
const |
|
inline |
Definition at line 340 of file SkGlyph.h.
@ kARGB32_Format
SkPMColor.
◆ isEmpty()
bool SkGlyphDigest::isEmpty |
( |
| ) |
const |
|
inline |
◆ maskFormat()
◆ maxDimension()
uint16_t SkGlyphDigest::maxDimension |
( |
| ) |
const |
|
inline |
Definition at line 349 of file SkGlyph.h.
349 {
350 return std::max(fWidth, fHeight);
351 }
◆ setActionFor()
Definition at line 634 of file SkGlyph.cpp.
636 {
637
638 if (this->
actionFor(actionType) == GlyphAction::kUnset) {
639 GlyphAction
action = GlyphAction::kReject;
640 switch (actionType) {
641 case kDirectMask: {
643 action = GlyphAction::kAccept;
644 }
645 break;
646 }
647 case kDirectMaskCPU: {
650 action = GlyphAction::kAccept;
651 }
652 break;
653 }
654 case kMask: {
656 action = GlyphAction::kAccept;
657 }
658 break;
659 }
660 case kSDFT: {
663 action = GlyphAction::kAccept;
664 }
665 break;
666 }
667 case kPath: {
669 action = GlyphAction::kAccept;
670 }
671 break;
672 }
673 case kDrawable: {
675 action = GlyphAction::kAccept;
676 }
677 break;
678 }
679 }
680 this->setAction(actionType,
action);
681 }
682}
SkMask::Format maskFormat() const
bool fitsInAtlasInterpolated() const
bool fitsInAtlasDirect() const
skglyph::GlyphAction actionFor(skglyph::ActionType actionType) const
virtual bool prepareForPath(SkGlyph *)=0
virtual bool prepareForDrawable(SkGlyph *)=0
virtual bool prepareForImage(SkGlyph *)=0
@ kSDF_Format
8bits representing signed distance field
◆ fActions
uint64_t SkGlyphDigest::fActions |
◆ fFormat
uint64_t SkGlyphDigest::fFormat |
◆ fIndex
uint64_t SkGlyphDigest::fIndex |
◆ fIsEmpty
uint64_t SkGlyphDigest::fIsEmpty |
◆ fPackedID
uint64_t SkGlyphDigest::fPackedID |
◆ kSkSideTooBigForAtlas
constexpr uint16_t SkGlyphDigest::kSkSideTooBigForAtlas = 256 |
|
staticconstexpr |
The documentation for this class was generated from the following files: