From 74c8b028d42a8c5b080bb861e427f38cedd4ad7c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 15 Dec 2023 18:26:14 +0100 Subject: SL-20743 Use LLMutex in LLImageBase for internal data thread-safety --- indra/llrender/llfontfreetype.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llrender/llfontfreetype.cpp') diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index e964d1586f..11a379d70f 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -669,6 +669,7 @@ U8 LLFontFreetype::getStyle() const void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 width, U32 height, U8 *data, S32 stride) const { LLImageRaw *image_raw = mFontBitmapCachep->getImageRaw(bitmap_num); + LLImageDataLock lock(image_raw); llassert(!mIsFallback); llassert(image_raw && (image_raw->getComponents() == 2)); -- cgit v1.2.3 From b2c271367296744fbbe2262e55d0ea4f8f5ccdc9 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 00:50:39 +0100 Subject: Convert BOOL to bool in llrender --- indra/llrender/llfontfreetype.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/llrender/llfontfreetype.cpp') diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 11a379d70f..ffeed89454 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -112,7 +112,7 @@ LLFontFreetype::LLFontFreetype() pFileStream(NULL), pFtStream(NULL), #endif - mIsFallback(FALSE), + mIsFallback(false), mFTFace(NULL), mRenderGlyphCount(0), mAddGlyphCount(0), @@ -156,7 +156,7 @@ void ft_close_cb(FT_Stream stream) { } #endif -BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback, S32 face_n) +bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, bool is_fallback, S32 face_n) { // Don't leak face objects. This is also needed to deal with // changed font file names. @@ -181,7 +181,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v #ifdef LL_WINDOWS clearFontStreams(); #endif - return FALSE; + return false; } mIsFallback = is_fallback; @@ -201,7 +201,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v clearFontStreams(); #endif mFTFace = NULL; - return FALSE; + return false; } F32 y_max, y_min, x_max, x_min; @@ -248,7 +248,7 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v mStyle |= LLFontGL::ITALIC; } - return TRUE; + return true; } S32 LLFontFreetype::getNumFaces(const std::string& filename) @@ -414,7 +414,7 @@ F32 LLFontFreetype::getXKerning(const LLFontGlyphInfo* left_glyph_info, const LL return delta.x*(1.f/64.f); } -BOOL LLFontFreetype::hasGlyph(llwchar wch) const +bool LLFontFreetype::hasGlyph(llwchar wch) const { llassert(!mIsFallback); return(mCharGlyphInfoMap.find(wch) != mCharGlyphInfoMap.end()); @@ -423,7 +423,7 @@ BOOL LLFontFreetype::hasGlyph(llwchar wch) const LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const { if (mFTFace == NULL) - return FALSE; + return false; llassert(!mIsFallback); //LL_DEBUGS() << "Adding new glyph for " << wch << " to font" << LL_ENDL; @@ -529,7 +529,7 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l height, buffer_data, buffer_row_stride, - TRUE); + true); break; case 2: setSubImageLuminanceAlpha(pos_x, -- cgit v1.2.3 From 8be121e7cd88e692dad26510426defc5fc1df358 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 20 Feb 2024 02:49:25 +0200 Subject: viewer#840 Xcode buildfix --- indra/llrender/llfontfreetype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llfontfreetype.cpp') diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index ffeed89454..3c702dc53d 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -423,7 +423,7 @@ bool LLFontFreetype::hasGlyph(llwchar wch) const LLFontGlyphInfo* LLFontFreetype::addGlyph(llwchar wch) const { if (mFTFace == NULL) - return false; + return NULL; llassert(!mIsFallback); //LL_DEBUGS() << "Adding new glyph for " << wch << " to font" << LL_ENDL; -- cgit v1.2.3