diff options
| author | Dave Parks <davep@lindenlab.com> | 2013-06-20 12:10:26 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2013-06-20 12:10:26 -0500 |
| commit | 9ea2d90a0dd9ca9ab76583187354533011ef3fcb (patch) | |
| tree | 93be8f1dd703cd87083cf871c1948671e0a8cb97 /indra/llimage/llimage.cpp | |
| parent | 2655c7a17ae38a073dcf8f05b0127b68edc34c95 (diff) | |
| parent | f62d04d4256e3ebb7ecf64ea370099c8795e8581 (diff) | |
Automated merge with http://bitbucket.org/lindenlab/viewer-release
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) |
