diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-03-27 15:20:38 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-03-29 09:36:35 -0700 |
commit | bf9d090045d7baf72f2ba7eadab0adc9d5c8f553 (patch) | |
tree | d6a2de6f42645da42d2892ae8cabde35c11892d3 /indra/newview/llviewermedia.cpp | |
parent | df9d2b6e9613d15d39e3e870fc09686e41b6c37f (diff) |
SL-19331: No need to create texture in doMediaTexUpdate - should already be handled by preMediaTexUpdate
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 8570c0cd5d..b02bfff099 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -2961,12 +2961,15 @@ void LLViewerMediaImpl::doMediaTexUpdate(LLViewerMediaTexture* media_tex, U8* da LL_PROFILE_ZONE_SCOPED_CATEGORY_MEDIA; mLock.lock(); // don't allow media source tear-down during update + const LLGLuint tex_name = media_tex->getGLTexture() ? media_tex->getGLTexture()->getTexName() : (LLGLuint)0; + if (!tex_name) + { + llassert(false); + return; + } + // wrap "data" in an LLImageRaw but do NOT make a copy LLPointer<LLImageRaw> raw = new LLImageRaw(data, media_tex->getWidth(), media_tex->getHeight(), media_tex->getComponents(), true); - - // Allocate GL texture based on LLImageRaw but do NOT copy to GL - LLGLuint tex_name = 0; - media_tex->createGLTexture(0, raw, 0, TRUE, LLGLTexture::OTHER, true, &tex_name); // copy just the subimage covered by the image raw to GL media_tex->setSubImage(data, data_width, data_height, x_pos, y_pos, width, height, tex_name); |