本文整理汇总了C++中LLViewerImage::doLoadedCallbacks方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerImage::doLoadedCallbacks方法的具体用法?C++ LLViewerImage::doLoadedCallbacks怎么用?C++ LLViewerImage::doLoadedCallbacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerImage
的用法示例。
在下文中一共展示了LLViewerImage::doLoadedCallbacks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateImages
void LLViewerImageList::updateImages(F32 max_time)
{
llpushcallstacks ;
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
sNumImagesStat.addValue(sNumImages);
sNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
sGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
sGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
sRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
sFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
llpushcallstacks ;
updateImagesDecodePriorities();
llpushcallstacks ;
F32 total_max_time = max_time;
max_time -= updateImagesFetchTextures(max_time);
llpushcallstacks ;
max_time = llmax(max_time, total_max_time*.25f); // at least 25% of max_time
max_time -= updateImagesCreateTextures(max_time);
llpushcallstacks ;
if (!mDirtyTextureList.empty())
{
LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY);
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
llpushcallstacks ;
bool didone = false;
for (image_list_t::iterator iter = mCallbackList.begin();
iter != mCallbackList.end(); )
{
//trigger loaded callbacks on local textures immediately
LLViewerImage* image = *iter++;
if (!image->mUrl.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();
}
}
llpushcallstacks ;
if (!gNoRender && !gGLManager.mIsDisabled)
{
LLViewerMedia::updateMedia();
}
llpushcallstacks ;
updateImagesUpdateStats();
llpushcallstacks ;
}
示例2: updateImages
void LLViewerImageList::updateImages(F32 max_time)
{
sNumImagesStat.addValue(sNumImages);
sNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
sGLTexMemStat.addValue(LLImageGL::sGlobalTextureMemory/(1024.f*1024.f));
sGLBoundMemStat.addValue(LLImageGL::sBoundTextureMemory/(1024.f*1024.f));
sRawMemStat.addValue(LLImageRaw::sGlobalRawMemory/(1024.f*1024.f));
sFormattedMemStat.addValue(LLImageFormatted::sGlobalFormattedMemory/(1024.f*1024.f));
updateImagesDecodePriorities();
max_time -= updateImagesFetchTextures(max_time);
max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f);
max_time -= updateImagesCreateTextures(max_time);
max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f);
if (!mDirtyTextureList.empty())
{
LLFastTimer t(LLFastTimer::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
LLViewerImage* image = *iter++;
if (!image->mLocalFileName.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();
}
}
if (!gNoRender && !gGLManager.mIsDisabled)
{
LLViewerMedia::updateImagesMediaStreams();
}
updateImagesUpdateStats();
}