diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-03-25 13:21:10 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-03-25 13:21:10 -0500 |
| commit | 180989f28e69600a3bc198b8b62101ec25374bee (patch) | |
| tree | a6e0496f1eba79e5edc4912b2959a1ef86a3aec9 /indra/newview/llviewertexturelist.cpp | |
| parent | 34e79c8f4e251200496651f9ae2b5126a6f7faa3 (diff) | |
| parent | ed98d77fe81a04a03c76e159f8fa963adf6b1109 (diff) | |
Merge remote-tracking branch 'remotes/origin/DRTVWR-546' into SL-17005
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 66e113b45c..2a88d9314b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1219,6 +1219,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) LLViewerFetchedTexture* imagep = *iter++; imagep->updateFetch(); } + std::shared_ptr<LL::WorkQueue> main_queue = LLImageGLThread::sEnabled ? LL::WorkQueue::getInstance("mainloop") : NULL; // Run threads S32 fetch_pending = 0; while (1) @@ -1226,6 +1227,13 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) LLAppViewer::instance()->getTextureCache()->update(1); // unpauses the texture cache thread LLAppViewer::instance()->getImageDecodeThread()->update(1); // unpauses the image thread fetch_pending = LLAppViewer::instance()->getTextureFetch()->update(1); // unpauses the texture fetch thread + + if (LLImageGLThread::sEnabled) + { + main_queue->runFor(std::chrono::milliseconds(1)); + fetch_pending += main_queue->size(); + } + if (fetch_pending == 0 || timer.getElapsedTimeF32() > max_time) { break; |
