diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-08-29 18:49:10 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-09-04 10:16:46 +0300 |
commit | a638d9610d9f369eca6dff74e8860ca466c253c7 (patch) | |
tree | e65ff848bd186e761891b2ca9d95c8026ed96274 /indra/llrender/llfontvertexbuffer.h | |
parent | 2bae8dfb815cf4d04cb4882c2fb889e3fb9666b2 (diff) |
viewer#2411 LLFontGL::render optimizations #2
Diffstat (limited to 'indra/llrender/llfontvertexbuffer.h')
-rw-r--r-- | indra/llrender/llfontvertexbuffer.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h index bd42cf6c2d..458b0a91bb 100644 --- a/indra/llrender/llfontvertexbuffer.h +++ b/indra/llrender/llfontvertexbuffer.h @@ -46,12 +46,14 @@ public: F32 x, F32 y, const LLColor4& color, LLFontGL::HAlign halign = LLFontGL::LEFT, LLFontGL::VAlign valign = LLFontGL::BASELINE, - U8 style = LLFontGL::NORMAL, LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW, + U8 style = LLFontGL::NORMAL, + LLFontGL::ShadowType shadow = LLFontGL::NO_SHADOW, S32 max_chars = S32_MAX, S32 max_pixels = S32_MAX, F32* right_x = NULL, bool use_ellipses = false, bool use_color = true); + typedef std::list<LLFontGL::LLVertexBufferData> buffer_list_t; private: void genBuffers(const LLFontGL* fontp, @@ -60,15 +62,18 @@ private: F32 x, F32 y, const LLColor4& color, LLFontGL::HAlign halign, LLFontGL::VAlign valign, - U8 style, LLFontGL::ShadowType shadow, + U8 style, + LLFontGL::ShadowType shadow, S32 max_chars, S32 max_pixels, F32* right_x, bool use_ellipses, bool use_color); + void renderBuffers(); - std::list<LLFontGL::LLVertexBufferData> mBufferList; + buffer_list_t mBufferList; S32 mChars = 0; + const LLFontGL *mLastFont = nullptr; S32 mLastOffset = 0; S32 mLastMaxChars = 0; S32 mLastMaxPixels = 0; @@ -76,6 +81,10 @@ private: F32 mLastX = 0.f; F32 mLastY = 0.f; LLColor4 mLastColor; + LLFontGL::HAlign mLastHalign = LLFontGL::LEFT; + LLFontGL::VAlign mLastValign = LLFontGL::BASELINE; + U8 mLastStyle = LLFontGL::NORMAL; + LLFontGL::ShadowType mLastShadow = LLFontGL::NO_SHADOW; F32 mLastRightX = 0.f; bool mTrackStringChanges = true; |