diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-09-26 06:36:24 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-09-26 06:36:24 -0400 |
commit | ae0bb922909af95d96c140c1d74a4f39a264d4ec (patch) | |
tree | aa75f1525641908cfa99777e11ff2ccf9228221e | |
parent | f3d52b8d54c3be67262d4d8ae9a00253e9d55249 (diff) |
renamed isUsingBakedTextures to more accurate isUsingServerBakes. Commented some areas we are probably using the function incorrectly
-rwxr-xr-x[-rw-r--r--] | indra/llappearance/llavatarappearance.h | 4 | ||||
-rw-r--r-- | indra/llappearance/lltexlayerparams.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llagent.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewertexlayer.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.h | 17 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.cpp | 6 |
7 files changed, 30 insertions, 10 deletions
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index 5726ff62d1..2aa43d25d2 100644..100755 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -106,7 +106,9 @@ public: public: virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent virtual BOOL isValid() const; - virtual BOOL isUsingBakedTextures() const = 0; + virtual BOOL isUsingServerBakes() const = 0; + virtual BOOL isUsingLocalAppearance() const = 0; + virtual BOOL isEditingAppearance() const = 0; bool isBuilt() const { return mIsBuilt; } diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 82c92b5a5e..651468b1a5 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -176,7 +176,7 @@ 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. { - if (!mAvatarAppearance->isUsingBakedTextures()) + if (!mAvatarAppearance->isUsingServerBakes()) { upload_bake = FALSE; } diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4e05836bca..fe48abc25a 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3630,7 +3630,8 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * return; } - if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures()) + // FIXME DRANO wrong check + if (isAgentAvatarValid() && !gAgentAvatarp->isUsingServerBakes()) { // ignore baked textures when in customize mode return; @@ -4262,7 +4263,7 @@ void LLAgent::sendAgentSetAppearance() { if (!isAgentAvatarValid() || (getRegion() && getRegion()->getCentralBakeVersion())) return; - if (gAgentQueryManager.mNumPendingQueries > 0 && (isAgentAvatarValid() && gAgentAvatarp->isUsingBakedTextures())) + if (gAgentQueryManager.mNumPendingQueries > 0 && (isAgentAvatarValid() && gAgentAvatarp->isUsingServerBakes())) { return; } diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index f516562c2f..463906d3ef 100644 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -285,7 +285,8 @@ BOOL LLViewerTexLayerSetBuffer::uploadInProgress() const BOOL LLViewerTexLayerSetBuffer::isReadyToUpload() const { if (!gAgentQueryManager.hasNoPendingQueries()) return FALSE; // Can't upload if there are pending queries. - if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures()) return FALSE; // Don't upload if avatar is using composites. + // FIXME DRANO + if (isAgentAvatarValid() && !gAgentAvatarp->isUsingServerBakes()) return FALSE; // Don't upload if avatar is using composites. BOOL ready = FALSE; if (getViewerTexLayerSet()->isLocalTextureDataFinal()) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0cad2e3ec6..aa3cf3bb9c 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4731,7 +4731,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) gResizeScreenTexture = TRUE; gWindowResized = TRUE; - if (isAgentAvatarValid() && !gAgentAvatarp->isUsingBakedTextures()) + // FIXME DRANO + if (isAgentAvatarValid() && !gAgentAvatarp->isUsingServerBakes()) { LLVisualParamHint::requestHintUpdates(); } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 96e87279b2..10c081cf68 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -208,7 +208,6 @@ public: public: virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent - /*virtual*/BOOL isUsingBakedTextures() const { return mUseServerBakes; } // e.g. false if in appearance edit mode private: //aligned members LL_ALIGN_16(LLVector4a mImpostorExtents[2]); @@ -636,7 +635,21 @@ public: //-------------------------------------------------------------------- public: BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; } - BOOL isUsingLocalAppearance() const { return mUseLocalAppearance; } + + // True if we are computing our appearance via local compositing + // instead of baked textures, as for example during wearable + // editing or when waiting for a subsequent server rebake. + /*virtual*/ BOOL isUsingLocalAppearance() const { return mUseLocalAppearance; } + + // True if this avatar should fetch its baked textures via the new + // appearance mechanism. + /*virtual*/ BOOL isUsingServerBakes() const { return mUseServerBakes; } + + // True if we are currently in appearance editing mode. Often but + // not always the same as isUsingLocalAppearance(). + /*virtual*/ BOOL isEditingAppearance() const { return mIsEditingAppearance; } + + // FIXME review isUsingLocalAppearance uses, some should be isEditing instead. private: BOOL mAppearanceAnimating; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c5bb4c3700..d6d1853bec 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1274,7 +1274,8 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr discard_level < local_tex_obj->getDiscard()) { local_tex_obj->setDiscard(discard_level); - if (isUsingBakedTextures()) + // FIXME DRANO + if (isUsingServerBakes()) { requestLayerSetUpdate(index); } @@ -1758,7 +1759,8 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te local_tex_obj->setDiscard(tex_discard); if (isSelf()) { - if (gAgentAvatarp->isUsingBakedTextures()) + // FIXME DRANO + if (gAgentAvatarp->isUsingServerBakes()) { requestLayerSetUpdate(type); } |