diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-08-19 15:51:40 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-08-19 15:51:40 -0400 |
| commit | 70cacc4d17790f13d62188a49d814f94da9301d5 (patch) | |
| tree | 2da7d156c9529c74b66bfb0fd9c4ec064a6f5e35 /indra/llimage/llimage.cpp | |
| parent | 561e0bb1a09e613e6fb41f6a31f1b182b9caa19c (diff) | |
| parent | 171089207b528ab80a954292c127ba77254ee927 (diff) | |
merge changes for 3.6.3-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) |
