summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-02-14 18:07:24 +0000
committerDave Parks <davep@lindenlab.com>2022-02-14 18:07:24 +0000
commitf47730b92c309092d0a5a95e2d49d7ad53230a97 (patch)
tree320468cf59e56c634aa35e515b1ff2b9744a620e /indra/llimage
parentfe16567f508218211204691831c50c001a111590 (diff)
SL-16418 Media texture update stall fix. Make media texture updates use LLImageGL thread to update, fix AMD sync issue on ImageGL thread and install debug callbacks on LLImageGL thread when debug gl enabled.
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimage.cpp6
-rw-r--r--indra/llimage/llimage.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 15b07e5318..5fa19ce9c6 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -860,6 +860,12 @@ U8* LLImageRaw::reallocateData(S32 size)
return res;
}
+void LLImageRaw::releaseData()
+{
+ LLImageBase::setSize(0, 0, 0);
+ LLImageBase::setDataAndSize(nullptr, 0);
+}
+
// virtual
void LLImageRaw::deleteData()
{
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 354926ee58..7a588cfb03 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -191,6 +191,12 @@ public:
/*virtual*/ void deleteData();
/*virtual*/ U8* allocateData(S32 size = -1);
/*virtual*/ U8* reallocateData(S32 size);
+
+ // use in conjunction with "no_copy" constructor to release data pointer before deleting
+ // so that deletion of this LLImageRaw will not free the memory at the "data" parameter
+ // provided to "no_copy" constructor
+ void releaseData();
+
bool resize(U16 width, U16 height, S8 components);