diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-09-06 19:02:39 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-09-06 19:02:39 -0400 |
| commit | b6f0921099b9b2a0a582886ebd6383fa20eac2b0 (patch) | |
| tree | 9a2f099990176fad11c8904bfc7830f6e830a8f6 /indra/llimage/llimage.cpp | |
| parent | b12ade128ba2a7f1a10b283abcfa12bfb15f06d3 (diff) | |
| parent | 84884b06f206790ab5a4f52c7125665f9d32b7d8 (diff) | |
Automated merge with file:///Users/nat/linden/davep-viewer-development-rebased
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); } |
