diff options
Diffstat (limited to 'indra/llimage')
-rw-r--r-- | indra/llimage/llimage.cpp | 5 | ||||
-rw-r--r-- | indra/llimage/llimage.h | 1 | ||||
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 2 | ||||
-rw-r--r-- | indra/llimage/llimageworker.cpp | 36 | ||||
-rw-r--r-- | indra/llimage/llimageworker.h | 9 |
5 files changed, 17 insertions, 36 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 0fa027c9c3..3a3011d99b 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -798,7 +798,6 @@ U8* LLImageBase::allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 si // LLImageRaw //--------------------------------------------------------------------------- -S32 LLImageRaw::sGlobalRawMemory = 0; S32 LLImageRaw::sRawImageCount = 0; LLImageRaw::LLImageRaw() @@ -847,16 +846,13 @@ LLImageRaw::~LLImageRaw() U8* LLImageRaw::allocateData(S32 size) { U8* res = LLImageBase::allocateData(size); - sGlobalRawMemory += getDataSize(); return res; } // virtual U8* LLImageRaw::reallocateData(S32 size) { - sGlobalRawMemory -= getDataSize(); U8* res = LLImageBase::reallocateData(size); - sGlobalRawMemory += getDataSize(); return res; } @@ -869,7 +865,6 @@ void LLImageRaw::releaseData() // virtual void LLImageRaw::deleteData() { - sGlobalRawMemory -= getDataSize(); LLImageBase::deleteData(); } diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 7a588cfb03..460d5e0f5b 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -275,7 +275,6 @@ protected: void setDataAndSize(U8 *data, S32 width, S32 height, S8 components) ; public: - static S32 sGlobalRawMemory; static S32 sRawImageCount; private: diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index e1809dbe59..8dba1641a6 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -146,6 +146,7 @@ bool LLImageJ2C::initEncode(LLImageRaw &raw_image, int blocks_size, int precinct bool LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; return decodeChannels(raw_imagep, decode_time, 0, 4); } @@ -153,6 +154,7 @@ bool LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time) // Returns true to mean done, whether successful or not. bool LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count ) { + LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLTimer elapsed; bool res = true; diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index 0dbb744bcf..1aace5f3e8 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -49,33 +49,22 @@ LLImageDecodeThread::~LLImageDecodeThread() S32 LLImageDecodeThread::update(F32 max_time_ms) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - LLMutexLock lock(mCreationMutex); - for (creation_list_t::iterator iter = mCreationList.begin(); - iter != mCreationList.end(); ++iter) - { - creation_info& info = *iter; - ImageRequest* req = new ImageRequest(info.handle, info.image, - info.priority, info.discard, info.needs_aux, - info.responder); - - bool res = addRequest(req); - if (!res) - { - LL_ERRS() << "request added after LLLFSThread::cleanupClass()" << LL_ENDL; - } - } - mCreationList.clear(); S32 res = LLQueuedThread::update(max_time_ms); return res; } LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* image, - U32 priority, S32 discard, BOOL needs_aux, Responder* responder) + S32 discard, BOOL needs_aux, Responder* responder) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - LLMutexLock lock(mCreationMutex); handle_t handle = generateHandle(); - mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder)); + + ImageRequest* req = new ImageRequest(handle, image, + discard, needs_aux, + responder); + + addRequest(req); + return handle; } @@ -84,8 +73,7 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* S32 LLImageDecodeThread::tut_size() { LLMutexLock lock(mCreationMutex); - S32 res = mCreationList.size(); - return res; + return 0; } LLImageDecodeThread::Responder::~Responder() @@ -95,9 +83,9 @@ LLImageDecodeThread::Responder::~Responder() //---------------------------------------------------------------------------- LLImageDecodeThread::ImageRequest::ImageRequest(handle_t handle, LLImageFormatted* image, - U32 priority, S32 discard, BOOL needs_aux, + S32 discard, BOOL needs_aux, LLImageDecodeThread::Responder* responder) - : LLQueuedThread::QueuedRequest(handle, priority, FLAG_AUTO_COMPLETE), + : LLQueuedThread::QueuedRequest(handle, FLAG_AUTO_COMPLETE), mFormattedImage(image), mDiscardLevel(discard), mNeedsAux(needs_aux), @@ -121,7 +109,7 @@ LLImageDecodeThread::ImageRequest::~ImageRequest() bool LLImageDecodeThread::ImageRequest::processRequest() { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - const F32 decode_time_slice = .1f; + const F32 decode_time_slice = 0.f; //disable time slicing bool done = true; if (!mDecodedRaw && mFormattedImage.notNull()) { diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index 1bfb0ddfd3..4619ddd6a2 100644 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h @@ -49,7 +49,7 @@ public: public: ImageRequest(handle_t handle, LLImageFormatted* image, - U32 priority, S32 discard, BOOL needs_aux, + S32 discard, BOOL needs_aux, LLImageDecodeThread::Responder* responder); /*virtual*/ bool processRequest(); @@ -76,7 +76,7 @@ public: virtual ~LLImageDecodeThread(); handle_t decodeImage(LLImageFormatted* image, - U32 priority, S32 discard, BOOL needs_aux, + S32 discard, BOOL needs_aux, Responder* responder); S32 update(F32 max_time_ms); @@ -88,16 +88,13 @@ private: { handle_t handle; LLPointer<LLImageFormatted> image; - U32 priority; S32 discard; BOOL needs_aux; LLPointer<Responder> responder; creation_info(handle_t h, LLImageFormatted* i, U32 p, S32 d, BOOL aux, Responder* r) - : handle(h), image(i), priority(p), discard(d), needs_aux(aux), responder(r) + : handle(h), image(i), discard(d), needs_aux(aux), responder(r) {} }; - typedef std::list<creation_info> creation_list_t; - creation_list_t mCreationList; LLMutex* mCreationMutex; }; |