summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llagent.cpp2
-rwxr-xr-xindra/newview/llagentwearables.cpp2
-rwxr-xr-xindra/newview/llappearancemgr.cpp10
-rwxr-xr-xindra/newview/llappearancemgr.h2
-rw-r--r--indra/newview/llviewerregion.cpp12
-rw-r--r--indra/newview/llviewerregion.h3
-rwxr-xr-xindra/newview/llvoavatar.cpp4
-rwxr-xr-xindra/newview/llvoavatar.h7
-rwxr-xr-xindra/newview/llvoavatarself.cpp24
-rwxr-xr-xindra/newview/llvoavatarself.h1
10 files changed, 32 insertions, 35 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 698f89ef26..2379c23969 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4260,7 +4260,7 @@ void LLAgent::requestLeaveGodMode()
//-----------------------------------------------------------------------------
void LLAgent::sendAgentSetAppearance()
{
- if (!isAgentAvatarValid() || LLAppearanceMgr::instance().useServerTextureBaking()) return;
+ if (!isAgentAvatarValid() || (getRegion() && getRegion()->getCentralBakeVersion())) return;
if (gAgentQueryManager.mNumPendingQueries > 0 && (isAgentAvatarValid() && gAgentAvatarp->isUsingBakedTextures()))
{
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 0a721312f3..e44b27c6af 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1597,7 +1597,7 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* n
void LLAgentWearables::queryWearableCache()
{
- if (!areWearablesLoaded() || LLAppearanceMgr::instance().useServerTextureBaking())
+ if (!areWearablesLoaded() || (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion()))
{
return;
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 0c7f89203e..3e02f98933 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1744,7 +1744,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
updateIsDirty();
// Send server request for appearance update
- if (useServerTextureBaking())
+ if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion())
{
requestServerAppearanceUpdate();
}
@@ -2600,14 +2600,6 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id, bool update_base
if (inventory_changed) gInventory.notifyObservers();
}
-// Should be true iff both the appropriate debug setting is enabled
-// and the corresponding cap has been found.
-bool LLAppearanceMgr::useServerTextureBaking()
-{
- // TODO: add cap check.
- return gSavedSettings.getBOOL("UseServerTextureBaking");
-}
-
class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder
{
public:
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 45291419c7..742833211a 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -185,8 +185,6 @@ public:
bool isInUpdateAppearanceFromCOF() { return mIsInUpdateAppearanceFromCOF; }
- bool useServerTextureBaking();
-
void requestServerAppearanceUpdate();
protected:
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index fabfde0526..c6f1be4483 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1450,6 +1450,18 @@ void LLViewerRegion::unpackRegionHandshake()
mProductName = productName;
}
+
+ mCentralBakeVersion = (S32)gSavedSettings.getBOOL("UseServerTextureBaking");
+ /*
+ if (msg->getSize("RegionInfo4", "CentralBakesVersion") > 0)
+ {
+ msg->getS32("RegionInfo4", "CentralBakesVersion", mCentralBakeVersion);
+ }
+ else
+ {
+ mCentralBakeVersion = 0;
+ }
+ */
LLVLComposition *compp = getComposition();
if (compp)
{
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index c9fffaf30e..2ddb17f171 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -278,6 +278,8 @@ public:
F32 getLandHeightRegion(const LLVector3& region_pos);
+ U8 getCentralBakeVersion() { return mCentralBakeVersion; }
+
void getInfo(LLSD& info);
bool meshRezEnabled() const;
@@ -395,6 +397,7 @@ private:
F32 mBillableFactor;
U32 mMaxTasks; // max prim count
F32 mCameraDistanceSquared; // updated once per frame
+ U8 mCentralBakeVersion;
// Information for Homestead / CR-53
S32 mClassID;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8d9109d9ff..4894f21e67 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4738,7 +4738,7 @@ void LLVOAvatar::setTexEntry(const U8 index, const LLTextureEntry &te)
const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid)
{
std::string url = "";
- if (LLAppearanceMgr::instance().useServerTextureBaking() && !gSavedSettings.getString("AgentAppearanceServiceURL").empty())
+ if (mUseServerBakes && !gSavedSettings.getString("AgentAppearanceServiceURL").empty())
{
const LLVOAvatarDictionary::TextureEntry* texture_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)te);
if (texture_entry != NULL)
@@ -7336,7 +7336,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
if( isSelf() )
{
llwarns << avString() << "Received AvatarAppearance for self" << llendl;
- if( mFirstTEMessageReceived && !LLAppearanceMgr::instance().useServerTextureBaking())
+ if( mFirstTEMessageReceived && !mUseServerBakes)
{
// llinfos << "processAvatarAppearance end " << mID << llendl;
return;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a32e7567ad..3f65dec11c 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -710,13 +710,14 @@ public:
//--------------------------------------------------------------------
public:
BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; }
+ BOOL isUsingBakedTextures() const { return mUseServerBakes; } // e.g. false if in appearance edit mode
private:
BOOL mAppearanceAnimating;
LLFrameTimer mAppearanceMorphTimer;
F32 mLastAppearanceBlendTime;
- BOOL mIsEditingAppearance;
- BOOL mUseLocalAppearance;
- BOOL mUseServerBakes;
+ BOOL mIsEditingAppearance; // flag for if we're actively in appearance editing mode
+ BOOL mUseLocalAppearance; // flag for if we're using a local composite
+ BOOL mUseServerBakes; // flag for if baked textures should be fetched from baking service (false if they're temporary uploads)
//--------------------------------------------------------------------
// Clothing colors (convenience functions to access visual parameters)
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b3e5054e78..3604a373ad 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -885,7 +885,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
invalidateComposite(mBakedTextureDatas[i].mTexLayerSet, FALSE);
}
updateMeshTextures();
- if (!LLAppearanceMgr::instance().useServerTextureBaking())
+ if (getRegion() && !getRegion()->getCentralBakeVersion())
{
requestLayerSetUploads();
}
@@ -1631,7 +1631,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL upload_r
layerset->requestUpdate();
layerset->invalidateMorphMasks();
- if( upload_result && !LLAppearanceMgr::instance().useServerTextureBaking())
+ if( upload_result && (getRegion() && !getRegion()->getCentralBakeVersion()))
{
llassert(isSelf());
@@ -2614,15 +2614,6 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**)
}
}
-BOOL LLVOAvatarSelf::isUsingBakedTextures() const
-{
- // Composite textures are used during appearance mode.
- if (gAgentCamera.cameraCustomizeAvatar())
- return FALSE;
-
- return TRUE;
-}
-
void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug)
{
@@ -2723,14 +2714,15 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch)
// static
void LLVOAvatarSelf::onCustomizeEnd(bool disable_camera_switch)
{
- gAgentAvatarp->mIsEditingAppearance = false;
- if (!LLAppearanceMgr::instance().useServerTextureBaking())
- {
- gAgentAvatarp->mUseLocalAppearance = false;
- }
if (isAgentAvatarValid())
{
+ gAgentAvatarp->mIsEditingAppearance = false;
+ if (gAgentAvatarp->getRegion() && !gAgentAvatarp->getRegion()->getCentralBakeVersion())
+ {
+ gAgentAvatarp->mUseLocalAppearance = false;
+ }
+
gAgentAvatarp->invalidateAll();
if (gSavedSettings.getBOOL("AppearanceCameraMovement") && !disable_camera_switch)
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index e555a566c5..92d59dc9e1 100755
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -239,7 +239,6 @@ public:
void setCachedBakedTexture(LLVOAvatarDefines::ETextureIndex i, const LLUUID& uuid);
void forceBakeAllTextures(bool slam_for_debug = false);
static void processRebakeAvatarTextures(LLMessageSystem* msg, void**);
- BOOL isUsingBakedTextures() const; // e.g. false if in appearance edit mode
protected:
/*virtual*/ void removeMissingBakedTextures();