BOOL LLImageWorker::requestDecodedAuxData(LLPointer<LLImageRaw>& raw, S32 channel, S32 discard) { // For most codecs, only mDiscardLevel data is available. // (see LLImageDXT for exception) if (discard >= 0 && discard != mFormattedImage->getDiscardLevel()) { llerrs << "Request for invalid discard level" << llendl; } checkWork(); if (mDecodedType == -2) { return TRUE; // aborted, done } if (mDecodedType != channel) { if (!haveWork()) { addWork(channel, mPriority); } return FALSE; } else { llassert_always(!haveWork()); llassert_always(mDecodedType == channel); raw = mDecodedImage; // smart pointer acquires ownership of data mDecodedImage = NULL; return TRUE; } }
~LLTextureCacheWorker() { llassert_always(!haveWork()); delete[] mReadData; }