summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:51:21 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 12:51:21 +0300
commitd9153532b8637cbfe992200effb1d24c597a732f (patch)
tree123a168e400480ce9a8de780e068c232172c85cc /indra/llimage/llimage.cpp
parentb06a99f7c76950484972e25d9dbbee8660a6a6c3 (diff)
parentbb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff)
Merge branch 'main' into marchcat/x-mf-merge
# Conflicts: # doc/contributions.txt # indra/newview/llfloaterimagepreview.cpp
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r--indra/llimage/llimage.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 864315d0ff..da5b531857 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -585,8 +585,7 @@ static void bilinear_scale(const U8 *src, U32 srcW, U32 srcH, U32 srcCh, U32 src
//---------------------------------------------------------------------------
//static
-std::string LLImage::sLastErrorMessage;
-LLMutex* LLImage::sMutex = NULL;
+thread_local std::string LLImage::sLastThreadErrorMessage;
bool LLImage::sUseNewByteRange = false;
S32 LLImage::sMinimalReverseByteRangePercent = 75;
@@ -595,28 +594,24 @@ void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_
{
sUseNewByteRange = use_new_byte_range;
sMinimalReverseByteRangePercent = minimal_reverse_byte_range_percent;
- sMutex = new LLMutex();
}
//static
void LLImage::cleanupClass()
{
- delete sMutex;
- sMutex = NULL;
}
//static
-const std::string& LLImage::getLastError()
+const std::string& LLImage::getLastThreadError()
{
static const std::string noerr("No Error");
- return sLastErrorMessage.empty() ? noerr : sLastErrorMessage;
+ return sLastThreadErrorMessage.empty() ? noerr : sLastThreadErrorMessage;
}
//static
void LLImage::setLastError(const std::string& message)
{
- LLMutexLock m(sMutex);
- sLastErrorMessage = message;
+ sLastThreadErrorMessage = message;
}
//---------------------------------------------------------------------------