diff options
author | JJ Linden <jj@lindenlab.com> | 2013-05-15 14:57:56 -0700 |
---|---|---|
committer | JJ Linden <jj@lindenlab.com> | 2013-05-15 14:57:56 -0700 |
commit | a606a1cd68bd858c711856702185ae11194c6311 (patch) | |
tree | 2c060215b7ddc02492d715cae6b48d5f3c26f335 /indra/llimage | |
parent | 435bda9df464ef7faaf8329ffa094dca9e82a6a4 (diff) | |
parent | 50e3b7da42ddbae409f0a2bdbc322da96941fa07 (diff) |
merged in branch for changing BuildParams
Diffstat (limited to 'indra/llimage')
23 files changed, 14 insertions, 1 deletions
diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index e837b0cac2..e837b0cac2 100644..100755 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 1c25256e95..c8a05e1fae 100644..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) diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 4fc40ecff7..2277afc585 100644..100755 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -30,6 +30,7 @@ #include "lluuid.h" #include "llstring.h" #include "llthread.h" +#include "llpointer.h" const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2 const S32 MAX_IMAGE_MIP = 11; // 2048x2048 @@ -214,6 +215,9 @@ public: // Copy operations + //duplicate this raw image if refCount > 1. + LLPointer<LLImageRaw> duplicate(); + // Src and dst can be any size. Src and dst can each have 3 or 4 components. void copy( LLImageRaw* src ); diff --git a/indra/llimage/llimagebmp.cpp b/indra/llimage/llimagebmp.cpp index 60b1c628d7..60b1c628d7 100644..100755 --- a/indra/llimage/llimagebmp.cpp +++ b/indra/llimage/llimagebmp.cpp diff --git a/indra/llimage/llimagebmp.h b/indra/llimage/llimagebmp.h index db0b45def0..db0b45def0 100644..100755 --- a/indra/llimage/llimagebmp.h +++ b/indra/llimage/llimagebmp.h diff --git a/indra/llimage/llimagedimensionsinfo.cpp b/indra/llimage/llimagedimensionsinfo.cpp index c6bfa50b40..c6bfa50b40 100644..100755 --- a/indra/llimage/llimagedimensionsinfo.cpp +++ b/indra/llimage/llimagedimensionsinfo.cpp diff --git a/indra/llimage/llimagedimensionsinfo.h b/indra/llimage/llimagedimensionsinfo.h index 382fdb2a0e..382fdb2a0e 100644..100755 --- a/indra/llimage/llimagedimensionsinfo.h +++ b/indra/llimage/llimagedimensionsinfo.h diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 34c6793522..34c6793522 100644..100755 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp diff --git a/indra/llimage/llimagedxt.h b/indra/llimage/llimagedxt.h index a8756ba8ed..a8756ba8ed 100644..100755 --- a/indra/llimage/llimagedxt.h +++ b/indra/llimage/llimagedxt.h diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index 5412f98ee5..5412f98ee5 100644..100755 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h index ce8195940d..ce8195940d 100644..100755 --- a/indra/llimage/llimagej2c.h +++ b/indra/llimage/llimagej2c.h diff --git a/indra/llimage/llimagejpeg.cpp b/indra/llimage/llimagejpeg.cpp index b70f84efc8..b70f84efc8 100644..100755 --- a/indra/llimage/llimagejpeg.cpp +++ b/indra/llimage/llimagejpeg.cpp diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h index 7ac7f5d2e0..7ac7f5d2e0 100644..100755 --- a/indra/llimage/llimagejpeg.h +++ b/indra/llimage/llimagejpeg.h diff --git a/indra/llimage/llimagepng.cpp b/indra/llimage/llimagepng.cpp index 294f68b122..294f68b122 100644..100755 --- a/indra/llimage/llimagepng.cpp +++ b/indra/llimage/llimagepng.cpp diff --git a/indra/llimage/llimagepng.h b/indra/llimage/llimagepng.h index 1fbd850a2e..1fbd850a2e 100644..100755 --- a/indra/llimage/llimagepng.h +++ b/indra/llimage/llimagepng.h diff --git a/indra/llimage/llimagetga.cpp b/indra/llimage/llimagetga.cpp index 920ae2891f..920ae2891f 100644..100755 --- a/indra/llimage/llimagetga.cpp +++ b/indra/llimage/llimagetga.cpp diff --git a/indra/llimage/llimagetga.h b/indra/llimage/llimagetga.h index 5da3525149..5da3525149 100644..100755 --- a/indra/llimage/llimagetga.h +++ b/indra/llimage/llimagetga.h diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index ad2eb0f69c..ad2eb0f69c 100644..100755 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp diff --git a/indra/llimage/llimageworker.h b/indra/llimage/llimageworker.h index 1bfb0ddfd3..1bfb0ddfd3 100644..100755 --- a/indra/llimage/llimageworker.h +++ b/indra/llimage/llimageworker.h diff --git a/indra/llimage/llmapimagetype.h b/indra/llimage/llmapimagetype.h index 0a040d3db9..0a040d3db9 100644..100755 --- a/indra/llimage/llmapimagetype.h +++ b/indra/llimage/llmapimagetype.h diff --git a/indra/llimage/llpngwrapper.cpp b/indra/llimage/llpngwrapper.cpp index 2cc7d3c460..2cc7d3c460 100644..100755 --- a/indra/llimage/llpngwrapper.cpp +++ b/indra/llimage/llpngwrapper.cpp diff --git a/indra/llimage/llpngwrapper.h b/indra/llimage/llpngwrapper.h index 739f435996..739f435996 100644..100755 --- a/indra/llimage/llpngwrapper.h +++ b/indra/llimage/llpngwrapper.h diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index e255d65b43..e255d65b43 100644..100755 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp |