Revert "de-couple the imageworkerthreads "

This reverts commit 1ef2f20d12.
master
Ansariel 2022-06-03 12:35:59 +02:00
parent ac6c3f58b5
commit 77aa34bb57
1 changed files with 2 additions and 27 deletions

View File

@ -84,34 +84,9 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted*
U32 priority, S32 discard, BOOL needs_aux, Responder* responder)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
// <FS:Beq> De-couple texture threading from mainloop
// LLMutexLock lock(mCreationMutex);
// handle_t handle = generateHandle();
// mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder));
LLMutexLock lock(mCreationMutex);
handle_t handle = generateHandle();
// If we have a thread pool dispatch this directly.
// Note: addRequest could cause the handling to take place on the fetch thread, this is unlikely to be an issue.
// if this is an actual problem we move the fallback to here and place the unfulfilled request into the legacy queue
if (s_ChildThreads > 0)
{
LL_PROFILE_ZONE_NAMED_COLOR("DecodeDecoupled", tracy::Color::Orange); // <FS:Beq> instrument the image decode pipeline
ImageRequest* req = new ImageRequest(handle, image,
priority, discard, needs_aux,
responder, this);
bool res = addRequest(req);
if (!res)
{
LL_WARNS() << "Decode request not added because we are exiting." << LL_ENDL;
return 0;
}
}
else
{
LL_PROFILE_ZONE_NAMED_COLOR("DecodeQueued", tracy::Color::Orange); // <FS:Beq> instrument the image decode pipeline
LLMutexLock lock(mCreationMutex);
mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder));
}
// </FS:Beq>
mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder));
return handle;
}