diff options
| author | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-10-04 20:47:54 +0100 |
|---|---|---|
| committer | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-10-04 20:47:54 +0100 |
| commit | 0c1d6d7d9e89a6d3169621157bcba335ead477a9 (patch) | |
| tree | c5523eeb99bcd8ee77cf28a1d6f5e5cef8b52f2c /indra/llimage/llimage.cpp | |
| parent | 02097397e06a6cf45c639823c7f633dffe3684e8 (diff) | |
| parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
Merge v3.6.7 in
Diffstat (limited to 'indra/llimage/llimage.cpp')
| -rwxr-xr-x | indra/llimage/llimage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 1c25256e95..c8a05e1fae 100755 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -689,8 +689,17 @@ void LLImageRaw::fill( const LLColor4U& color ) } } +LLPointer<LLImageRaw> LLImageRaw::duplicate() +{ + if(getNumRefs() < 2) + { + return this; //nobody else refences to this image, no need to duplicate. + } - + //make a duplicate + LLPointer<LLImageRaw> dup = new LLImageRaw(getData(), getWidth(), getHeight(), getComponents()); + return dup; +} // Src and dst can be any size. Src and dst can each have 3 or 4 components. void LLImageRaw::copy(LLImageRaw* src) |
