diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-09 18:51:23 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-09 18:51:23 -0800 |
commit | c9044c03b3157c330a0b3b640bfce6bacc0c9343 (patch) | |
tree | d22f74cf380629ef398eea71d937646bfd726a40 /indra/llimage/llimage.cpp | |
parent | 1786a7150e754ea10dfd5172ec2491dd67e83a9a (diff) | |
parent | 8a3384adafff1b34d5a903e4d8cfd2dabca9e243 (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
Diffstat (limited to 'indra/llimage/llimage.cpp')
-rw-r--r-- | indra/llimage/llimage.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 825878c5ef..916c346b7a 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); } |