summaryrefslogtreecommitdiff
path: root/indra/llrender/llfontfreetype.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
commit22a47eee84dbaa5c731c000c6013ca558bd15892 (patch)
tree8b3128fdb91731d95025b86701431826c441c5ba /indra/llrender/llfontfreetype.cpp
parenta6b85244a6f943a4598ff9b7b8a3343eb1e0d11e (diff)
parent7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff)
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/llrender/llfontfreetype.cpp')
-rw-r--r--indra/llrender/llfontfreetype.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp
index 92b373c835..741ed993b0 100644
--- a/indra/llrender/llfontfreetype.cpp
+++ b/indra/llrender/llfontfreetype.cpp
@@ -143,7 +143,7 @@ LLFontFreetype::LLFontFreetype()
pFileStream(NULL),
pFtStream(NULL),
#endif
- mIsFallback(FALSE),
+ mIsFallback(false),
mFTFace(NULL),
mRenderGlyphCount(0),
mAddGlyphCount(0),
@@ -187,7 +187,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, bool is_fallback, S32 face_n)
+bool LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, bool is_fallback, S32 face_n)
{
// Don't leak face objects. This is also needed to deal with
// changed font file names.
@@ -212,7 +212,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;
@@ -232,7 +232,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;
@@ -279,7 +279,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)
@@ -328,7 +328,7 @@ S32 LLFontFreetype::ftOpenFace(const std::string& filename, S32 face_n)
pFtStream = new LLFT_Stream();
pFtStream->base = 0;
pFtStream->pos = 0;
- pFtStream->size = file_size;
+ pFtStream->size = static_cast<unsigned long>(file_size);
pFtStream->descriptor.pointer = pFileStream;
pFtStream->read = ft_read_cb;
pFtStream->close = ft_close_cb;
@@ -441,7 +441,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());
@@ -851,6 +851,7 @@ bool LLFontFreetype::setSubImageBGRA(U32 x, U32 y, U32 bitmap_num, U16 width, U1
void LLFontFreetype::setSubImageLuminanceAlpha(U32 x, U32 y, U32 bitmap_num, U32 width, U32 height, U8 *data, S32 stride) const
{
LLImageRaw *image_raw = mFontBitmapCachep->getImageRaw(EFontGlyphType::Grayscale, bitmap_num);
+ LLImageDataLock lock(image_raw);
llassert(!mIsFallback);
llassert(image_raw && (image_raw->getComponents() == 2));