diff options
| author | Monty Brandenberg <monty@lindenlab.com> | 2013-08-26 17:53:30 -0400 |
|---|---|---|
| committer | Monty Brandenberg <monty@lindenlab.com> | 2013-08-26 17:53:30 -0400 |
| commit | 07c145ad4023593c38ef2d3f07a60a2875f474dd (patch) | |
| tree | e378c35f73ec661f3cfc7f4518beae84824f3da5 /indra/llimage/llimage.cpp | |
| parent | 1bea6e50aa11f691759c6c30850a3415edaa6383 (diff) | |
| parent | 6e1138585bf745f73f0bb99ca62f77eeb273f1e4 (diff) | |
Merge. Refresh from viewer-release after SSA.
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) |
