diff options
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 66 |
1 files changed, 44 insertions, 22 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index c64488251a..eaf1773731 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -586,6 +586,11 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) //////////////////////////////////////////////////////////////////////////// static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize"); +static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks"); +static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch"); +static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create"); +static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats"); void LLViewerTextureList::updateImages(F32 max_time) { @@ -597,14 +602,25 @@ void LLViewerTextureList::updateImages(F32 max_time) LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes)); LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory)); LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory)); - - updateImagesDecodePriorities(); + + + { + LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES); + updateImagesDecodePriorities(); + } F32 total_max_time = max_time; - max_time -= updateImagesFetchTextures(max_time); + + { + LLFastTimer t(FTM_IMAGE_FETCH); + max_time -= updateImagesFetchTextures(max_time); + } - max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time - max_time -= updateImagesCreateTextures(max_time); + { + LLFastTimer t(FTM_IMAGE_CREATE); + max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time + max_time -= updateImagesCreateTextures(max_time); + } if (!mDirtyTextureList.empty()) { @@ -612,24 +628,32 @@ void LLViewerTextureList::updateImages(F32 max_time) gPipeline.dirtyPoolObjectTextures(mDirtyTextureList); mDirtyTextureList.clear(); } - bool didone = false; - for (image_list_t::iterator iter = mCallbackList.begin(); - iter != mCallbackList.end(); ) + { - //trigger loaded callbacks on local textures immediately - LLViewerFetchedTexture* image = *iter++; - if (!image->getUrl().empty()) + LLFastTimer t(FTM_IMAGE_CALLBACKS); + bool didone = false; + for (image_list_t::iterator iter = mCallbackList.begin(); + iter != mCallbackList.end(); ) { - // Do stuff to handle callbacks, update priorities, etc. - didone = image->doLoadedCallbacks(); - } - else if (!didone) - { - // Do stuff to handle callbacks, update priorities, etc. - didone = image->doLoadedCallbacks(); + //trigger loaded callbacks on local textures immediately + LLViewerFetchedTexture* image = *iter++; + if (!image->getUrl().empty()) + { + // Do stuff to handle callbacks, update priorities, etc. + didone = image->doLoadedCallbacks(); + } + else if (!didone) + { + // Do stuff to handle callbacks, update priorities, etc. + didone = image->doLoadedCallbacks(); + } } } - updateImagesUpdateStats(); + + { + LLFastTimer t(FTM_IMAGE_STATS); + updateImagesUpdateStats(); + } } void LLViewerTextureList::updateImagesDecodePriorities() @@ -747,7 +771,6 @@ void LLViewerTextureList::updateImagesDecodePriorities() return type_from_host; } */ -static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images"); F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) { @@ -757,8 +780,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) // Create GL textures for all textures that need them (images which have been // decoded, but haven't been pushed into GL). // - LLFastTimer t(FTM_IMAGE_CREATE); - + LLTimer create_timer; image_list_t::iterator enditer = mCreateTextureList.begin(); for (image_list_t::iterator iter = mCreateTextureList.begin(); |