summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorEuclid Linden <euclid@lindenlab.com>2022-01-28 16:46:58 +0000
committerEuclid Linden <euclid@lindenlab.com>2022-01-28 16:46:58 +0000
commit40fe5277e1390c975d9a3184ff8fc46d69dfb450 (patch)
tree5f0432b7f1c3fe6b0b373fdf904bda4f5e58cf5e /indra/newview/llviewertexture.cpp
parentaf830e5fc5840194be95140f644a27011b9b7e06 (diff)
parentd28a271fa819c076e2cedb87d9f305468e436b25 (diff)
Merged in euclid-16418 (pull request #846)
SL-16418 move media texture updates to background thread Approved-by: Dave Parks
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 5fed46f437..ccf4c5bbec 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1629,7 +1629,6 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
mNeedsCreateTexture = TRUE;
if (preCreateTexture())
{
- ref();
#if LL_IMAGEGL_THREAD_CHECK
//grab a copy of the raw image data to make sure it isn't modified pending texture creation
U8* data = mRawImage->getData();
@@ -1643,6 +1642,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture()
#endif
mNeedsCreateTexture = TRUE;
auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr;
+ ref(); // protect texture from deletion while active on bg queue
if (mainq)
{
mainq->postTo(