Automated merge with https://bitbucket.org/VirLinden/drano
commit
1faf3d9c5f
|
|
@ -4270,6 +4270,10 @@ void LLAppViewer::idle()
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (gTeleportDisplay)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gViewerWindow->updateUI();
|
||||
|
||||
|
|
|
|||
|
|
@ -1951,6 +1951,12 @@ BOOL LLFace::hasMedia() const
|
|||
const F32 LEAST_IMPORTANCE = 0.05f ;
|
||||
const F32 LEAST_IMPORTANCE_FOR_LARGE_IMAGE = 0.3f ;
|
||||
|
||||
void LLFace::resetVirtualSize()
|
||||
{
|
||||
setVirtualSize(0.f);
|
||||
mImportanceToCamera = 0.f;
|
||||
}
|
||||
|
||||
F32 LLFace::getTextureVirtualSize()
|
||||
{
|
||||
F32 radius;
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ public:
|
|||
|
||||
F32 getTextureVirtualSize() ;
|
||||
F32 getImportanceToCamera()const {return mImportanceToCamera ;}
|
||||
void resetVirtualSize();
|
||||
|
||||
void setHasMedia(bool has_media) { mHasMedia = has_media ;}
|
||||
BOOL hasMedia() const ;
|
||||
|
|
|
|||
|
|
@ -2076,27 +2076,18 @@ void LLTextureFetch::deleteRequest(const LLUUID& id, bool cancel)
|
|||
{
|
||||
lockQueue() ;
|
||||
LLTextureFetchWorker* worker = getWorkerAfterLock(id);
|
||||
if (worker)
|
||||
{
|
||||
size_t erased_1 = mRequestMap.erase(worker->mID);
|
||||
unlockQueue() ;
|
||||
unlockQueue() ;
|
||||
|
||||
llassert_always(erased_1 > 0) ;
|
||||
|
||||
removeFromNetworkQueue(worker, cancel);
|
||||
llassert_always(!(worker->getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) ;
|
||||
|
||||
worker->removeFromHTTPQueue();
|
||||
worker->scheduleDelete();
|
||||
}
|
||||
else
|
||||
{
|
||||
unlockQueue() ;
|
||||
}
|
||||
removeRequest(worker, cancel);
|
||||
}
|
||||
|
||||
void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel)
|
||||
{
|
||||
if(!worker)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lockQueue() ;
|
||||
size_t erased_1 = mRequestMap.erase(worker->mID);
|
||||
unlockQueue() ;
|
||||
|
|
@ -2109,6 +2100,24 @@ void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel)
|
|||
worker->scheduleDelete();
|
||||
}
|
||||
|
||||
void LLTextureFetch::deleteAllRequests()
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
lockQueue();
|
||||
if(mRequestMap.empty())
|
||||
{
|
||||
unlockQueue() ;
|
||||
break;
|
||||
}
|
||||
|
||||
LLTextureFetchWorker* worker = mRequestMap.begin()->second;
|
||||
unlockQueue() ;
|
||||
|
||||
removeRequest(worker, true);
|
||||
}
|
||||
}
|
||||
|
||||
S32 LLTextureFetch::getNumRequests()
|
||||
{
|
||||
lockQueue() ;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ public:
|
|||
bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
|
||||
S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http);
|
||||
void deleteRequest(const LLUUID& id, bool cancel);
|
||||
void deleteAllRequests();
|
||||
bool getRequestFinished(const LLUUID& id, S32& discard_level,
|
||||
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux);
|
||||
bool updateRequestPriority(const LLUUID& id, F32 priority);
|
||||
|
|
|
|||
|
|
@ -1240,7 +1240,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
|
|||
mIsMissingAsset = FALSE;
|
||||
|
||||
mLoadedCallbackDesiredDiscardLevel = S8_MAX;
|
||||
mPauseLoadedCallBacks = TRUE ;
|
||||
mPauseLoadedCallBacks = FALSE ;
|
||||
|
||||
mNeedsCreateTexture = FALSE;
|
||||
|
||||
|
|
@ -2072,6 +2072,10 @@ bool LLViewerFetchedTexture::updateFetch()
|
|||
{
|
||||
make_request = false;
|
||||
}
|
||||
else if(mDesiredDiscardLevel > getMaxDiscardLevel())
|
||||
{
|
||||
make_request = false;
|
||||
}
|
||||
else if (mNeedsCreateTexture || mIsMissingAsset)
|
||||
{
|
||||
make_request = false;
|
||||
|
|
@ -2190,11 +2194,13 @@ void LLViewerFetchedTexture::forceToDeleteRequest()
|
|||
{
|
||||
if (mHasFetcher)
|
||||
{
|
||||
LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
|
||||
mHasFetcher = FALSE;
|
||||
mIsFetching = FALSE ;
|
||||
resetTextureStats();
|
||||
}
|
||||
|
||||
resetTextureStats();
|
||||
|
||||
mDesiredDiscardLevel = getMaxDiscardLevel() + 1;
|
||||
}
|
||||
|
||||
void LLViewerFetchedTexture::setIsMissingAsset()
|
||||
|
|
@ -2237,10 +2243,18 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call
|
|||
mLoadedCallbackDesiredDiscardLevel = llmin(mLoadedCallbackDesiredDiscardLevel, (S8)discard_level) ;
|
||||
}
|
||||
|
||||
if(mPauseLoadedCallBacks && !pause)
|
||||
if(mPauseLoadedCallBacks)
|
||||
{
|
||||
unpauseLoadedCallbacks(src_callback_list) ;
|
||||
if(!pause)
|
||||
{
|
||||
unpauseLoadedCallbacks(src_callback_list) ;
|
||||
}
|
||||
}
|
||||
else if(pause)
|
||||
{
|
||||
pauseLoadedCallbacks(src_callback_list) ;
|
||||
}
|
||||
|
||||
LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata, src_callback_list, this, pause);
|
||||
mLoadedCallbackList.push_back(entryp);
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
#include "pipeline.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llxuiparser.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerdisplay.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
@ -598,11 +598,15 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats");
|
|||
|
||||
void LLViewerTextureList::updateImages(F32 max_time)
|
||||
{
|
||||
if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE)
|
||||
static BOOL cleared = FALSE;
|
||||
if(gTeleportDisplay && !cleared)
|
||||
{
|
||||
clearFetchingRequests();
|
||||
gPipeline.clearRebuildGroups();
|
||||
cleared = TRUE;
|
||||
return;
|
||||
}
|
||||
cleared = FALSE;
|
||||
|
||||
LLAppViewer::getTextureFetch()->setTextureBandwidth(LLViewerStats::getInstance()->mTextureKBitStat.getMeanPerSec());
|
||||
|
||||
|
|
@ -673,14 +677,13 @@ void LLViewerTextureList::clearFetchingRequests()
|
|||
return;
|
||||
}
|
||||
|
||||
LLAppViewer::getTextureFetch()->deleteAllRequests();
|
||||
|
||||
for (image_priority_list_t::iterator iter = mImageList.begin();
|
||||
iter != mImageList.end(); ++iter)
|
||||
{
|
||||
LLViewerFetchedTexture* image = *iter;
|
||||
if(image->hasFetcher())
|
||||
{
|
||||
image->forceToDeleteRequest() ;
|
||||
}
|
||||
LLViewerFetchedTexture* imagep = *iter;
|
||||
imagep->forceToDeleteRequest() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -703,6 +706,7 @@ void LLViewerTextureList::updateImagesDecodePriorities()
|
|||
|
||||
if(imagep->isInDebug())
|
||||
{
|
||||
update_counter--;
|
||||
continue; //is in debug, ignore.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6645,7 +6645,7 @@ void LLVOAvatar::updateMeshTextures()
|
|||
if(!isSelf())
|
||||
{
|
||||
src_callback_list = &mCallbackTextureList ;
|
||||
paused = mLoadedCallbacksPaused ;
|
||||
paused = !isVisible();
|
||||
}
|
||||
|
||||
std::vector<BOOL> is_layer_baked;
|
||||
|
|
@ -7190,7 +7190,7 @@ void LLVOAvatar::onFirstTEMessageReceived()
|
|||
if(!isSelf())
|
||||
{
|
||||
src_callback_list = &mCallbackTextureList ;
|
||||
paused = mLoadedCallbacksPaused ;
|
||||
paused = !isVisible();
|
||||
}
|
||||
|
||||
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
|
||||
|
|
|
|||
|
|
@ -4178,7 +4178,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
}
|
||||
|
||||
llassert_always(vobj);
|
||||
vobj->updateTextureVirtualSize(true);
|
||||
vobj->updateTextureVirtualSize();
|
||||
vobj->preRebuild();
|
||||
|
||||
drawablep->clearState(LLDrawable::HAS_ALPHA);
|
||||
|
|
|
|||
|
|
@ -2439,6 +2439,31 @@ void LLPipeline::updateGL()
|
|||
}
|
||||
}
|
||||
|
||||
void LLPipeline::clearRebuildGroups()
|
||||
{
|
||||
mGroupQ1Locked = true;
|
||||
// Iterate through all drawables on the priority build queue,
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin();
|
||||
iter != mGroupQ1.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
group->clearState(LLSpatialGroup::IN_BUILD_Q1);
|
||||
}
|
||||
mGroupQ1.clear();
|
||||
mGroupQ1Locked = false;
|
||||
|
||||
mGroupQ2Locked = true;
|
||||
for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin();
|
||||
iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
group->clearState(LLSpatialGroup::IN_BUILD_Q2);
|
||||
}
|
||||
|
||||
mGroupQ2.clear();
|
||||
mGroupQ2Locked = false;
|
||||
}
|
||||
|
||||
void LLPipeline::rebuildPriorityGroups()
|
||||
{
|
||||
LLTimer update_timer;
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ public:
|
|||
void updateGL();
|
||||
void rebuildPriorityGroups();
|
||||
void rebuildGroups();
|
||||
void clearRebuildGroups();
|
||||
|
||||
//calculate pixel area of given box from vantage point of given camera
|
||||
static F32 calcPixelArea(LLVector3 center, LLVector3 size, LLCamera& camera);
|
||||
|
|
|
|||
Loading…
Reference in New Issue