@@ -2481,7 +2481,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
2481
2481
LL_PROFILE_ZONE_SCOPED;
2482
2482
if (mDebugPause )
2483
2483
{
2484
- return - 1 ;
2484
+ return CREATE_REQUEST_ERROR_DEFAULT ;
2485
2485
}
2486
2486
2487
2487
if (f_type == FTT_SERVER_BAKE)
@@ -2497,7 +2497,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
2497
2497
<< host << " != " << worker->mHost << LL_ENDL;
2498
2498
removeRequest (worker, true );
2499
2499
worker = NULL ;
2500
- return - 1 ;
2500
+ return CREATE_REQUEST_ERROR_MHOSTS ;
2501
2501
}
2502
2502
}
2503
2503
@@ -2550,13 +2550,13 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
2550
2550
{
2551
2551
if (worker->wasAborted ())
2552
2552
{
2553
- return - 1 ; // need to wait for previous aborted request to complete
2553
+ return CREATE_REQUEST_ERROR_ABORTED ; // need to wait for previous aborted request to complete
2554
2554
}
2555
2555
worker->lockWorkMutex (); // +Mw
2556
2556
if (worker->mState == LLTextureFetchWorker::DONE && worker->mDesiredSize == llmax (desired_size, TEXTURE_CACHE_ENTRY_SIZE) && worker->mDesiredDiscard == desired_discard) {
2557
2557
worker->unlockWorkMutex (); // -Mw
2558
2558
2559
- return - 1 ; // similar request has failed or is in a transitional state
2559
+ return CREATE_REQUEST_ERROR_TRANSITION ; // similar request has finished, failed or is in a transitional state
2560
2560
}
2561
2561
worker->mActiveCount ++;
2562
2562
worker->mNeedsAux = needs_aux;
@@ -3149,6 +3149,43 @@ S32 LLTextureFetch::getFetchState(const LLUUID& id, F32& data_progress_p, F32& r
3149
3149
return state;
3150
3150
}
3151
3151
3152
+ // Threads: T*
3153
+ S32 LLTextureFetch::getLastFetchState (const LLUUID& id, S32& requested_discard, S32& decoded_discard, bool & decoded)
3154
+ {
3155
+ LL_PROFILE_ZONE_SCOPED;
3156
+ S32 state = LLTextureFetchWorker::INVALID;
3157
+
3158
+ LLTextureFetchWorker* worker = getWorker (id);
3159
+ if (worker) // Don't check haveWork, intent is to get whatever is in the worker
3160
+ {
3161
+ worker->lockWorkMutex (); // +Mw
3162
+ state = worker->mState ;
3163
+ requested_discard = worker->mDesiredDiscard ;
3164
+ decoded_discard = worker->mDecodedDiscard ;
3165
+ decoded = worker->mDecoded ;
3166
+ worker->unlockWorkMutex (); // -Mw
3167
+ }
3168
+ return state;
3169
+ }
3170
+
3171
+ // Threads: T*
3172
+ S32 LLTextureFetch::getLastRawImage (const LLUUID& id,
3173
+ LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux)
3174
+ {
3175
+ LL_PROFILE_ZONE_SCOPED;
3176
+ S32 decoded_discard = -1 ;
3177
+ LLTextureFetchWorker* worker = getWorker (id);
3178
+ if (worker && !worker->haveWork () && worker->mDecodedDiscard >= 0 )
3179
+ {
3180
+ worker->lockWorkMutex (); // +Mw
3181
+ raw = worker->mRawImage ;
3182
+ aux = worker->mAuxImage ;
3183
+ decoded_discard = worker->mDecodedDiscard ;
3184
+ worker->unlockWorkMutex (); // -Mw
3185
+ }
3186
+ return decoded_discard;
3187
+ }
3188
+
3152
3189
void LLTextureFetch::dump ()
3153
3190
{
3154
3191
LL_INFOS (LOG_TXT) << " LLTextureFetch ACTIVE_HTTP:" << LL_ENDL;
0 commit comments