diff options
| author | Oz Linden <oz@lindenlab.com> | 2012-08-15 17:07:10 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2012-08-15 17:07:10 -0400 |
| commit | 97106c2dea855e7a7a6378e0b6971d7a8226f1f6 (patch) | |
| tree | b1cc26bc18f8ec28fba94e0f91035bfb73d96452 /indra/llimage/llimage.cpp | |
| parent | 981190cf3151f436d370b841b1baa5a2a607b94d (diff) | |
| parent | f2eef652063f7f2aee7296ff41cf5d34272cc12b (diff) | |
merge changes for DRTVWR-194
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); } |
