diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-09-07 14:47:24 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-09-07 14:47:24 -0400 |
| commit | 695c4135ff6fa0c50daa4c84f23096096ffd8a54 (patch) | |
| tree | a9b539e3ba588634fc493f2ed5ead21124e306ff /indra/llimage/llimage.cpp | |
| parent | af6e665d5c9c9a5ea480389c284839f3945bf786 (diff) | |
| parent | b6f0921099b9b2a0a582886ebd6383fa20eac2b0 (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); } |
