diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-11-17 15:48:07 -0800 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-11-17 15:48:07 -0800 |
| commit | 61f3c1b41ddedc16f2026c62600475105621b305 (patch) | |
| tree | af2124f540a4ff55c08cec7038458e883747fe47 /indra/llimage/llimage.cpp | |
| parent | 2d25eb18adc0c2c97c63a8e02f2274362672137c (diff) | |
| parent | c6a0f0ae1dec5ef2f7657d8c1ca07d85c1fef55d (diff) | |
Merge pull from richard/viewer-chui
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); } |
