summaryrefslogtreecommitdiff
path: root/indra/llimage/llimageworker.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-24 18:38:03 +0000
committerDave Parks <davep@lindenlab.com>2022-05-24 18:38:03 +0000
commit7fb07008fc1ab2b7a6d8da3d7079cf0fafda9928 (patch)
tree311d04d5aca4a4ab6d0660a6bd5af2fb7bd5e45b /indra/llimage/llimageworker.cpp
parent3365a39080744af0566adb7b6efd8e53fc6b3339 (diff)
parent9f9465f5bd2160f0245805e32644ce37f8c6cca6 (diff)
Merged in SL-17219 (pull request #992)
SL-17219
Diffstat (limited to 'indra/llimage/llimageworker.cpp')
-rw-r--r--indra/llimage/llimageworker.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index 0dbb744bcf..1aace5f3e8 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -49,33 +49,22 @@ LLImageDecodeThread::~LLImageDecodeThread()
S32 LLImageDecodeThread::update(F32 max_time_ms)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- LLMutexLock lock(mCreationMutex);
- for (creation_list_t::iterator iter = mCreationList.begin();
- iter != mCreationList.end(); ++iter)
- {
- creation_info& info = *iter;
- ImageRequest* req = new ImageRequest(info.handle, info.image,
- info.priority, info.discard, info.needs_aux,
- info.responder);
-
- bool res = addRequest(req);
- if (!res)
- {
- LL_ERRS() << "request added after LLLFSThread::cleanupClass()" << LL_ENDL;
- }
- }
- mCreationList.clear();
S32 res = LLQueuedThread::update(max_time_ms);
return res;
}
LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* image,
- U32 priority, S32 discard, BOOL needs_aux, Responder* responder)
+ S32 discard, BOOL needs_aux, Responder* responder)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- LLMutexLock lock(mCreationMutex);
handle_t handle = generateHandle();
- mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder));
+
+ ImageRequest* req = new ImageRequest(handle, image,
+ discard, needs_aux,
+ responder);
+
+ addRequest(req);
+
return handle;
}
@@ -84,8 +73,7 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted*
S32 LLImageDecodeThread::tut_size()
{
LLMutexLock lock(mCreationMutex);
- S32 res = mCreationList.size();
- return res;
+ return 0;
}
LLImageDecodeThread::Responder::~Responder()
@@ -95,9 +83,9 @@ LLImageDecodeThread::Responder::~Responder()
//----------------------------------------------------------------------------
LLImageDecodeThread::ImageRequest::ImageRequest(handle_t handle, LLImageFormatted* image,
- U32 priority, S32 discard, BOOL needs_aux,
+ S32 discard, BOOL needs_aux,
LLImageDecodeThread::Responder* responder)
- : LLQueuedThread::QueuedRequest(handle, priority, FLAG_AUTO_COMPLETE),
+ : LLQueuedThread::QueuedRequest(handle, FLAG_AUTO_COMPLETE),
mFormattedImage(image),
mDiscardLevel(discard),
mNeedsAux(needs_aux),
@@ -121,7 +109,7 @@ LLImageDecodeThread::ImageRequest::~ImageRequest()
bool LLImageDecodeThread::ImageRequest::processRequest()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- const F32 decode_time_slice = .1f;
+ const F32 decode_time_slice = 0.f; //disable time slicing
bool done = true;
if (!mDecodedRaw && mFormattedImage.notNull())
{