diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-10-28 09:33:57 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-10-28 09:33:57 -0400 |
commit | 5dcd81c15507ad8f487e5727bc7a94de82f6fb45 (patch) | |
tree | b1df07956c4883bbf336c36e9701a1e0f2eb2f00 /indra | |
parent | dd2caad496b6a1fd34f987044f25223311ca3d46 (diff) |
SL-451 - avoid more high-cost string operations in a per-frame function
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 6 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.h | 1 | ||||
-rw-r--r-- | indra/newview/llskinningutil.cpp | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index c98cee218c..db6d00bc2c 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1387,13 +1387,15 @@ bool LLModel::loadDecomposition(LLSD& header, std::istream& is) LLMeshSkinInfo::LLMeshSkinInfo(): mPelvisOffset(0.0), - mLockScaleIfJointPosition(false) + mLockScaleIfJointPosition(false), + mInvalidJointsScrubbed(false) { } LLMeshSkinInfo::LLMeshSkinInfo(LLSD& skin): mPelvisOffset(0.0), - mLockScaleIfJointPosition(false) + mLockScaleIfJointPosition(false), + mInvalidJointsScrubbed(false) { fromLLSD(skin); } diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 40c3916168..097558ef67 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -56,6 +56,7 @@ public: LLMatrix4 mBindShapeMatrix; float mPelvisOffset; bool mLockScaleIfJointPosition; + bool mInvalidJointsScrubbed; }; class LLModel : public LLVolume diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp index c0589e33bb..b2fd1744bc 100644 --- a/indra/newview/llskinningutil.cpp +++ b/indra/newview/llskinningutil.cpp @@ -53,6 +53,10 @@ U32 LLSkinningUtil::getMeshJointCount(const LLMeshSkinInfo *skin) // static void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin) { + if (skin->mInvalidJointsScrubbed) + { + return; + } for (U32 j = 0; j < skin->mJointNames.size(); ++j) { // Fix invalid names to "mPelvis". Currently meshes with @@ -63,6 +67,7 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin skin->mJointNames[j] = "mPelvis"; } } + skin->mInvalidJointsScrubbed = true; } // static |