Merge pull request 'perf(text): fold Ensure+Lookup into FontAtlas::EnsureAndGet (#53)' (#84) from claude/issue-53 into master
This commit is contained in:
commit
0b00d9d680
3 changed files with 13 additions and 6 deletions
|
|
@ -115,6 +115,11 @@ export namespace Crafter {
|
|||
std::uint8_t* PixelPtr() noexcept;
|
||||
|
||||
bool Ensure(Font& font, std::uint32_t codepoint);
|
||||
// Ensure the glyph is in the atlas and return a pointer to it in one
|
||||
// hash+probe. Returns nullptr only when a brand-new glyph cannot be
|
||||
// placed (ShelfPlace failure); a glyph with no SDF coverage (e.g.
|
||||
// space) still returns a valid pointer.
|
||||
const Glyph* EnsureAndGet(Font& font, std::uint32_t codepoint);
|
||||
const Glyph* Lookup(Font& font, std::uint32_t codepoint) const;
|
||||
void Update(GraphicsCommandBuffer cmd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue