diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-05-23 18:25:21 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-05-23 18:25:21 -0600 |
commit | 16616ae48d86da75b3809fa6be6c846a9d420603 (patch) | |
tree | 6af6a40e0d586d2c7f2a7c2bf1b80f321bda173f /indra/newview/llappviewer.cpp | |
parent | 8026ac0dc9cb98eec6bb34cb6766c4150f876bf8 (diff) |
for SH-4145: Interesting: Implement occlusion culling for object cache
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0b0db432c8..cb813ea889 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1415,18 +1415,7 @@ bool LLAppViewer::mainLoop() S32 io_pending = 0; F32 max_time = llmin(gFrameIntervalSeconds.value() *10.f, 1.f); - { - LLFastTimer ftm(FTM_TEXTURE_CACHE); - work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread - } - { - LLFastTimer ftm(FTM_DECODE); - work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread - } - { - LLFastTimer ftm(FTM_DECODE); - work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread - } + work_pending += updateTextureThreads(max_time); { LLFastTimer ftm(FTM_VFS); @@ -1544,6 +1533,24 @@ bool LLAppViewer::mainLoop() return true; } +S32 LLAppViewer::updateTextureThreads(F32 max_time) +{ + S32 work_pending = 0; + { + LLFastTimer ftm(FTM_TEXTURE_CACHE); + work_pending += LLAppViewer::getTextureCache()->update(max_time); // unpauses the texture cache thread + } + { + LLFastTimer ftm(FTM_DECODE); + work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread + } + { + LLFastTimer ftm(FTM_DECODE); + work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread + } + return work_pending; +} + void LLAppViewer::flushVFSIO() { while (1) |