diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp
index 23d1fbeb3..e694da6a3 100644
--- a/indra/llcharacter/llcharacter.cpp
+++ b/indra/llcharacter/llcharacter.cpp
@@ -50,7 +50,7 @@ BOOL LLCharacter::sAllowInstancesChange = TRUE ;
// LLCharacter()
// Class Constructor
//-----------------------------------------------------------------------------
-LLCharacter::LLCharacter()
+LLCharacter::LLCharacter(bool freeze_time)
:
mPreferredPelvisHeight( 0.f ),
mSex( SEX_FEMALE ),
@@ -62,6 +62,7 @@ LLCharacter::LLCharacter()
mMotionController.setCharacter( this );
mPauseRequest = new LLPauseRequestHandle();
+ mFreezeTimeHidden = freeze_time;
}
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 5fad36b1c..7fa7cf05d 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -62,7 +62,7 @@ class LLCharacter
{
public:
// Constructor
- LLCharacter();
+ LLCharacter(bool freeze_time);
// Destructor
virtual ~LLCharacter();
@@ -277,6 +277,8 @@ public:
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
+ void resetFreezeTimeHidden() { mFreezeTimeHidden = false; }
+
protected:
LLMotionController mMotionController;
@@ -288,6 +290,7 @@ protected:
U32 mAppearanceSerialNum;
U32 mSkeletonSerialNum;
LLAnimPauseRequest mPauseRequest;
+ bool mFreezeTimeHidden; // True when this object was created during snapshot FreezeTime mode, and that mode is STILL active.
private:
// visual parameter stuff
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index 4f6950a7d..3e6db4ab9 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -313,6 +313,32 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
++sRawImageCount;
}
+LLImageRaw::LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically) : mCacheEntries(0)
+{
+ mMemType = LLMemType::MTYPE_IMAGERAW;
+ llassert_always(src);
+ S8 const components = src->getComponents();
+ U8 const* const data = src->getData();
+ if (allocateDataSize(width, height, components))
+ {
+ if (crop_vertically)
+ {
+ llassert_always(width == src->getWidth());
+ memcpy(getData(), data + width * crop_offset * components, width * height * components);
+ }
+ else
+ {
+ llassert_always(height == src->getHeight());
+ U16 const src_width = src->getWidth();
+ for (U16 row = 0; row < height; ++row)
+ {
+ memcpy(getData() + width * row * components, data + (src_width * row + crop_offset) * components, width * components);
+ }
+ }
+ }
+ ++sRawImageCount;
+}
+
/*LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
: LLImageBase(), mCacheEntries(0)
{
@@ -529,7 +555,7 @@ void LLImageRaw::contractToPowerOfTwo(S32 max_dim, BOOL scale_image)
scale( new_width, new_height, scale_image );
}
-void LLImageRaw::biasedScaleToPowerOfTwo(S32 max_dim)
+void LLImageRaw::biasedScaleToPowerOfTwo(S32 target_width, S32 target_height, S32 max_dim)
{
// Strong bias towards rounding down (to save bandwidth)
// No bias would mean THRESHOLD == 1.5f;
@@ -538,22 +564,22 @@ void LLImageRaw::biasedScaleToPowerOfTwo(S32 max_dim)
// Find new sizes
S32 larger_w = max_dim; // 2^n >= mWidth
S32 smaller_w = max_dim; // 2^(n-1) <= mWidth
- while( (smaller_w > getWidth()) && (smaller_w > MIN_IMAGE_SIZE) )
+ while( (smaller_w > target_width) && (smaller_w > MIN_IMAGE_SIZE) )
{
larger_w = smaller_w;
smaller_w >>= 1;
}
- S32 new_width = ( (F32)getWidth() / smaller_w > THRESHOLD ) ? larger_w : smaller_w;
+ S32 new_width = ( (F32)target_width / smaller_w > THRESHOLD ) ? larger_w : smaller_w;
S32 larger_h = max_dim; // 2^m >= mHeight
S32 smaller_h = max_dim; // 2^(m-1) <= mHeight
- while( (smaller_h > getHeight()) && (smaller_h > MIN_IMAGE_SIZE) )
+ while( (smaller_h > target_height) && (smaller_h > MIN_IMAGE_SIZE) )
{
larger_h = smaller_h;
smaller_h >>= 1;
}
- S32 new_height = ( (F32)getHeight() / smaller_h > THRESHOLD ) ? larger_h : smaller_h;
+ S32 new_height = ( (F32)target_height / smaller_h > THRESHOLD ) ? larger_h : smaller_h;
scale( new_width, new_height );
diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h
index a5fcea97d..153ddf117 100644
--- a/indra/llimage/llimage.h
+++ b/indra/llimage/llimage.h
@@ -177,6 +177,7 @@ public:
LLImageRaw();
LLImageRaw(U16 width, U16 height, S8 components);
LLImageRaw(U8 *data, U16 width, U16 height, S8 components);
+ LLImageRaw(LLImageRaw const* src, U16 width, U16 height, U16 crop_offset, bool crop_vertically);
// Construct using createFromFile (used by tools)
//LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false);
@@ -196,7 +197,8 @@ public:
void expandToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE);
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE);
- void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
+ void biasedScaleToPowerOfTwo(S32 target_width, S32 target_height, S32 max_dim = MAX_IMAGE_SIZE);
+ void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE) { biasedScaleToPowerOfTwo(getWidth(), getHeight(), max_dim); }
BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE );
//BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ;
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1bd830a96..1e21007fc 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -13563,6 +13563,17 @@ Found in Advanced->Rendering->Info Displays
Value
0
+ SnapshotOpenFreezeTime
+
SpeakingColor
- UseFreezeFrame
+ UseFreezeTime