diff options
| author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-06 12:22:06 -0800 |
|---|---|---|
| committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-06 12:22:06 -0800 |
| commit | a91c2d889aad577fb22dc8f11e0dd168d71ec09d (patch) | |
| tree | 6f8234a6fcac9457c685495c2bdca6bf60a8f2df /indra/llimage/llimage.cpp | |
| parent | f2524568ea1895df58b7735fe959c772d558160d (diff) | |
| parent | bf6d1670756ba96abde570e7dbbf94c62c71ca5b (diff) | |
Pull and merge from https://bitbucket.org/lindenlab/viewer-development.
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); } |
