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/newview/llvoavatarself.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ac59aa0907..f6b29f2eb4 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -673,6 +673,7 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return LLVOAvatar::getJoint(name); } // virtual +// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake ) { if (!which_param) @@ -684,6 +685,7 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 } // virtual +// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake ) { if (!param_name) @@ -695,12 +697,14 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BO } // virtual +// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake ) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); return setParamWeight(param,weight,upload_bake); } +// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight, BOOL upload_bake ) { if (!param) @@ -794,6 +798,8 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys, { U32 retval = LLVOAvatar::processUpdateMessage(mesgsys,user_data,block_num,update_type,dp); + // SUNSHINE CLEANUP - does this become relevant again if we don't have to wait for appearance message to tell us where bakes are coming from? + #if 0 // DRANO - it's not clear this does anything useful. If we wait // until an appearance message has been received, we already have @@ -1065,6 +1071,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) // forces an update to any baked textures relevant to type. // will force an upload of the resulting bake if the second parameter is TRUE //----------------------------------------------------------------------------- +// SUNSHINE CLEANUP no upload_result void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_result ) { for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter = LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin(); @@ -1620,6 +1627,7 @@ bool LLVOAvatarSelf::hasPendingBakedUploads() const return false; } +// SUNSHINE CLEANUP no upload_bake void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) { LLViewerTexLayerSet *layer_set = dynamic_cast(layerset); @@ -2690,6 +2698,8 @@ void LLVOAvatarSelf::setNewBakedTexture(LLAvatarAppearanceDefines::EBakedTexture //----------------------------------------------------------------------------- void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) { + // SUNSHINE CLEANUP + llassert(false); // Baked textures live on other sims. LLHost target_host = getObjectHost(); setTEImage( te, LLViewerTextureManager::getFetchedTextureFromHost( uuid, FTT_HOST_BAKE, target_host ) ); -- 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/newview/llvoavatarself.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index f6b29f2eb4..4f2af2c8ee 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -674,38 +674,38 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) } // virtual // SUNSHINE CLEANUP no upload_bake -BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight, BOOL upload_bake ) +BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight) { if (!which_param) { return FALSE; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(which_param->getID()); - return setParamWeight(param,weight,upload_bake); + return setParamWeight(param,weight); } // virtual // SUNSHINE CLEANUP no upload_bake -BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake ) +BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight) { if (!param_name) { return FALSE; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(param_name); - return setParamWeight(param,weight,upload_bake); + return setParamWeight(param,weight); } // virtual // SUNSHINE CLEANUP no upload_bake -BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake ) +BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); - return setParamWeight(param,weight,upload_bake); + return setParamWeight(param,weight); } // SUNSHINE CLEANUP no upload_bake -BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight, BOOL upload_bake ) +BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight) { if (!param) { @@ -729,12 +729,12 @@ BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight LLViewerWearable *wearable = gAgentWearables.getViewerWearable(type,count); if (wearable) { - wearable->setVisualParamWeight(param->getID(), weight, upload_bake); + wearable->setVisualParamWeight(param->getID(), weight); } } } - return LLCharacter::setVisualParamWeight(param,weight,upload_bake); + return LLCharacter::setVisualParamWeight(param,weight); } /*virtual*/ @@ -747,7 +747,7 @@ void LLVOAvatarSelf::updateVisualParams() void LLVOAvatarSelf::idleUpdateAppearanceAnimation() { // Animate all top-level wearable visual parameters - gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); + gAgentWearables.animateAllWearableParams(calcMorphAmount()); // apply wearable visual params to avatar for (U32 type = 0; type < LLWearableType::WT_COUNT; type++) @@ -890,7 +890,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures() { LLViewerTexLayerSet *layerset = getTexLayerSet(i); layerset->setUpdatesEnabled(TRUE); - invalidateComposite(layerset, FALSE); + invalidateComposite(layerset); } updateMeshTextures(); if (getRegion() && !getRegion()->getCentralBakeVersion()) @@ -1094,7 +1094,7 @@ void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_re if (layerset) { layerset->setUpdatesEnabled(true); - invalidateComposite(layerset, upload_result); + invalidateComposite(layerset); } break; } @@ -1628,7 +1628,7 @@ bool LLVOAvatarSelf::hasPendingBakedUploads() const } // SUNSHINE CLEANUP no upload_bake -void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_result ) +void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset) { LLViewerTexLayerSet *layer_set = dynamic_cast(layerset); if( !layer_set || !layer_set->getUpdatesEnabled() ) @@ -1640,6 +1640,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r layer_set->requestUpdate(); layer_set->invalidateMorphMasks(); +#if 0 // SUNSHINE CLEANUP if( upload_result && (getRegion() && !getRegion()->getCentralBakeVersion())) { llassert(isSelf()); @@ -1649,6 +1650,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r layer_set->requestUpload(); updateMeshTextures(); } +#endif } void LLVOAvatarSelf::invalidateAll() @@ -1656,7 +1658,7 @@ void LLVOAvatarSelf::invalidateAll() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { LLViewerTexLayerSet *layerset = getTexLayerSet(i); - invalidateComposite(layerset, TRUE); + invalidateComposite(layerset); } //mDebugSelfLoadTimer.reset(); } @@ -2899,7 +2901,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) if (layer_set) { llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; - gAgentAvatarp->invalidateComposite(layer_set, TRUE); + gAgentAvatarp->invalidateComposite(layer_set); found = TRUE; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } @@ -2936,7 +2938,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) layer_set->cancelUpload(); } - invalidateComposite(layer_set, TRUE); + invalidateComposite(layer_set); LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } else -- 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/newview/llvoavatarself.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4f2af2c8ee..4c568c9bed 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1101,13 +1101,6 @@ void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_re } } } - - // Physics type has no associated baked textures, but change of params needs to be sent to - // other avatars. - if (type == LLWearableType::WT_PHYSICS) - { - gAgent.sendAgentSetAppearance(); - } } //----------------------------------------------------------------------------- @@ -2728,8 +2721,6 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) // RN: throttle uploads if (!hasPendingBakedUploads()) { - gAgent.sendAgentSetAppearance(); - if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { LLSD args; -- cgit v1.2.3 From 48bc05e93ffbd29b3e49c288577bda1712a88392 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 16:14:59 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/newview/llvoavatarself.cpp | 153 ++++++++------------------------------- 1 file changed, 31 insertions(+), 122 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4c568c9bed..4cea3d3f58 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -673,7 +673,6 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return LLVOAvatar::getJoint(name); } // virtual -// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight) { if (!which_param) @@ -685,7 +684,6 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 } // virtual -// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight) { if (!param_name) @@ -697,14 +695,12 @@ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight) } // virtual -// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); return setParamWeight(param,weight); } -// SUNSHINE CLEANUP no upload_bake BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight) { if (!param) @@ -893,10 +889,6 @@ void LLVOAvatarSelf::removeMissingBakedTextures() invalidateComposite(layerset); } updateMeshTextures(); - if (getRegion() && !getRegion()->getCentralBakeVersion()) - { - requestLayerSetUploads(); - } } } @@ -1512,15 +1504,6 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const return TRUE; } -BOOL LLVOAvatarSelf::isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const -{ - const LLViewerTexLayerSet *layerset = getLayerSet(index); - if (!layerset) return FALSE; - const LLViewerTexLayerSetBuffer *layerset_buffer = layerset->getViewerComposite(); - if (!layerset_buffer) return FALSE; - return !layerset_buffer->uploadNeeded(); -} - BOOL LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const { LLUUID id; @@ -1578,49 +1561,11 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t return isTextureVisible(type,index); } - -//----------------------------------------------------------------------------- -// requestLayerSetUploads() -//----------------------------------------------------------------------------- -void LLVOAvatarSelf::requestLayerSetUploads() -{ - for (U32 i = 0; i < mBakedTextureDatas.size(); i++) - { - requestLayerSetUpload((EBakedTextureIndex)i); - } -} - -void LLVOAvatarSelf::requestLayerSetUpload(LLAvatarAppearanceDefines::EBakedTextureIndex i) -{ - ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; - const BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); - LLViewerTexLayerSet *layerset = getLayerSet(i); - if (!layer_baked && layerset) - { - layerset->requestUpload(); - } -} - bool LLVOAvatarSelf::areTexturesCurrent() const { - return !hasPendingBakedUploads() && gAgentWearables.areWearablesLoaded(); -} - -// virtual -bool LLVOAvatarSelf::hasPendingBakedUploads() const -{ - for (U32 i = 0; i < mBakedTextureDatas.size(); i++) - { - LLViewerTexLayerSet* layerset = getTexLayerSet(i); - if (layerset && layerset->getViewerComposite() && layerset->getViewerComposite()->uploadPending()) - { - return true; - } - } - return false; + return gAgentWearables.areWearablesLoaded(); } -// SUNSHINE CLEANUP no upload_bake void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset) { LLViewerTexLayerSet *layer_set = dynamic_cast(layerset); @@ -2694,7 +2639,9 @@ void LLVOAvatarSelf::setNewBakedTexture(LLAvatarAppearanceDefines::EBakedTexture void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) { // SUNSHINE CLEANUP + // If we reinstate processUpdateMessage(), this needs to be updated for server-bake textures. llassert(false); + // Baked textures live on other sims. LLHost target_host = getObjectHost(); setTEImage( te, LLViewerTextureManager::getFetchedTextureFromHost( uuid, FTT_HOST_BAKE, target_host ) ); @@ -2719,40 +2666,37 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) // dumpAvatarTEs( "setNewBakedTexture() send" ); // RN: throttle uploads - if (!hasPendingBakedUploads()) - { - if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) + { + LLSD args; + args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); + args["TIME"] = llformat("%d",(U32)mDebugSelfLoadTimer.getElapsedTimeF32()); + if (isAllLocalTextureDataFinal()) + { + LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args); + LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() + << "sec ]" + << avString() + << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() + << " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32() + << " Notification " << "AvatarRezSelfBakedDoneNotification" + << llendl; + } + else { - LLSD args; - args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32()); - args["TIME"] = llformat("%d",(U32)mDebugSelfLoadTimer.getElapsedTimeF32()); - if (isAllLocalTextureDataFinal()) - { - LLNotificationsUtil::add("AvatarRezSelfBakedDoneNotification",args); - LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() - << "sec ]" - << avString() - << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() - << " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32() - << " Notification " << "AvatarRezSelfBakedDoneNotification" - << llendl; - } - else - { - args["STATUS"] = debugDumpAllLocalTextureDataInfo(); - LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args); - LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() - << "sec ]" - << avString() - << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() - << " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32() - << " Notification " << "AvatarRezSelfBakedUpdateNotification" - << llendl; - } + args["STATUS"] = debugDumpAllLocalTextureDataInfo(); + LLNotificationsUtil::add("AvatarRezSelfBakedUpdateNotification",args); + LL_DEBUGS("Avatar") << "REZTIME: [ " << (U32)mDebugExistenceTimer.getElapsedTimeF32() + << "sec ]" + << avString() + << "RuthTimer " << (U32)mRuthDebugTimer.getElapsedTimeF32() + << " SelfLoadTimer " << (U32)mDebugSelfLoadTimer.getElapsedTimeF32() + << " Notification " << "AvatarRezSelfBakedUpdateNotification" + << llendl; } - - outputRezDiagnostics(); } + + outputRezDiagnostics(); } // FIXME: This is not called consistently. Something may be broken. @@ -2830,40 +2774,6 @@ void LLVOAvatarSelf::reportAvatarRezTime() const // TODO: report mDebugSelfLoadTimer.getElapsedTimeF32() somehow. } -//----------------------------------------------------------------------------- -// setCachedBakedTexture() -// A baked texture id was received from a cache query, make it active -//----------------------------------------------------------------------------- -void LLVOAvatarSelf::setCachedBakedTexture( ETextureIndex te, const LLUUID& uuid ) -{ - setTETexture( te, uuid ); - - /* switch(te) - case TEX_HEAD_BAKED: - if( mHeadLayerSet ) - mHeadLayerSet->cancelUpload(); */ - for (U32 i = 0; i < mBakedTextureDatas.size(); i++) - { - LLViewerTexLayerSet *layerset = getTexLayerSet(i); - if ( mBakedTextureDatas[i].mTextureIndex == te && layerset) - { - if (mInitialBakeIDs[i] != LLUUID::null) - { - if (mInitialBakeIDs[i] == uuid) - { - llinfos << "baked texture correctly loaded at login! " << i << llendl; - } - else - { - llwarns << "baked texture does not match id loaded at login!" << i << llendl; - } - mInitialBakeIDs[i] = LLUUID::null; - } - layerset->cancelUpload(); - } - } -} - // static void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) { @@ -2926,7 +2836,6 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) if (slam_for_debug) { layer_set->setUpdatesEnabled(TRUE); - layer_set->cancelUpload(); } invalidateComposite(layer_set); -- cgit v1.2.3 From 9a8afee83f40e7239d98e6cc8cf3297408f51920 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 19 Sep 2013 17:52:58 -0400 Subject: SH-3455 WIP - removing bake upload code --- indra/newview/llvoavatarself.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 4cea3d3f58..17e6f4e53e 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1063,8 +1063,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) // forces an update to any baked textures relevant to type. // will force an upload of the resulting bake if the second parameter is TRUE //----------------------------------------------------------------------------- -// SUNSHINE CLEANUP no upload_result -void LLVOAvatarSelf::wearableUpdated( LLWearableType::EType type, BOOL upload_result ) +void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type) { for (LLAvatarAppearanceDictionary::BakedTextures::const_iterator baked_iter = LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().begin(); baked_iter != LLAvatarAppearanceDictionary::getInstance()->getBakedTextures().end(); @@ -1577,18 +1576,6 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset) layer_set->requestUpdate(); layer_set->invalidateMorphMasks(); - -#if 0 // SUNSHINE CLEANUP - if( upload_result && (getRegion() && !getRegion()->getCentralBakeVersion())) - { - llassert(isSelf()); - - ETextureIndex baked_te = getBakedTE( layer_set ); - setTEImage( baked_te, LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR) ); - layer_set->requestUpload(); - updateMeshTextures(); - } -#endif } void LLVOAvatarSelf::invalidateAll() -- cgit v1.2.3 From a91b7353b67d3076c87b41097335848364906f7b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 23 Sep 2013 14:54:44 -0400 Subject: SH-3455 WIP - post-SSA cleanup --- indra/newview/llvoavatarself.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 17e6f4e53e..569a2a04cc 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2178,25 +2178,6 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const return text; } - -#if 0 -// Dump avatar metrics data. -LLSD LLVOAvatarSelf::metricsData() -{ - // runway - add region info - LLSD result; - result["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus()); - result["timers"]["debug_existence"] = mDebugExistenceTimer.getElapsedTimeF32(); - result["timers"]["ruth_debug"] = mRuthDebugTimer.getElapsedTimeF32(); - result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32(); - result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32(); - result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32(); - result["startup"] = LLStartUp::getPhases().dumpPhases(); - - return result; -} -#endif - class ViewerAppearanceChangeMetricsResponder: public LLCurl::Responder { LOG_CLASS(ViewerAppearanceChangeMetricsResponder); @@ -2332,7 +2313,7 @@ void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics() std::string viewer_version_short = LLVersionInfo::getShortVersion(); std::string viewer_version_build = llformat("%d", LLVersionInfo::getBuild()); - LLSD msg; // = metricsData(); + LLSD msg; msg["message"] = "ViewerAppearanceChangeMetrics"; msg["session_id"] = gAgentSessionID; msg["agent_id"] = gAgentID; -- cgit v1.2.3 From 029642b2bc3a0bc0bec45af5df5d1e0b1b928b91 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 23 Sep 2013 16:48:49 -0400 Subject: SH-3455 WIP - post-SSA cleanup, including removal of mUseServerBakes and related methods --- indra/newview/llvoavatarself.cpp | 82 ++-------------------------------------- 1 file changed, 3 insertions(+), 79 deletions(-) (limited to 'indra/newview/llvoavatarself.cpp') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 569a2a04cc..88241304cd 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -189,15 +189,6 @@ bool update_avatar_rez_metrics() return false; } -bool check_for_unsupported_baked_appearance() -{ - if (!isAgentAvatarValid()) - return true; - - gAgentAvatarp->checkForUnsupportedServerBakeAppearance(); - return false; -} - void LLVOAvatarSelf::initInstance() { BOOL status = TRUE; @@ -234,7 +225,6 @@ void LLVOAvatarSelf::initInstance() //doPeriodically(output_self_av_texture_diagnostics, 30.0); doPeriodically(update_avatar_rez_metrics, 5.0); - doPeriodically(check_for_unsupported_baked_appearance, 120.0); doPeriodically(boost::bind(&LLVOAvatarSelf::checkStuckAppearance, this), 30.0); } @@ -708,14 +698,6 @@ BOOL LLVOAvatarSelf::setParamWeight(const LLViewerVisualParam *param, F32 weight return FALSE; } -#if 0 - // FIXME DRANO - kludgy way to avoid overwriting avatar state from wearables. - if (isUsingServerBakes() && !isUsingLocalAppearance()) - { - return FALSE; - } -#endif - if (param->getCrossWearable()) { LLWearableType::EType type = (LLWearableType::EType)param->getWearableType(); @@ -794,7 +776,9 @@ U32 LLVOAvatarSelf::processUpdateMessage(LLMessageSystem *mesgsys, { U32 retval = LLVOAvatar::processUpdateMessage(mesgsys,user_data,block_num,update_type,dp); - // SUNSHINE CLEANUP - does this become relevant again if we don't have to wait for appearance message to tell us where bakes are coming from? + // SUNSHINE CLEANUP - does this become relevant again if we don't + // have to wait for appearance message to tell us where bakes are + // coming from? #if 0 // DRANO - it's not clear this does anything useful. If we wait @@ -2376,66 +2360,6 @@ void LLVOAvatarSelf::sendViewerAppearanceChangeMetrics() } } -class CheckAgentAppearanceServiceResponder: public LLHTTPClient::Responder -{ - LOG_CLASS(CheckAgentAppearanceServiceResponder); -public: - CheckAgentAppearanceServiceResponder() - { - } - - virtual ~CheckAgentAppearanceServiceResponder() - { - } - -private: - /* virtual */ void httpSuccess() - { - LL_DEBUGS("Avatar") << "OK" << llendl; - } - - // Error - /*virtual*/ void httpFailure() - { - if (isAgentAvatarValid()) - { - LL_DEBUGS("Avatar") << "failed, will rebake " - << dumpResponse() << LL_ENDL; - forceAppearanceUpdate(); - } - } - -public: - static void forceAppearanceUpdate() - { - // Trying to rebake immediately after crossing region boundary - // seems to be failure prone; adding a delay factor. Yes, this - // fix is ad-hoc and not guaranteed to work in all cases. - doAfterInterval(boost::bind(&LLVOAvatarSelf::forceBakeAllTextures, - gAgentAvatarp.get(), true), 5.0); - } -}; - -void LLVOAvatarSelf::checkForUnsupportedServerBakeAppearance() -{ - // Need to check only if we have a server baked appearance and are - // in a non-baking region. - if (!gAgentAvatarp->isUsingServerBakes()) - return; - if (!gAgent.getRegion() || gAgent.getRegion()->getCentralBakeVersion()!=0) - return; - - // if baked image service is unknown, need to refresh. - if (LLAppearanceMgr::instance().getAppearanceServiceURL().empty()) - { - CheckAgentAppearanceServiceResponder::forceAppearanceUpdate(); - } - // query baked image service to check status. - std::string image_url = gAgentAvatarp->getImageURL(TEX_HEAD_BAKED, - getTE(TEX_HEAD_BAKED)->getID()); - LLHTTPClient::head(image_url, new CheckAgentAppearanceServiceResponder); -} - const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const { if (canGrabBakedTexture(baked_index)) -- cgit v1.2.3