summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-11-12 12:58:28 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-11-12 12:58:28 -0800
commit0e6139eb3d3af1e77df20f87deef427993bf2c61 (patch)
tree2c93f9a8d69f28cec99393b3cacbab85a8aa073d /indra/llimage
parent6f53b5baeb9e04c20c8fe6f419e09c9604a56497 (diff)
parent7833ecb58094641d3cd79c6772ad6c9fd4799f92 (diff)
merging in latest changes
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimage.cpp9
-rw-r--r--indra/llimage/llimage.h2
-rwxr-xr-x[-rw-r--r--]indra/llimage/llimagej2c.cpp0
3 files changed, 8 insertions, 3 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 825878c5ef..916c346b7a 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -292,11 +292,16 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
++sRawImageCount;
}
-LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
+LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy)
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
- if(allocateDataSize(width, height, components))
+
+ if(no_copy)
+ {
+ setDataAndSize(data, width, height, components);
+ }
+ else if(allocateDataSize(width, height, components))
{
memcpy(getData(), data, width*height*components);
}
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index 9ce77a0d01..5f54585005 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -189,7 +189,7 @@ protected:
public:
LLImageRaw();
LLImageRaw(U16 width, U16 height, S8 components);
- LLImageRaw(U8 *data, U16 width, U16 height, S8 components);
+ LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy = false);
// Construct using createFromFile (used by tools)
//LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false);
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index 452aad25cb..452aad25cb 100644..100755
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp