viewer#3147 Thumbnail picker's image is grey #2

Apparently made a blunder in previous commit since I missed mFetchState
being reset each run
master
Andrey Kleshchev 2024-11-27 15:07:54 +02:00 committed by Andrey Kleshchev
parent a90377df95
commit 79fe883ab6
3 changed files with 16 additions and 9 deletions

View File

@ -1503,18 +1503,13 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
if (http_not_found == mGetStatus)
{
if (mFTType != FTT_MAP_TILE)
{
LL_WARNS(LOG_TXT) << "Texture missing from server (404): " << mUrl << LL_ENDL;
}
if(mWriteToCacheState == NOT_WRITE) //map tiles or server bakes
{
setState(DONE);
releaseHttpSemaphore();
if (mFTType != FTT_MAP_TILE)
{
LL_WARNS(LOG_TXT) << mID << " abort: WAIT_HTTP_REQ not found" << LL_ENDL;
LL_WARNS(LOG_TXT) << mID << "NOT_WRITE texture missing from server (404), abort: " << mUrl << LL_ENDL;
}
return true;
}
@ -1524,6 +1519,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
LLViewerRegion* region = getRegion();
if (!region || mLastRegionId != region->getRegionID())
{
if (mFTType != FTT_MAP_TILE)
{
LL_INFOS(LOG_TXT) << "Texture missing from server (404), retrying: " << mUrl << " mRetryAttempt " << mRetryAttempt << LL_ENDL;
}
// cap failure? try on new region.
mUrl.clear();
++mRetryAttempt;
@ -1532,6 +1531,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
return false;
}
}
if (mFTType != FTT_MAP_TILE)
{
LL_WARNS(LOG_TXT) << "Texture missing from server (404): " << mUrl << LL_ENDL;
}
}
else if (http_service_unavail == mGetStatus)
{
@ -2734,7 +2738,7 @@ LLTextureFetchWorker* LLTextureFetch::getWorker(const LLUUID& id)
// Threads: T*
bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level, S32& worker_state,
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux,
LLCore::HttpStatus& last_http_get_status)
{
@ -2743,6 +2747,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
LLTextureFetchWorker* worker = getWorker(id);
if (worker)
{
worker_state = worker->mState;
if (worker->wasAborted())
{
res = true;
@ -2821,6 +2826,7 @@ bool LLTextureFetch::getRequestFinished(const LLUUID& id, S32& discard_level,
}
else
{
worker_state = 0;
res = true;
}
return res;

View File

@ -95,7 +95,7 @@ public:
// Threads: T*
// keep in mind that if fetcher isn't done, it still might need original raw image
bool getRequestFinished(const LLUUID& id, S32& discard_level,
bool getRequestFinished(const LLUUID& id, S32& discard_level, S32& worker_state,
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux,
LLCore::HttpStatus& last_http_get_status);

View File

@ -1872,7 +1872,7 @@ bool LLViewerFetchedTexture::updateFetch()
if (mRawImage.notNull()) sRawCount--;
if (mAuxRawImage.notNull()) sAuxCount--;
// keep in mind that fetcher still might need raw image, don't modify original
bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage,
bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mFetchState, mRawImage, mAuxRawImage,
mLastHttpGetStatus);
if (mRawImage.notNull()) sRawCount++;
if (mAuxRawImage.notNull())
@ -1979,6 +1979,7 @@ bool LLViewerFetchedTexture::updateFetch()
<< " mRawDiscardLevel " << mRawDiscardLevel
<< " current_discard " << current_discard
<< " stats " << mLastHttpGetStatus.toHex()
<< " worker state " << mFetchState
<< LL_ENDL;
}
setIsMissingAsset();