From 36bb33b12ab090e2acbc7e00039cdff682882fa4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 18 Sep 2013 17:03:34 -0400 Subject: sunshine cleanup annotations --- indra/llappearance/lltexlayerparams.cpp | 5 +++++ 1 file changed, 5 insertions(+) mode change 100644 => 100755 indra/llappearance/lltexlayerparams.cpp (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp old mode 100644 new mode 100755 index 6aae9a8cc1..cd48dcece4 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -160,6 +160,7 @@ BOOL LLTexLayerParamAlpha::getMultiplyBlend() const return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend; } +// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) { if (mIsAnimating || mTexLayer == NULL) @@ -184,6 +185,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) } } +// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake) { // do not animate dummy parameters @@ -202,6 +204,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake } } +// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake) { if (mNext) @@ -449,6 +452,8 @@ LLColor4 LLTexLayerParamColor::getNetColor() const } } + +// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) { if (mIsAnimating) -- cgit v1.2.3 From 82f147367fb5e4ee4bbe53db01856ea375058825 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 11:10:59 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/llappearance/lltexlayerparams.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index cd48dcece4..6d4001958e 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -161,7 +161,7 @@ BOOL LLTexLayerParamAlpha::getMultiplyBlend() const } // SUNSHINE CLEANUP no upload_bake -void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) +void LLTexLayerParamAlpha::setWeight(F32 weight) { if (mIsAnimating || mTexLayer == NULL) { @@ -179,37 +179,37 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { - mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet(), upload_bake); + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); mTexLayer->invalidateMorphMasks(); } } } // SUNSHINE CLEANUP no upload_bake -void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL upload_bake) +void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value) { // do not animate dummy parameters if (mIsDummy) { - setWeight(target_value, upload_bake); + setWeight(target_value); return; } mTargetWeight = target_value; - setWeight(target_value, upload_bake); + setWeight(target_value); mIsAnimating = TRUE; if (mNext) { - mNext->setAnimationTarget(target_value, upload_bake); + mNext->setAnimationTarget(target_value); } } // SUNSHINE CLEANUP no upload_bake -void LLTexLayerParamAlpha::animate(F32 delta, BOOL upload_bake) +void LLTexLayerParamAlpha::animate(F32 delta) { if (mNext) { - mNext->animate(delta, upload_bake); + mNext->animate(delta); } } @@ -454,7 +454,7 @@ LLColor4 LLTexLayerParamColor::getNetColor() const // SUNSHINE CLEANUP no upload_bake -void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) +void LLTexLayerParamColor::setWeight(F32 weight) { if (mIsAnimating) { @@ -479,10 +479,10 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { - onGlobalColorChanged(upload_bake); + onGlobalColorChanged(); if (mTexLayer) { - mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet(), upload_bake); + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); } } @@ -490,23 +490,23 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL upload_bake) } } -void LLTexLayerParamColor::setAnimationTarget(F32 target_value, BOOL upload_bake) +void LLTexLayerParamColor::setAnimationTarget(F32 target_value) { // set value first then set interpolating flag to ignore further updates mTargetWeight = target_value; - setWeight(target_value, upload_bake); + setWeight(target_value); mIsAnimating = TRUE; if (mNext) { - mNext->setAnimationTarget(target_value, upload_bake); + mNext->setAnimationTarget(target_value); } } -void LLTexLayerParamColor::animate(F32 delta, BOOL upload_bake) +void LLTexLayerParamColor::animate(F32 delta) { if (mNext) { - mNext->animate(delta, upload_bake); + mNext->animate(delta); } } -- cgit v1.2.3 From d58e7cfbfcec163345e87c0c5e5f74d01075246b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 13:59:20 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/llappearance/lltexlayerparams.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 6d4001958e..80aded450d 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -160,7 +160,6 @@ BOOL LLTexLayerParamAlpha::getMultiplyBlend() const return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend; } -// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::setWeight(F32 weight) { if (mIsAnimating || mTexLayer == NULL) @@ -185,7 +184,6 @@ void LLTexLayerParamAlpha::setWeight(F32 weight) } } -// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value) { // do not animate dummy parameters @@ -204,7 +202,6 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value) } } -// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamAlpha::animate(F32 delta) { if (mNext) @@ -453,7 +450,6 @@ LLColor4 LLTexLayerParamColor::getNetColor() const } -// SUNSHINE CLEANUP no upload_bake void LLTexLayerParamColor::setWeight(F32 weight) { if (mIsAnimating) -- cgit v1.2.3 From b42c70173c032d3362fce438a49100fbe7608a4d Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Wed, 16 Oct 2013 15:28:10 -0400 Subject: SH-3455 BUILDFIX Updating linux appearance utility to use the new refactor Eliminated some unnecessary functions that the refactor took care of, linux build should be fixed. --- indra/llappearance/lltexlayerparams.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 80aded450d..5e9d9a658b 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -178,7 +178,6 @@ void LLTexLayerParamAlpha::setWeight(F32 weight) if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { - mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); mTexLayer->invalidateMorphMasks(); } } @@ -466,22 +465,6 @@ void LLTexLayerParamColor::setWeight(F32 weight) if (cur_u8 != new_u8) { mCurWeight = new_weight; - - if (info->mNumColors <= 0) - { - // This will happen when we set the default weight the first time. - return; - } - - if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. - { - onGlobalColorChanged(); - if (mTexLayer) - { - mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); - } - } - // llinfos << "param " << mName << " = " << new_weight << llendl; } } -- cgit v1.2.3 From dba221e0ac89b1505ddd3b896946286d5d1cf3d8 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 17 Oct 2013 16:12:37 -0400 Subject: SH-4160 WIP, build fix --- indra/llappearance/lltexlayerparams.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 5e9d9a658b..36147f01e0 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -456,7 +456,6 @@ void LLTexLayerParamColor::setWeight(F32 weight) return; } - const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)getInfo(); F32 min_weight = getMinWeight(); F32 max_weight = getMaxWeight(); F32 new_weight = llclamp(weight, min_weight, max_weight); -- cgit v1.2.3 From b1838f02bc6c4a052c68fc6bbf3106e3a796a1a2 Mon Sep 17 00:00:00 2001 From: Nyx Linden Date: Fri, 25 Oct 2013 16:43:36 -0400 Subject: SH-4572 FIX changing clothing parameters do not take effect in edit appearance fix, new back-end utility and restoring the necessary functionality. --- indra/llappearance/lltexlayerparams.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 36147f01e0..9608e2d391 100755 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -178,6 +178,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight) if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); mTexLayer->invalidateMorphMasks(); } } @@ -464,6 +465,24 @@ void LLTexLayerParamColor::setWeight(F32 weight) if (cur_u8 != new_u8) { mCurWeight = new_weight; + + const LLTexLayerParamColorInfo *info = (LLTexLayerParamColorInfo *)getInfo(); + + if (info->mNumColors <= 0) + { + // This will happen when we set the default weight the first time. + return; + } + + if ((mAvatarAppearance->getSex() & getSex()) && (mAvatarAppearance->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. + { + onGlobalColorChanged(); + if (mTexLayer) + { + mAvatarAppearance->invalidateComposite(mTexLayer->getTexLayerSet()); + } + } + // llinfos << "param " << mName << " = " << new_weight << llendl; } } -- cgit v1.2.3 From 0160c514c5e0bc3e575b33ef27924a9c8c7c30cf Mon Sep 17 00:00:00 2001 From: Stinson Linden Date: Fri, 23 May 2014 21:56:44 +0100 Subject: MAINT-4077: Refactoring to add copy constructors to the LLVisualParam class and all of its derived descendants in order to clarify ownership of memory pointers. --- indra/llappearance/lltexlayerparams.cpp | 58 ++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 16 deletions(-) (limited to 'indra/llappearance/lltexlayerparams.cpp') diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index f1f7d07fa9..e04851aa71 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -40,7 +40,8 @@ //----------------------------------------------------------------------------- // LLTexLayerParam //----------------------------------------------------------------------------- -LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) : +LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) + : LLViewerVisualParam(), mTexLayer(layer), mAvatarAppearance(NULL) { @@ -54,12 +55,19 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) : } } -LLTexLayerParam::LLTexLayerParam(LLAvatarAppearance *appearance) : +LLTexLayerParam::LLTexLayerParam(LLAvatarAppearance *appearance) + : LLViewerVisualParam(), mTexLayer(NULL), mAvatarAppearance(appearance) { } +LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther) + : LLViewerVisualParam(pOther), + mTexLayer(pOther.mTexLayer), + mAvatarAppearance(pOther.mAvatarAppearance) +{ +} BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance) { @@ -112,9 +120,11 @@ void LLTexLayerParamAlpha::getCacheByteCount(S32* gl_bytes) } } -LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) : - LLTexLayerParam(layer), +LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) + : LLTexLayerParam(layer), mCachedProcessedTexture(NULL), + mStaticImageTGA(), + mStaticImageRaw(), mNeedsCreateTexture(FALSE), mStaticImageInvalid(FALSE), mAvgDistortionVec(1.f, 1.f, 1.f), @@ -123,9 +133,11 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) : sInstances.push_front(this); } -LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) : - LLTexLayerParam(appearance), +LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) + : LLTexLayerParam(appearance), mCachedProcessedTexture(NULL), + mStaticImageTGA(), + mStaticImageRaw(), mNeedsCreateTexture(FALSE), mStaticImageInvalid(FALSE), mAvgDistortionVec(1.f, 1.f, 1.f), @@ -134,6 +146,18 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) : sInstances.push_front(this); } +LLTexLayerParamAlpha::LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther) + : LLTexLayerParam(pOther), + mCachedProcessedTexture(pOther.mCachedProcessedTexture), + mStaticImageTGA(pOther.mStaticImageTGA), + mStaticImageRaw(pOther.mStaticImageRaw), + mNeedsCreateTexture(pOther.mNeedsCreateTexture), + mStaticImageInvalid(pOther.mStaticImageInvalid), + mAvgDistortionVec(pOther.mAvgDistortionVec), + mCachedEffectiveWeight(pOther.mCachedEffectiveWeight) +{ + sInstances.push_front(this); +} LLTexLayerParamAlpha::~LLTexLayerParamAlpha() { @@ -143,9 +167,7 @@ LLTexLayerParamAlpha::~LLTexLayerParamAlpha() /*virtual*/ LLViewerVisualParam* LLTexLayerParamAlpha::cloneParam(LLWearable* wearable) const { - LLTexLayerParamAlpha *new_param = new LLTexLayerParamAlpha(mTexLayer); - *new_param = *this; - return new_param; + return new LLTexLayerParamAlpha(*this); } void LLTexLayerParamAlpha::deleteCaches() @@ -399,27 +421,31 @@ BOOL LLTexLayerParamAlphaInfo::parseXml(LLXmlTreeNode* node) -LLTexLayerParamColor::LLTexLayerParamColor(LLTexLayerInterface* layer) : - LLTexLayerParam(layer), +LLTexLayerParamColor::LLTexLayerParamColor(LLTexLayerInterface* layer) + : LLTexLayerParam(layer), mAvgDistortionVec(1.f, 1.f, 1.f) { } -LLTexLayerParamColor::LLTexLayerParamColor(LLAvatarAppearance *appearance) : - LLTexLayerParam(appearance), +LLTexLayerParamColor::LLTexLayerParamColor(LLAvatarAppearance *appearance) + : LLTexLayerParam(appearance), mAvgDistortionVec(1.f, 1.f, 1.f) { } +LLTexLayerParamColor::LLTexLayerParamColor(const LLTexLayerParamColor& pOther) + : LLTexLayerParam(pOther), + mAvgDistortionVec(pOther.mAvgDistortionVec) +{ +} + LLTexLayerParamColor::~LLTexLayerParamColor() { } /*virtual*/ LLViewerVisualParam* LLTexLayerParamColor::cloneParam(LLWearable* wearable) const { - LLTexLayerParamColor *new_param = new LLTexLayerParamColor(mTexLayer); - *new_param = *this; - return new_param; + return new LLTexLayerParamColor(*this); } LLColor4 LLTexLayerParamColor::getNetColor() const -- cgit v1.2.3