diff options
author | Michael Pohoreski <ptolemy@lindenlab.com> | 2022-03-25 15:53:38 +0000 |
---|---|---|
committer | Michael Pohoreski <ptolemy@lindenlab.com> | 2022-03-25 15:53:38 +0000 |
commit | 68b732c78a47a57a1717619b4214ff106659c799 (patch) | |
tree | 87d24e45b4982b82ddecf578d96f0b54451dcf03 /indra/newview/llviewertexturelist.cpp | |
parent | 43069379a2ed2c290fc51f775ebb1e350303325b (diff) | |
parent | 96178e689b3df429e2768566afe817b0f7e7cc1d (diff) |
Merged DRTVWR-546 into SL-16993
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 94a91d4a72..e0b778af59 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1222,6 +1222,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) @@ -1229,6 +1230,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; |