diff options
author | Dave Houlton <euclid@lindenlab.com> | 2020-11-12 15:47:04 +0000 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2020-11-12 15:47:04 +0000 |
commit | 6e76e20faaa71caa10fdea8148735bd11141ebe1 (patch) | |
tree | c174e7cc65e82e3efd7d119e5644162187369c04 /indra/newview/lltexturefetch.cpp | |
parent | f9a09406b38ad62e1db5914a96e462002c80fce9 (diff) | |
parent | 21e2f3e974cfe8e337a7dae7dc26e68fb3c2c4ba (diff) |
Merged in DV510-merge-6.4.12 (pull request #372)
DRTVWR-510 merge in 6.4.12
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index fe058024f6..f64db7beb5 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1977,6 +1977,11 @@ bool LLTextureFetchWorker::doWork(S32 param) setState(WAIT_ON_WRITE); ++mCacheWriteCount; CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID); + // This call might be under work mutex, but mRawImage is not nessesary safe here. + // If something retrieves it via getRequestFinished() and modifies, image won't + // be protected by work mutex and won't be safe to use here nor in cache worker. + // So make sure users of getRequestFinished() does not attempt to modify image while + // fetcher is working mCacheWriteHandle = mFetcher->mTextureCache->writeToCache(mID, cache_priority, mFormattedImage->getData(), datasize, mFileSize, mRawImage, mDecodedDiscard, responder); |