summaryrefslogtreecommitdiff
path: root/indra/llimage/llimage.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-30 14:57:33 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-07-30 14:57:33 -0400
commita5c9d89b28d74c1996a0c950a0c8b1484b43d243 (patch)
treeafd2dc64d86c69390fe2f482870fae0b097b768a /indra/llimage/llimage.cpp
parent0f3c5e6458acdf1676f0b7a6dc42ed8cfa286cb0 (diff)
parentd306cb059b9b56c1eb051074e19796b47e1c262d (diff)
merge
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r--indra/llimage/llimage.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 6775b005f4..e6b838c5b2 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -292,11 +292,16 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
++sRawImageCount;
}
-LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
+LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy)
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
- if(allocateDataSize(width, height, components))
+
+ if(no_copy)
+ {
+ setDataAndSize(data, width, height, components);
+ }
+ else if(allocateDataSize(width, height, components))
{
memcpy(getData(), data, width*height*components);
}