summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontgl.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-02-24 17:22:54 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-02-24 19:31:16 +0200
commit5b968b7209d5e104e4b6152b8fc0fbbb37d1674a (patch)
treebedb48845bd2223e2a91303038f10bf25c4d0d64 /indra/llrender/llfontgl.cpp
parentb2e3159ce76b7aeafd3b083fa34b76d002a85a2b (diff)
#3332 Remake glyph count into cache generation
1. Cover reset with 'generation' 2. Fix lapse of judgement with mLastFontGlyphCount, it should have been saved before render(), not after
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rw-r--r--indra/llrender/llfontgl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 4037c036e5..16eec1fdd2 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -110,9 +110,10 @@ S32 LLFontGL::getNumFaces(const std::string& filename)
return mFontFreetype->getNumFaces(filename);
}
-S32 LLFontGL::getKnownGlyphCount() const
+S32 LLFontGL::getCacheGeneration() const
{
- return mFontFreetype ? mFontFreetype->getAddedGlyphs() : 0;
+ const LLFontBitmapCache* font_bitmap_cache = mFontFreetype->getFontBitmapCache();
+ return font_bitmap_cache->getCacheGeneration();
}
S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style,