summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventory.cpp24
-rw-r--r--indra/llinventory/llinventory.h2
-rw-r--r--indra/llinventory/llsettingsbase.cpp4
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp3
-rw-r--r--indra/llinventory/llsettingssky.cpp22
-rw-r--r--indra/llinventory/llsettingssky.h3
-rw-r--r--indra/llinventory/llsettingswater.cpp8
7 files changed, 24 insertions, 42 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 18bc1b5a91..81261f0767 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -74,20 +74,17 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType type,
const std::string& name)
-: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
- mUUID(uuid),
+: mUUID(uuid),
mParentUUID(parent_uuid),
mType(type),
mName(name),
mCreationDate(0)
{
- claimMem(mName);
correctInventoryName(mName);
}
LLInventoryObject::LLInventoryObject()
-: LLTrace::MemTrackable<LLInventoryObject>("LLInventoryObject"),
- mType(LLAssetType::AT_NONE),
+: mType(LLAssetType::AT_NONE),
mCreationDate(0)
{
}
@@ -101,9 +98,7 @@ void LLInventoryObject::copyObject(const LLInventoryObject* other)
mUUID = other->mUUID;
mParentUUID = other->mParentUUID;
mType = other->mType;
- disclaimMem(mName);
mName = other->mName;
- claimMem(mName);
}
const LLUUID& LLInventoryObject::getUUID() const
@@ -156,9 +151,7 @@ void LLInventoryObject::rename(const std::string& n)
correctInventoryName(new_name);
if( !new_name.empty() && new_name != mName )
{
- disclaimMem(mName);
mName = new_name;
- claimMem(mName);
}
}
@@ -311,7 +304,6 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
LLStringUtil::replaceChar(mDescription, '|', ' ');
- claimMem(mDescription);
mPermissions.initMasks(inv_type);
}
@@ -344,9 +336,7 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
copyObject(other);
mPermissions = other->mPermissions;
mAssetUUID = other->mAssetUUID;
- disclaimMem(mDescription);
mDescription = other->mDescription;
- claimMem(mDescription);
mSaleInfo = other->mSaleInfo;
mInventoryType = other->mInventoryType;
mFlags = other->mFlags;
@@ -426,9 +416,7 @@ void LLInventoryItem::setDescription(const std::string& d)
LLInventoryItem::correctInventoryDescription(new_desc);
if( new_desc != mDescription )
{
- disclaimMem(mDescription);
mDescription = new_desc;
- claimMem(mDescription);
}
}
@@ -708,10 +696,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
valuestr[0] = '\000';
}
- disclaimMem(mDescription);
mDescription.assign(valuestr);
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
- claimMem(mDescription);
/* TODO -- ask Ian about this code
const char *donkey = mDescription.c_str();
if (donkey[0] == '|')
@@ -840,11 +826,9 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
-LLTrace::BlockTimerStatHandle FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
-
bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
{
- LL_RECORD_BLOCK_TIME(FTM_INVENTORY_SD_DESERIALIZE);
+ LL_PROFILE_ZONE_SCOPED;
if (is_new)
{
// If we're adding LLSD to an existing object, need avoid
@@ -961,10 +945,8 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
w = INV_DESC_LABEL;
if (sd.has(w))
{
- disclaimMem(mDescription);
mDescription = sd[w].asString();
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
- claimMem(mDescription);
}
w = INV_CREATION_DATE_LABEL;
if (sd.has(w))
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 0f336a072f..7d9f9704f1 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -44,7 +44,7 @@ class LLMessageSystem;
// Base class for anything in the user's inventory. Handles the common code
// between items and categories.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLInventoryObject : public LLRefCount, public LLTrace::MemTrackable<LLInventoryObject>
+class LLInventoryObject : public LLRefCount
{
public:
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 8a8e2bb340..aed972b150 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -683,6 +683,7 @@ bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, U32, S32 length)
//=========================================================================
void LLSettingsBlender::update(const LLSettingsBase::BlendFactor& blendf)
{
+ LL_PROFILE_ZONE_SCOPED;
F64 res = setBlendFactor(blendf);
llassert(res >= 0.0 && res <= 1.0);
(void)res;
@@ -713,6 +714,7 @@ F64 LLSettingsBlender::setBlendFactor(const LLSettingsBase::BlendFactor& blendf_
void LLSettingsBlender::triggerComplete()
{
+ LL_PROFILE_ZONE_SCOPED;
if (mTarget)
mTarget->replaceSettings(mFinal->getSettings());
LLSettingsBlender::ptr_t hold = shared_from_this(); // prevents this from deleting too soon
@@ -725,11 +727,13 @@ const LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::MIN_BLEND_DELTA(FL
LLSettingsBase::BlendFactor LLSettingsBlenderTimeDelta::calculateBlend(const LLSettingsBase::TrackPosition& spanpos, const LLSettingsBase::TrackPosition& spanlen) const
{
+ LL_PROFILE_ZONE_SCOPED;
return LLSettingsBase::BlendFactor(fmod((F64)spanpos, (F64)spanlen) / (F64)spanlen);
}
bool LLSettingsBlenderTimeDelta::applyTimeDelta(const LLSettingsBase::Seconds& timedelta)
{
+ LL_PROFILE_ZONE_SCOPED;
mTimeSpent += timedelta;
if (mTimeSpent > mBlendSpan)
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 2bb03e8391..241826604f 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -41,9 +41,6 @@
//=========================================================================
namespace
{
- LLTrace::BlockTimerStatHandle FTM_BLEND_WATERVALUES("Blending Water Environment Day");
- LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERVALUES("Update Water Environment Day");
-
template<typename T>
inline T get_wrapping_distance(T begin, T end)
{
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 1470edbf38..979a284744 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -66,11 +66,6 @@ namespace {
}
}
-static LLTrace::BlockTimerStatHandle FTM_BLEND_SKYVALUES("Blending Sky Environment");
-static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_SKYVALUES("Recalculate Sky");
-static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_BODIES("Recalculate Heavenly Bodies");
-static LLTrace::BlockTimerStatHandle FTM_RECALCULATE_LIGHTING("Recalculate Lighting");
-
//=========================================================================
const std::string LLSettingsSky::SETTING_AMBIENT("ambient");
const std::string LLSettingsSky::SETTING_BLUE_DENSITY("blue_density");
@@ -444,6 +439,7 @@ void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother)
void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf)
{
+ LL_PROFILE_ZONE_SCOPED;
llassert(getSettingsType() == end->getSettingsType());
LLSettingsSky::ptr_t other = PTR_NAMESPACE::dynamic_pointer_cast<LLSettingsSky>(end);
@@ -939,7 +935,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
void LLSettingsSky::updateSettings()
{
- LL_RECORD_BLOCK_TIME(FTM_RECALCULATE_SKYVALUES);
+ LL_PROFILE_ZONE_SCOPED;
// base class clears dirty flag so as to not trigger recursive update
LLSettingsBase::updateSettings();
@@ -1022,6 +1018,7 @@ LLColor3 LLSettingsSky::getLightDiffuse() const
LLColor3 LLSettingsSky::getColor(const std::string& key, const LLColor3& default_value) const
{
+ LL_PROFILE_ZONE_SCOPED;
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
{
return LLColor3(mSettings[SETTING_LEGACY_HAZE][key]);
@@ -1035,6 +1032,7 @@ LLColor3 LLSettingsSky::getColor(const std::string& key, const LLColor3& default
F32 LLSettingsSky::getFloat(const std::string& key, F32 default_value) const
{
+ LL_PROFILE_ZONE_SCOPED;
if (mSettings.has(SETTING_LEGACY_HAZE) && mSettings[SETTING_LEGACY_HAZE].has(key))
{
return mSettings[SETTING_LEGACY_HAZE][key].asReal();
@@ -1206,11 +1204,19 @@ LLColor3 LLSettingsSky::getLightTransmittance(F32 distance) const
return transmittance;
}
+// SL-16127: getTotalDensity() and getDensityMultiplier() call LLSettingsSky::getColor() and LLSettingsSky::getFloat() respectively which are S-L-O-W
+LLColor3 LLSettingsSky::getLightTransmittanceFast( const LLColor3& total_density, const F32 density_multiplier, const F32 distance ) const
+{
+ // Transparency (-> density) from Beer's law
+ LLColor3 transmittance = componentExp(total_density * -(density_multiplier * distance));
+ return transmittance;
+}
+
// performs soft scale clip and gamma correction ala the shader implementation
// scales colors down to 0 - 1 range preserving relative ratios
-LLColor3 LLSettingsSky::gammaCorrect(const LLColor3& in) const
+LLColor3 LLSettingsSky::gammaCorrect(const LLColor3& in,const F32 &gamma) const
{
- F32 gamma = getGamma();
+ //F32 gamma = getGamma(); // SL-16127: Use cached gamma from atmospheric vars
LLColor3 v(in);
// scale down to 0 to 1 range preserving relative ratio (aka homegenize)
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 4127911643..fa9326f006 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -252,8 +252,9 @@ public:
LLColor3 getLightAttenuation(F32 distance) const;
LLColor3 getLightTransmittance(F32 distance) const;
+ LLColor3 getLightTransmittanceFast(const LLColor3& total_density, const F32 density_multiplier, const F32 distance) const;
LLColor3 getTotalDensity() const;
- LLColor3 gammaCorrect(const LLColor3& in) const;
+ LLColor3 gammaCorrect(const LLColor3& in,const F32 &gamma) const;
LLColor3 getBlueDensity() const;
LLColor3 getBlueHorizon() const;
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index 1ae8d78b22..90f99e8198 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -33,14 +33,6 @@
#include "v3colorutil.h"
#include "indra_constants.h"
-//=========================================================================
-namespace
-{
- LLTrace::BlockTimerStatHandle FTM_BLEND_WATERVALUES("Blending Water Environment");
- LLTrace::BlockTimerStatHandle FTM_UPDATE_WATERVALUES("Update Water Environment");
-}
-
-//=========================================================================
const std::string LLSettingsWater::SETTING_BLUR_MULTIPLIER("blur_multiplier");
const std::string LLSettingsWater::SETTING_FOG_COLOR("water_fog_color");
const std::string LLSettingsWater::SETTING_FOG_DENSITY("water_fog_density");