new fasttimers, including ui.
This commit is contained in:
@@ -74,6 +74,7 @@ U32 LLViewerTextureList::sTexturePackets = 0;
|
||||
S32 LLViewerTextureList::sNumImages = 0;
|
||||
|
||||
LLViewerTextureList gTextureList;
|
||||
static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images");
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -610,7 +611,13 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images");
|
||||
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");
|
||||
static LLFastTimer::DeclareTimer FTM_IMAGE_MEDIA("Media");
|
||||
|
||||
void LLViewerTextureList::updateImages(F32 max_time)
|
||||
{
|
||||
@@ -626,44 +633,63 @@ 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(global_raw_memory));
|
||||
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())
|
||||
{
|
||||
LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY);
|
||||
LLFastTimer t(FTM_IMAGE_MARK_DIRTY);
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
//Required for old media system
|
||||
if (!gNoRender && !gGLManager.mIsDisabled)
|
||||
{
|
||||
LLFastTimer t(FTM_IMAGE_MEDIA);
|
||||
LLViewerMedia::updateMedia();
|
||||
}
|
||||
updateImagesUpdateStats();
|
||||
{
|
||||
LLFastTimer t(FTM_IMAGE_STATS);
|
||||
updateImagesUpdateStats();
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerTextureList::updateImagesDecodePriorities()
|
||||
@@ -781,7 +807,6 @@ void LLViewerTextureList::updateImagesDecodePriorities()
|
||||
return type_from_host;
|
||||
}
|
||||
*/
|
||||
//static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images");
|
||||
|
||||
F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
|
||||
{
|
||||
@@ -791,7 +816,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(LLFastTimer::FTM_IMAGE_CREATE);
|
||||
LLFastTimer t(FTM_IMAGE_CREATE);
|
||||
|
||||
LLTimer create_timer;
|
||||
image_list_t::iterator enditer = mCreateTextureList.begin();
|
||||
@@ -1181,7 +1206,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
|
||||
{
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
|
||||
LLFastTimer t(FTM_PROCESS_IMAGES);
|
||||
|
||||
// Receive image header, copy into image object and decompresses
|
||||
// if this is a one-packet image.
|
||||
@@ -1254,7 +1279,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
|
||||
LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
|
||||
LLFastTimer t(FTM_PROCESS_IMAGES);
|
||||
|
||||
// Receives image packet, copy into image object,
|
||||
// checks if all packets received, decompresses if so.
|
||||
@@ -1326,7 +1351,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d
|
||||
// static
|
||||
void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data)
|
||||
{
|
||||
LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
|
||||
LLFastTimer t(FTM_PROCESS_IMAGES);
|
||||
LLUUID image_id;
|
||||
msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user