diff options
| author | Oz Linden <oz@lindenlab.com> | 2012-08-16 08:52:26 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2012-08-16 08:52:26 -0400 |
| commit | a7d8b425097a7fab0a5a40d6a6b5770deb0bb7f9 (patch) | |
| tree | 81e800d495674faa37d66c18db36cbfccd7fc5eb /indra/llimage/llimage.cpp | |
| parent | df93749819c503a66bc0ad34aeb1c7bed3746df2 (diff) | |
| parent | b9e43dfd646990be236e44814ce3199de3391dc1 (diff) | |
merge up to latest 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 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); } |
