Updated buy land floater a bit. Fixed a persistent shutdown crash. Updated texture Texture Console.
This commit is contained in:
@@ -1376,12 +1376,6 @@ extern void cleanup_pose_stand(void);
|
|||||||
|
|
||||||
bool LLAppViewer::cleanup()
|
bool LLAppViewer::cleanup()
|
||||||
{
|
{
|
||||||
|
|
||||||
//HACK: the selectmgr may hold a ref to gAgentAvatarp, which will defer the actual
|
|
||||||
// destruction until LLSelectMgr::cleanupGlobals() is called AFTER the UI has been destroyed.
|
|
||||||
// This presents issue, as ~LLVOAvatarSelf spawns notifications if DebugAvatarRezTime is true, which will
|
|
||||||
// crash if the UI has been destroyed before then.
|
|
||||||
LLSelectMgr::getInstance()->remove(gAgentAvatarp, SELECT_ALL_TES, false);
|
|
||||||
//ditch LLVOAvatarSelf instance
|
//ditch LLVOAvatarSelf instance
|
||||||
gAgentAvatarp = NULL;
|
gAgentAvatarp = NULL;
|
||||||
cleanup_pose_stand();
|
cleanup_pose_stand();
|
||||||
|
|||||||
@@ -75,12 +75,29 @@ const F64 CURRENCY_ESTIMATE_FREQUENCY = 0.5;
|
|||||||
// esimate is fetched from the server
|
// esimate is fetched from the server
|
||||||
|
|
||||||
class LLFloaterBuyLandUI
|
class LLFloaterBuyLandUI
|
||||||
: public LLFloater
|
: public LLFloater, public LLSingleton<LLFloaterBuyLandUI>
|
||||||
{
|
{
|
||||||
private:
|
public:
|
||||||
LLFloaterBuyLandUI();
|
LLFloaterBuyLandUI();
|
||||||
virtual ~LLFloaterBuyLandUI();
|
virtual ~LLFloaterBuyLandUI();
|
||||||
|
|
||||||
|
/*virtual*/ void onClose(bool app_quitting);
|
||||||
|
|
||||||
|
// Left padding for maturity rating icon.
|
||||||
|
static const S32 ICON_PAD = 2;
|
||||||
|
|
||||||
|
private:
|
||||||
|
class SelectionObserver : public LLParcelObserver
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SelectionObserver(LLFloaterBuyLandUI* floater) : mFloater(floater) {}
|
||||||
|
virtual void changed();
|
||||||
|
private:
|
||||||
|
LLFloaterBuyLandUI* mFloater;
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
SelectionObserver mParcelSelectionObserver;
|
||||||
LLViewerRegion* mRegion;
|
LLViewerRegion* mRegion;
|
||||||
LLParcelSelectionHandle mParcel;
|
LLParcelSelectionHandle mParcel;
|
||||||
bool mIsClaim;
|
bool mIsClaim;
|
||||||
@@ -146,11 +163,7 @@ private:
|
|||||||
|
|
||||||
LLViewerParcelMgr::ParcelBuyInfo* mParcelBuyInfo;
|
LLViewerParcelMgr::ParcelBuyInfo* mParcelBuyInfo;
|
||||||
|
|
||||||
static LLFloaterBuyLandUI* sInstance;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static LLFloaterBuyLandUI* soleInstance(bool createIfNeeded);
|
|
||||||
|
|
||||||
void setForGroup(bool is_for_group);
|
void setForGroup(bool is_for_group);
|
||||||
void setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel);
|
void setParcel(LLViewerRegion* region, LLParcelSelectionHandle parcel);
|
||||||
|
|
||||||
@@ -158,10 +171,10 @@ public:
|
|||||||
void updateParcelInfo();
|
void updateParcelInfo();
|
||||||
void updateCovenantInfo();
|
void updateCovenantInfo();
|
||||||
static void onChangeAgreeCovenant(LLUICtrl* ctrl, void* user_data);
|
static void onChangeAgreeCovenant(LLUICtrl* ctrl, void* user_data);
|
||||||
void updateCovenantText(const std::string& string, const LLUUID &asset_id);
|
void updateFloaterCovenantText(const std::string& string, const LLUUID &asset_id);
|
||||||
void updateEstateName(const std::string& name);
|
void updateFloaterEstateName(const std::string& name);
|
||||||
void updateLastModified(const std::string& text);
|
void updateFloaterLastModified(const std::string& text);
|
||||||
void updateEstateOwnerName(const std::string& name);
|
void updateFloaterEstateOwnerName(const std::string& name);
|
||||||
void updateWebSiteInfo();
|
void updateWebSiteInfo();
|
||||||
void finishWebSiteInfo();
|
void finishWebSiteInfo();
|
||||||
|
|
||||||
@@ -170,10 +183,14 @@ public:
|
|||||||
void sendBuyLand();
|
void sendBuyLand();
|
||||||
|
|
||||||
void updateNames();
|
void updateNames();
|
||||||
|
// Name cache callback
|
||||||
|
void updateName(const LLUUID& id,
|
||||||
|
const std::string& name,
|
||||||
|
bool is_group);
|
||||||
|
|
||||||
void refreshUI();
|
void refreshUI();
|
||||||
|
|
||||||
void startTransaction(TransactionType type, LLXMLRPCValue params);
|
void startTransaction(TransactionType type, const LLXMLRPCValue& params);
|
||||||
bool checkTransaction();
|
bool checkTransaction();
|
||||||
|
|
||||||
void tellUserError(const std::string& message, const std::string& uri);
|
void tellUserError(const std::string& message, const std::string& uri);
|
||||||
@@ -183,31 +200,16 @@ public:
|
|||||||
void startBuyPreConfirm();
|
void startBuyPreConfirm();
|
||||||
void startBuyPostConfirm(const std::string& password);
|
void startBuyPostConfirm(const std::string& password);
|
||||||
|
|
||||||
static void onClickBuy(void* data);
|
void onClickBuy();
|
||||||
static void onClickCancel(void* data);
|
void onClickCancel();
|
||||||
static void onClickErrorWeb(void* data);
|
void onClickErrorWeb();
|
||||||
|
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
virtual BOOL canClose();
|
virtual BOOL canClose();
|
||||||
virtual void onClose(bool app_quitting);
|
|
||||||
/*virtual*/ void setMinimized(BOOL b);
|
|
||||||
|
|
||||||
private:
|
|
||||||
class SelectionObserver : public LLParcelObserver
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual void changed();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
static void cacheNameUpdateRefreshesBuyLand(const LLUUID& id, const std::string& full_name, bool is_group)
|
void onVisibilityChange ( const LLSD& new_visibility );
|
||||||
{
|
|
||||||
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
|
};
|
||||||
if (ui)
|
|
||||||
{
|
|
||||||
ui->updateNames();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterBuyLand::buyLand(
|
void LLFloaterBuyLand::buyLand(
|
||||||
@@ -219,102 +221,55 @@ void LLFloaterBuyLand::buyLand(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(true);
|
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::getInstance();
|
||||||
ui->setForGroup(is_for_group);
|
if(ui)
|
||||||
ui->setParcel(region, parcel);
|
{
|
||||||
ui->open(); /*Flawfinder: ignore*/
|
ui->setForGroup(is_for_group);
|
||||||
|
ui->setParcel(region, parcel);
|
||||||
|
ui->open(); /*Flawfinder: ignore*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterBuyLand::updateCovenantText(const std::string& string, const LLUUID &asset_id)
|
void LLFloaterBuyLand::updateCovenantText(const std::string& string, const LLUUID &asset_id)
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
|
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
|
||||||
if (floater)
|
if (floater)
|
||||||
{
|
{
|
||||||
floater->updateCovenantText(string, asset_id);
|
floater->updateFloaterCovenantText(string, asset_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterBuyLand::updateEstateName(const std::string& name)
|
void LLFloaterBuyLand::updateEstateName(const std::string& name)
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
|
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
|
||||||
if (floater)
|
if (floater)
|
||||||
{
|
{
|
||||||
floater->updateEstateName(name);
|
floater->updateFloaterEstateName(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterBuyLand::updateLastModified(const std::string& text)
|
void LLFloaterBuyLand::updateLastModified(const std::string& text)
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
|
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
|
||||||
if (floater)
|
if (floater)
|
||||||
{
|
{
|
||||||
floater->updateLastModified(text);
|
floater->updateFloaterLastModified(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
|
void LLFloaterBuyLand::updateEstateOwnerName(const std::string& name)
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
|
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::instanceExists() ? LLFloaterBuyLandUI::getInstance() : NULL;
|
||||||
if (floater)
|
if (floater)
|
||||||
{
|
{
|
||||||
floater->updateEstateOwnerName(name);
|
floater->updateFloaterEstateOwnerName(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
BOOL LLFloaterBuyLand::isOpen()
|
|
||||||
{
|
|
||||||
LLFloaterBuyLandUI* floater = LLFloaterBuyLandUI::soleInstance(FALSE);
|
|
||||||
if (floater)
|
|
||||||
{
|
|
||||||
return floater->getVisible();
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
|
||||||
LLFloaterBuyLandUI* LLFloaterBuyLandUI::sInstance = NULL;
|
|
||||||
|
|
||||||
// static
|
|
||||||
LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
|
|
||||||
{
|
|
||||||
#if !LL_RELEASE_FOR_DOWNLOAD
|
|
||||||
if (createIfNeeded)
|
|
||||||
{
|
|
||||||
delete sInstance;
|
|
||||||
sInstance = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (!sInstance && createIfNeeded)
|
|
||||||
{
|
|
||||||
sInstance = new LLFloaterBuyLandUI();
|
|
||||||
|
|
||||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_buy_land.xml");
|
|
||||||
sInstance->center();
|
|
||||||
|
|
||||||
static bool observingCacheName = false;
|
|
||||||
if (!observingCacheName)
|
|
||||||
{
|
|
||||||
gCacheName->addObserver(cacheNameUpdateRefreshesBuyLand);
|
|
||||||
observingCacheName = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static SelectionObserver* parcelSelectionObserver = NULL;
|
|
||||||
if (!parcelSelectionObserver)
|
|
||||||
{
|
|
||||||
parcelSelectionObserver = new SelectionObserver;
|
|
||||||
LLViewerParcelMgr::getInstance()->addObserver(parcelSelectionObserver);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return sInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
// passing 'this' during construction generates a warning. The callee
|
// passing 'this' during construction generates a warning. The callee
|
||||||
// only uses the pointer to hold a reference to 'this' which is
|
// only uses the pointer to hold a reference to 'this' which is
|
||||||
@@ -324,39 +279,45 @@ LLFloaterBuyLandUI* LLFloaterBuyLandUI::soleInstance(bool createIfNeeded)
|
|||||||
#endif
|
#endif
|
||||||
LLFloaterBuyLandUI::LLFloaterBuyLandUI()
|
LLFloaterBuyLandUI::LLFloaterBuyLandUI()
|
||||||
: LLFloater(std::string("Buy Land")),
|
: LLFloater(std::string("Buy Land")),
|
||||||
|
mParcelSelectionObserver(this),
|
||||||
mParcel(0),
|
mParcel(0),
|
||||||
mBought(false),
|
mBought(false),
|
||||||
mParcelValid(false), mSiteValid(false),
|
mParcelValid(false), mSiteValid(false),
|
||||||
mChildren(*this), mCurrency(*this), mTransaction(0),
|
mChildren(*this), mCurrency(*this), mTransaction(0),
|
||||||
mParcelBuyInfo(0)
|
mParcelBuyInfo(0)
|
||||||
{
|
{
|
||||||
|
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_buy_land.xml");
|
||||||
|
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFloaterBuyLandUI::~LLFloaterBuyLandUI()
|
LLFloaterBuyLandUI::~LLFloaterBuyLandUI()
|
||||||
{
|
{
|
||||||
|
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver);
|
||||||
LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo);
|
LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo);
|
||||||
delete mTransaction;
|
|
||||||
|
|
||||||
if (sInstance == this)
|
delete mTransaction;
|
||||||
{
|
}
|
||||||
sInstance = NULL;
|
|
||||||
}
|
// virtual
|
||||||
|
void LLFloaterBuyLandUI::onClose(bool app_quitting)
|
||||||
|
{
|
||||||
|
// This object holds onto observer, transactions, and parcel state.
|
||||||
|
// Despite being single_instance, destroy it to call destructors and clean
|
||||||
|
// everything up.
|
||||||
|
setVisible(FALSE);
|
||||||
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::SelectionObserver::changed()
|
void LLFloaterBuyLandUI::SelectionObserver::changed()
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* ui = LLFloaterBuyLandUI::soleInstance(false);
|
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
|
||||||
if (ui)
|
|
||||||
{
|
{
|
||||||
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
|
mFloater->close();
|
||||||
{
|
}
|
||||||
ui->close();
|
else
|
||||||
}
|
{
|
||||||
else {
|
mFloater->setParcel(LLViewerParcelMgr::getInstance()->getSelectionRegion(),
|
||||||
ui->setParcel(
|
LLViewerParcelMgr::getInstance()->getParcelSelection());
|
||||||
LLViewerParcelMgr::getInstance()->getSelectionRegion(),
|
|
||||||
LLViewerParcelMgr::getInstance()->getParcelSelection());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,16 +492,22 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
|
|||||||
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
|
||||||
if(!region) return;
|
if(!region) return;
|
||||||
|
|
||||||
|
U8 sim_access = region->getSimAccess();
|
||||||
|
std::string rating = LLViewerRegion::accessToString(sim_access);
|
||||||
|
|
||||||
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
|
LLTextBox* region_name = getChild<LLTextBox>("region_name_text");
|
||||||
if (region_name)
|
if (region_name)
|
||||||
{
|
{
|
||||||
region_name->setText(region->getName());
|
std::string region_name_txt = region->getName() + " ("+rating +")";
|
||||||
|
region_name->setText(region_name_txt);
|
||||||
|
region_name->setToolTip(region_name->getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
|
LLTextBox* region_type = getChild<LLTextBox>("region_type_text");
|
||||||
if (region_type)
|
if (region_type)
|
||||||
{
|
{
|
||||||
region_type->setText(region->getLocalizedSimProductName());
|
region_type->setText(region->getLocalizedSimProductName());
|
||||||
|
region_type->setToolTip(region->getLocalizedSimProductName());
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
|
LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause");
|
||||||
@@ -574,8 +541,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo()
|
|||||||
{
|
{
|
||||||
check->set(false);
|
check->set(false);
|
||||||
check->setEnabled(true);
|
check->setEnabled(true);
|
||||||
check->setCallbackUserData(this);
|
check->setCommitCallback(boost::bind(&LLFloaterBuyLandUI::onChangeAgreeCovenant,_1,(void*)this));
|
||||||
check->setCommitCallback(onChangeAgreeCovenant);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTextBox* box = getChild<LLTextBox>("covenant_text");
|
LLTextBox* box = getChild<LLTextBox>("covenant_text");
|
||||||
@@ -603,51 +569,46 @@ void LLFloaterBuyLandUI::onChangeAgreeCovenant(LLUICtrl* ctrl, void* user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::updateCovenantText(const std::string &string, const LLUUID& asset_id)
|
void LLFloaterBuyLandUI::updateFloaterCovenantText(const std::string &string, const LLUUID& asset_id)
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("covenant_editor");
|
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("covenant_editor");
|
||||||
if (editor)
|
editor->setHandleEditKeysDirectly(FALSE);
|
||||||
|
editor->setText(string);
|
||||||
|
|
||||||
|
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
|
||||||
|
LLTextBox* box = getChild<LLTextBox>("covenant_text");
|
||||||
|
if (asset_id.isNull())
|
||||||
{
|
{
|
||||||
editor->setHandleEditKeysDirectly(FALSE);
|
check->set(true);
|
||||||
editor->setText(string);
|
check->setEnabled(false);
|
||||||
|
refreshUI();
|
||||||
|
|
||||||
LLCheckBoxCtrl* check = getChild<LLCheckBoxCtrl>("agree_covenant");
|
// remove the line stating that you must agree
|
||||||
LLTextBox* box = getChild<LLTextBox>("covenant_text");
|
box->setVisible(FALSE);
|
||||||
if(check && box)
|
}
|
||||||
{
|
else
|
||||||
if (asset_id.isNull())
|
{
|
||||||
{
|
check->setEnabled(true);
|
||||||
check->set(true);
|
|
||||||
check->setEnabled(false);
|
|
||||||
refreshUI();
|
|
||||||
|
|
||||||
// remove the line stating that you must agree
|
// remove the line stating that you must agree
|
||||||
box->setVisible(FALSE);
|
box->setVisible(TRUE);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
check->setEnabled(true);
|
|
||||||
|
|
||||||
// remove the line stating that you must agree
|
|
||||||
box->setVisible(TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::updateEstateName(const std::string& name)
|
void LLFloaterBuyLandUI::updateFloaterEstateName(const std::string& name)
|
||||||
{
|
{
|
||||||
LLTextBox* box = getChild<LLTextBox>("estate_name_text");
|
LLTextBox* box = getChild<LLTextBox>("estate_name_text");
|
||||||
if (box) box->setText(name);
|
box->setText(name);
|
||||||
|
box->setToolTip(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::updateLastModified(const std::string& text)
|
void LLFloaterBuyLandUI::updateFloaterLastModified(const std::string& text)
|
||||||
{
|
{
|
||||||
LLTextBox* editor = getChild<LLTextBox>("covenant_timestamp_text");
|
LLTextBox* editor = getChild<LLTextBox>("covenant_timestamp_text");
|
||||||
if (editor) editor->setText(text);
|
if (editor) editor->setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::updateEstateOwnerName(const std::string& name)
|
void LLFloaterBuyLandUI::updateFloaterEstateOwnerName(const std::string& name)
|
||||||
{
|
{
|
||||||
LLTextBox* box = getChild<LLTextBox>("estate_owner_text");
|
LLTextBox* box = getChild<LLTextBox>("estate_owner_text");
|
||||||
if (box) box->setText(name);
|
if (box) box->setText(name);
|
||||||
@@ -743,7 +704,7 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL remove_contribution = childGetValue("remove_contribution").asBoolean();
|
BOOL remove_contribution = getChild<LLUICtrl>("remove_contribution")->getValue().asBoolean();
|
||||||
mParcelBuyInfo = LLViewerParcelMgr::getInstance()->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(),
|
mParcelBuyInfo = LLViewerParcelMgr::getInstance()->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(),
|
||||||
gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution);
|
gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution);
|
||||||
|
|
||||||
@@ -835,17 +796,34 @@ void LLFloaterBuyLandUI::updateNames()
|
|||||||
}
|
}
|
||||||
else if (parcelp->getIsGroupOwned())
|
else if (parcelp->getIsGroupOwned())
|
||||||
{
|
{
|
||||||
gCacheName->getGroupName(parcelp->getGroupID(), mParcelSellerName);
|
mParcelSellerName = "(Loading...)";
|
||||||
|
gCacheName->getGroup(parcelp->getGroupID(),
|
||||||
|
boost::bind(&LLFloaterBuyLandUI::updateName, this,
|
||||||
|
_1, _2, _3));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gCacheName->getFullName(parcelp->getOwnerID(), mParcelSellerName);
|
mParcelSellerName = "(Loading...)";
|
||||||
|
gCacheName->get(parcelp->getOwnerID(), false,
|
||||||
|
boost::bind(&LLFloaterBuyLandUI::updateName, this,
|
||||||
|
_1, _2, _3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLFloaterBuyLandUI::updateName(const LLUUID& id,
|
||||||
|
const std::string& name,
|
||||||
|
bool is_group)
|
||||||
|
{
|
||||||
|
LLParcel* parcelp = mParcel->getParcel();
|
||||||
|
if (parcelp
|
||||||
|
&& (is_group ? parcelp->getGroupID() : parcelp->getOwnerID()) == id)
|
||||||
|
{
|
||||||
|
// request is current
|
||||||
|
mParcelSellerName = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::startTransaction(TransactionType type,
|
void LLFloaterBuyLandUI::startTransaction(TransactionType type, const LLXMLRPCValue& params)
|
||||||
LLXMLRPCValue params)
|
|
||||||
{
|
{
|
||||||
delete mTransaction;
|
delete mTransaction;
|
||||||
mTransaction = NULL;
|
mTransaction = NULL;
|
||||||
@@ -926,11 +904,14 @@ void LLFloaterBuyLandUI::tellUserError(
|
|||||||
// virtual
|
// virtual
|
||||||
BOOL LLFloaterBuyLandUI::postBuild()
|
BOOL LLFloaterBuyLandUI::postBuild()
|
||||||
{
|
{
|
||||||
|
setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChange, this, _2));
|
||||||
mCurrency.prepare();
|
mCurrency.prepare();
|
||||||
|
|
||||||
childSetAction("buy_btn", onClickBuy, this);
|
getChild<LLUICtrl>("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyLandUI::onClickBuy, this));
|
||||||
childSetAction("cancel_btn", onClickCancel, this);
|
getChild<LLUICtrl>("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyLandUI::onClickCancel, this));
|
||||||
childSetAction("error_web", onClickErrorWeb, this);
|
getChild<LLUICtrl>("error_web")->setCommitCallback( boost::bind(&LLFloaterBuyLandUI::onClickErrorWeb, this));
|
||||||
|
|
||||||
|
center();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -996,24 +977,14 @@ BOOL LLFloaterBuyLandUI::canClose()
|
|||||||
return can_close;
|
return can_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
void LLFloaterBuyLandUI::onVisibilityChange ( const LLSD& new_visibility )
|
||||||
void LLFloaterBuyLandUI::setMinimized(BOOL minimize)
|
|
||||||
{
|
{
|
||||||
bool restored = (isMinimized() && !minimize);
|
if (new_visibility.asBoolean())
|
||||||
LLFloater::setMinimized(minimize);
|
|
||||||
if (restored)
|
|
||||||
{
|
{
|
||||||
refreshUI();
|
refreshUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::onClose(bool app_quitting)
|
|
||||||
{
|
|
||||||
LLFloater::onClose(app_quitting);
|
|
||||||
destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LLFloaterBuyLandUI::refreshUI()
|
void LLFloaterBuyLandUI::refreshUI()
|
||||||
{
|
{
|
||||||
// section zero: title area
|
// section zero: title area
|
||||||
@@ -1027,14 +998,14 @@ void LLFloaterBuyLandUI::refreshUI()
|
|||||||
|
|
||||||
if (mParcelValid)
|
if (mParcelValid)
|
||||||
{
|
{
|
||||||
childSetText("info_parcel", mParcelLocation);
|
getChild<LLUICtrl>("info_parcel")->setValue(mParcelLocation);
|
||||||
|
|
||||||
LLStringUtil::format_map_t string_args;
|
LLStringUtil::format_map_t string_args;
|
||||||
string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea);
|
string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea);
|
||||||
string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects);
|
string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects);
|
||||||
string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
|
string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
|
||||||
|
|
||||||
childSetText("info_size", getString("meters_supports_object", string_args));
|
getChild<LLUICtrl>("info_size")->setValue(getString("meters_supports_object", string_args));
|
||||||
|
|
||||||
F32 cost_per_sqm = 0.0f;
|
F32 cost_per_sqm = 0.0f;
|
||||||
if (mParcelActualArea > 0)
|
if (mParcelActualArea > 0)
|
||||||
@@ -1372,26 +1343,20 @@ void LLFloaterBuyLandUI::startBuyPostConfirm(const std::string& password)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// static
|
void LLFloaterBuyLandUI::onClickBuy()
|
||||||
void LLFloaterBuyLandUI::onClickBuy(void* data)
|
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
|
startBuyPreConfirm();
|
||||||
self->startBuyPreConfirm();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
void LLFloaterBuyLandUI::onClickCancel()
|
||||||
void LLFloaterBuyLandUI::onClickCancel(void* data)
|
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
|
close();
|
||||||
self->close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
void LLFloaterBuyLandUI::onClickErrorWeb()
|
||||||
void LLFloaterBuyLandUI::onClickErrorWeb(void* data)
|
|
||||||
{
|
{
|
||||||
LLFloaterBuyLandUI* self = (LLFloaterBuyLandUI*)data;
|
LLWeb::loadURLExternal(mCannotBuyURI);
|
||||||
LLWeb::loadURLExternal(self->mCannotBuyURI);
|
close();
|
||||||
self->close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
#ifndef LL_LLFLOATERBUYLAND_H
|
#ifndef LL_LLFLOATERBUYLAND_H
|
||||||
#define LL_LLFLOATERBUYLAND_H
|
#define LL_LLFLOATERBUYLAND_H
|
||||||
|
|
||||||
|
class LLFloater;
|
||||||
class LLViewerRegion;
|
class LLViewerRegion;
|
||||||
class LLViewerTextEditor;
|
|
||||||
class LLParcelSelection;
|
class LLParcelSelection;
|
||||||
|
|
||||||
class LLFloaterBuyLand
|
class LLFloaterBuyLand
|
||||||
@@ -47,7 +47,6 @@ public:
|
|||||||
static void updateEstateName(const std::string& name);
|
static void updateEstateName(const std::string& name);
|
||||||
static void updateLastModified(const std::string& text);
|
static void updateLastModified(const std::string& text);
|
||||||
static void updateEstateOwnerName(const std::string& name);
|
static void updateEstateOwnerName(const std::string& name);
|
||||||
static BOOL isOpen();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lltextureview.cpp
|
* @file lltextureview.cpp
|
||||||
* @brief LLTextureView class implementation
|
* @brief LLTextureView class implementation
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -44,16 +38,21 @@
|
|||||||
#include "llrender.h"
|
#include "llrender.h"
|
||||||
|
|
||||||
#include "llappviewer.h"
|
#include "llappviewer.h"
|
||||||
#include "llhoverview.h"
|
|
||||||
#include "llselectmgr.h"
|
#include "llselectmgr.h"
|
||||||
#include "lltexlayer.h"
|
#include "lltexlayer.h"
|
||||||
#include "lltexturecache.h"
|
#include "lltexturecache.h"
|
||||||
#include "lltexturefetch.h"
|
#include "lltexturefetch.h"
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
#include "llviewerobject.h"
|
#include "llviewerobject.h"
|
||||||
|
#include "llviewertexture.h"
|
||||||
#include "llviewertexturelist.h"
|
#include "llviewertexturelist.h"
|
||||||
#include "llvovolume.h"
|
#include "llvovolume.h"
|
||||||
#include "llviewerstats.h"
|
#include "llviewerstats.h"
|
||||||
|
|
||||||
|
// For avatar texture view
|
||||||
|
#include "llvoavatarself.h"
|
||||||
|
#include "lltexlayer.h"
|
||||||
|
|
||||||
extern F32 texmem_lower_bound_scale;
|
extern F32 texmem_lower_bound_scale;
|
||||||
|
|
||||||
LLTextureView *gTextureView = NULL;
|
LLTextureView *gTextureView = NULL;
|
||||||
@@ -61,6 +60,7 @@ LLTextureSizeView *gTextureSizeView = NULL;
|
|||||||
LLTextureSizeView *gTextureCategoryView = NULL;
|
LLTextureSizeView *gTextureCategoryView = NULL;
|
||||||
|
|
||||||
#define HIGH_PRIORITY 100000000.f
|
#define HIGH_PRIORITY 100000000.f
|
||||||
|
|
||||||
//static
|
//static
|
||||||
std::set<LLViewerFetchedTexture*> LLTextureView::sDebugImages;
|
std::set<LLViewerFetchedTexture*> LLTextureView::sDebugImages;
|
||||||
|
|
||||||
@@ -381,6 +381,98 @@ LLRect LLTextureBar::getRequiredRect()
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class LLAvatarTexBar : public LLView
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
LLAvatarTexBar(const std::string& name, LLTextureView* texview)
|
||||||
|
: LLView(name, FALSE),
|
||||||
|
mTextureView(texview)
|
||||||
|
{
|
||||||
|
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
|
||||||
|
setRect(LLRect(0,0,100,line_height * 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void draw();
|
||||||
|
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
|
||||||
|
virtual LLRect getRequiredRect(); // Return the height of this object, given the set options.
|
||||||
|
|
||||||
|
private:
|
||||||
|
LLTextureView* mTextureView;
|
||||||
|
};
|
||||||
|
|
||||||
|
void LLAvatarTexBar::draw()
|
||||||
|
{
|
||||||
|
if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) return;
|
||||||
|
|
||||||
|
LLVOAvatarSelf* avatarp = gAgentAvatarp;
|
||||||
|
if (!avatarp) return;
|
||||||
|
|
||||||
|
const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
|
||||||
|
const S32 v_offset = 0;
|
||||||
|
const S32 l_offset = 3;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
LLGLSUIDefault gls_ui;
|
||||||
|
LLColor4 color;
|
||||||
|
|
||||||
|
U32 line_num = 1;
|
||||||
|
for (LLVOAvatarDefines::LLVOAvatarDictionary::BakedTextures::const_iterator baked_iter = LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().begin();
|
||||||
|
baked_iter != LLVOAvatarDefines::LLVOAvatarDictionary::getInstance()->getBakedTextures().end();
|
||||||
|
++baked_iter)
|
||||||
|
{
|
||||||
|
const LLVOAvatarDefines::EBakedTextureIndex baked_index = baked_iter->first;
|
||||||
|
const LLTexLayerSet *layerset = avatarp->debugGetLayerSet(baked_index);
|
||||||
|
if (!layerset) continue;
|
||||||
|
const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite();
|
||||||
|
if (!layerset_buffer) continue;
|
||||||
|
|
||||||
|
LLColor4 text_color = LLColor4::white;
|
||||||
|
|
||||||
|
if (layerset_buffer->uploadNeeded())
|
||||||
|
{
|
||||||
|
text_color = LLColor4::red;
|
||||||
|
}
|
||||||
|
if (layerset_buffer->uploadInProgress())
|
||||||
|
{
|
||||||
|
text_color = LLColor4::magenta;
|
||||||
|
}
|
||||||
|
std::string text = layerset_buffer->dumpTextureInfo();
|
||||||
|
LLFontGL::getFontMonospace()->renderUTF8(text, 0, l_offset, v_offset + line_height*line_num,
|
||||||
|
text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
|
||||||
|
line_num++;
|
||||||
|
}
|
||||||
|
const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureUploadTimeout");
|
||||||
|
const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
|
||||||
|
|
||||||
|
LLColor4 header_color(1.f, 1.f, 1.f, 0.9f);
|
||||||
|
|
||||||
|
const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled";
|
||||||
|
const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled";
|
||||||
|
std::string header_text = llformat("[ Timeout('AvatarBakedTextureUploadTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str());
|
||||||
|
LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num,
|
||||||
|
header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
|
||||||
|
line_num++;
|
||||||
|
std::string section_text = "Avatar Textures Information:";
|
||||||
|
LLFontGL::getFontMonospace()->renderUTF8(section_text, 0, 0, v_offset + line_height*line_num,
|
||||||
|
header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
LLRect LLAvatarTexBar::getRequiredRect()
|
||||||
|
{
|
||||||
|
LLRect rect;
|
||||||
|
rect.mTop = 100;
|
||||||
|
if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) rect.mTop = 0;
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class LLGLTexMemBar : public LLView
|
class LLGLTexMemBar : public LLView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -410,38 +502,39 @@ void LLGLTexMemBar::draw()
|
|||||||
F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ;
|
F32 cache_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getUsage()) ;
|
||||||
F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ;
|
F32 cache_max_usage = (F32)BYTES_TO_MEGA_BYTES(LLAppViewer::getTextureCache()->getMaxUsage()) ;
|
||||||
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
|
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
|
||||||
|
S32 v_offset = 0;
|
||||||
F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024);
|
F32 total_texture_downloaded = (F32)gTotalTextureBytes / (1024 * 1024);
|
||||||
F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024);
|
F32 total_object_downloaded = (F32)gTotalObjectBytes / (1024 * 1024);
|
||||||
// U32 cache_max_entries = LLAppViewer::getTextureCache()->getMaxEntries();
|
U32 total_http_requests = LLAppViewer::getTextureFetch()->getTotalNumHTTPRequests() ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
LLGLSUIDefault gls_ui;
|
LLGLSUIDefault gls_ui;
|
||||||
LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
|
LLColor4 text_color(1.f, 1.f, 1.f, 0.75f);
|
||||||
LLColor4 color;
|
LLColor4 color;
|
||||||
|
|
||||||
std::string text;
|
std::string text = "";
|
||||||
|
|
||||||
S32 global_raw_memory;
|
S32 global_raw_memory;
|
||||||
{
|
{
|
||||||
global_raw_memory = *AIAccess<S32>(LLImageRaw::sGlobalRawMemory);
|
global_raw_memory = *AIAccess<S32>(LLImageRaw::sGlobalRawMemory);
|
||||||
}
|
}
|
||||||
text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB",
|
text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
|
||||||
total_mem,
|
total_mem,
|
||||||
max_total_mem,
|
max_total_mem,
|
||||||
bound_mem,
|
bound_mem,
|
||||||
max_bound_mem,
|
max_bound_mem,
|
||||||
|
LLRenderTarget::sBytesAllocated/(1024*1024),
|
||||||
global_raw_memory >> 20, discard_bias,
|
global_raw_memory >> 20, discard_bias,
|
||||||
cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded);
|
cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded, total_http_requests);
|
||||||
//, cache_entries, cache_max_entries
|
//, cache_entries, cache_max_entries
|
||||||
|
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*3,
|
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
#if 0
|
#if 0
|
||||||
S32 bar_left = 400;
|
S32 bar_left = 400;
|
||||||
S32 bar_width = 200;
|
S32 bar_width = 200;
|
||||||
S32 top = line_height*3 - 2;
|
S32 top = line_height*3 - 2 + v_offset;
|
||||||
S32 bottom = top - 6;
|
S32 bottom = top - 6;
|
||||||
S32 left = bar_left;
|
S32 left = bar_left;
|
||||||
S32 right = left + bar_width;
|
S32 right = left + bar_width;
|
||||||
@@ -469,7 +562,7 @@ void LLGLTexMemBar::draw()
|
|||||||
color = (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) ? LLColor4::green :
|
color = (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) ? LLColor4::green :
|
||||||
(total_mem < max_total_mem) ? LLColor4::yellow : LLColor4::red;
|
(total_mem < max_total_mem) ? LLColor4::yellow : LLColor4::red;
|
||||||
color[VALPHA] = .75f;
|
color[VALPHA] = .75f;
|
||||||
gGL.diffuseColor4f(color.mV);
|
gGL.diffuseColor4fv(color.mV);
|
||||||
|
|
||||||
gl_rect_2d(left, top, right, bottom); // red/yellow/green
|
gl_rect_2d(left, top, right, bottom); // red/yellow/green
|
||||||
|
|
||||||
@@ -492,7 +585,7 @@ void LLGLTexMemBar::draw()
|
|||||||
color = (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) ? LLColor4::green :
|
color = (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) ? LLColor4::green :
|
||||||
(bound_mem < max_bound_mem) ? LLColor4::yellow : LLColor4::red;
|
(bound_mem < max_bound_mem) ? LLColor4::yellow : LLColor4::red;
|
||||||
color[VALPHA] = .75f;
|
color[VALPHA] = .75f;
|
||||||
gGL.diffuseColor4f(color.mV);
|
gGL.diffuseColor4fv(color.mV);
|
||||||
|
|
||||||
gl_rect_2d(left, top, right, bottom);
|
gl_rect_2d(left, top, right, bottom);
|
||||||
#else
|
#else
|
||||||
@@ -512,7 +605,7 @@ void LLGLTexMemBar::draw()
|
|||||||
LLAppViewer::getImageDecodeThread()->getPending(),
|
LLAppViewer::getImageDecodeThread()->getPending(),
|
||||||
gTextureList.mCreateTextureList.size());
|
gTextureList.mCreateTextureList.size());
|
||||||
|
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*2,
|
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*2,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
|
|
||||||
left += LLFontGL::getFontMonospace()->getWidth(text);
|
left += LLFontGL::getFontMonospace()->getWidth(text);
|
||||||
@@ -521,40 +614,40 @@ void LLGLTexMemBar::draw()
|
|||||||
color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;
|
color = bandwidth > max_bandwidth ? LLColor4::red : bandwidth > max_bandwidth*.75f ? LLColor4::yellow : text_color;
|
||||||
color[VALPHA] = text_color[VALPHA];
|
color[VALPHA] = text_color[VALPHA];
|
||||||
text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth);
|
text = llformat("BW:%.0f/%.0f",bandwidth, max_bandwidth);
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, line_height*2,
|
LLFontGL::getFontMonospace()->renderUTF8(text, 0, left, v_offset + line_height*2,
|
||||||
color, LLFontGL::LEFT, LLFontGL::TOP);
|
color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
|
|
||||||
S32 dx1 = 0;
|
S32 dx1 = 0;
|
||||||
if (LLAppViewer::getTextureFetch()->mDebugPause)
|
if (LLAppViewer::getTextureFetch()->mDebugPause)
|
||||||
{
|
{
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
dx1 += 8;
|
dx1 += 8;
|
||||||
}
|
}
|
||||||
if (mTextureView->mFreezeView)
|
if (mTextureView->mFreezeView)
|
||||||
{
|
{
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
dx1 += 8;
|
dx1 += 8;
|
||||||
}
|
}
|
||||||
if (mTextureView->mOrderFetch)
|
if (mTextureView->mOrderFetch)
|
||||||
{
|
{
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
|
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
|
|
||||||
LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, line_height,
|
LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, v_offset + line_height,
|
||||||
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
text_color, LLFontGL::LEFT, LLFontGL::TOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,7 +659,7 @@ BOOL LLGLTexMemBar::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||||||
LLRect LLGLTexMemBar::getRequiredRect()
|
LLRect LLGLTexMemBar::getRequiredRect()
|
||||||
{
|
{
|
||||||
LLRect rect;
|
LLRect rect;
|
||||||
rect.mTop = 8;
|
rect.mTop = 50;
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -646,6 +739,7 @@ LLTextureView::LLTextureView(const std::string& name, const LLRect& rect)
|
|||||||
|
|
||||||
setDisplayChildren(TRUE);
|
setDisplayChildren(TRUE);
|
||||||
mGLTexMemBar = 0;
|
mGLTexMemBar = 0;
|
||||||
|
mAvatarTexBar = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTextureView::~LLTextureView()
|
LLTextureView::~LLTextureView()
|
||||||
@@ -653,6 +747,9 @@ LLTextureView::~LLTextureView()
|
|||||||
// Children all cleaned up by default view destructor.
|
// Children all cleaned up by default view destructor.
|
||||||
delete mGLTexMemBar;
|
delete mGLTexMemBar;
|
||||||
mGLTexMemBar = 0;
|
mGLTexMemBar = 0;
|
||||||
|
|
||||||
|
delete mAvatarTexBar;
|
||||||
|
mAvatarTexBar = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef std::pair<F32,LLViewerFetchedTexture*> decode_pair_t;
|
typedef std::pair<F32,LLViewerFetchedTexture*> decode_pair_t;
|
||||||
@@ -664,6 +761,15 @@ struct compare_decode_pair
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct KillView
|
||||||
|
{
|
||||||
|
void operator()(LLView* viewp)
|
||||||
|
{
|
||||||
|
viewp->getParent()->removeChild(viewp);
|
||||||
|
viewp->die();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void LLTextureView::draw()
|
void LLTextureView::draw()
|
||||||
{
|
{
|
||||||
if (!mFreezeView)
|
if (!mFreezeView)
|
||||||
@@ -671,12 +777,23 @@ void LLTextureView::draw()
|
|||||||
// LLViewerObject *objectp;
|
// LLViewerObject *objectp;
|
||||||
// S32 te;
|
// S32 te;
|
||||||
|
|
||||||
for_each(mTextureBars.begin(), mTextureBars.end(), DeletePointer());
|
for_each(mTextureBars.begin(), mTextureBars.end(), KillView());
|
||||||
mTextureBars.clear();
|
mTextureBars.clear();
|
||||||
|
|
||||||
delete mGLTexMemBar;
|
if (mGLTexMemBar)
|
||||||
mGLTexMemBar = 0;
|
{
|
||||||
|
removeChild(mGLTexMemBar);
|
||||||
|
mGLTexMemBar->die();
|
||||||
|
mGLTexMemBar = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mAvatarTexBar)
|
||||||
|
{
|
||||||
|
removeChild(mAvatarTexBar);
|
||||||
|
mAvatarTexBar->die();
|
||||||
|
mAvatarTexBar = 0;
|
||||||
|
}
|
||||||
|
|
||||||
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
|
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
|
||||||
display_list_t display_image_list;
|
display_list_t display_image_list;
|
||||||
|
|
||||||
@@ -813,6 +930,7 @@ void LLTextureView::draw()
|
|||||||
|
|
||||||
static S32 max_count = 50;
|
static S32 max_count = 50;
|
||||||
S32 count = 0;
|
S32 count = 0;
|
||||||
|
mNumTextureBars = 0 ;
|
||||||
for (display_list_t::iterator iter = display_image_list.begin();
|
for (display_list_t::iterator iter = display_image_list.begin();
|
||||||
iter != display_image_list.end(); iter++)
|
iter != display_image_list.end(); iter++)
|
||||||
{
|
{
|
||||||
@@ -840,6 +958,9 @@ void LLTextureView::draw()
|
|||||||
mGLTexMemBar = new LLGLTexMemBar("gl texmem bar", this);
|
mGLTexMemBar = new LLGLTexMemBar("gl texmem bar", this);
|
||||||
addChild(mGLTexMemBar);
|
addChild(mGLTexMemBar);
|
||||||
|
|
||||||
|
mAvatarTexBar = new LLAvatarTexBar("gl avatartex bar", this);
|
||||||
|
addChild(mAvatarTexBar);
|
||||||
|
|
||||||
reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
|
reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -920,7 +1041,7 @@ BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------
|
//-----------------------------------------------------------------
|
||||||
LLTextureSizeView::LLTextureSizeView(const std::string& name) : LLView(name, FALSE)
|
LLTextureSizeView::LLTextureSizeView(const std::string& name) : LLContainerView(name, LLRect())
|
||||||
{
|
{
|
||||||
setVisible(FALSE) ;
|
setVisible(FALSE) ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lltextureview.h
|
* @file lltextureview.h
|
||||||
* @brief LLTextureView class header file
|
* @brief LLTextureView class header file
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,11 +32,13 @@
|
|||||||
class LLViewerFetchedTexture;
|
class LLViewerFetchedTexture;
|
||||||
class LLTextureBar;
|
class LLTextureBar;
|
||||||
class LLGLTexMemBar;
|
class LLGLTexMemBar;
|
||||||
|
class LLAvatarTexBar;
|
||||||
|
|
||||||
class LLTextureView : public LLContainerView
|
class LLTextureView : public LLContainerView
|
||||||
{
|
{
|
||||||
friend class LLTextureBar;
|
friend class LLTextureBar;
|
||||||
friend class LLGLTexMemBar;
|
friend class LLGLTexMemBar;
|
||||||
|
friend class LLAvatarTexBar;
|
||||||
public:
|
public:
|
||||||
LLTextureView(const std::string& name, const LLRect& rect);
|
LLTextureView(const std::string& name, const LLRect& rect);
|
||||||
~LLTextureView();
|
~LLTextureView();
|
||||||
@@ -71,13 +67,13 @@ private:
|
|||||||
U32 mNumTextureBars;
|
U32 mNumTextureBars;
|
||||||
|
|
||||||
LLGLTexMemBar* mGLTexMemBar;
|
LLGLTexMemBar* mGLTexMemBar;
|
||||||
|
LLAvatarTexBar* mAvatarTexBar;
|
||||||
public:
|
public:
|
||||||
static std::set<LLViewerFetchedTexture*> sDebugImages;
|
static std::set<LLViewerFetchedTexture*> sDebugImages;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLGLTexSizeBar;
|
class LLGLTexSizeBar;
|
||||||
class LLTextureSizeView : public LLView
|
class LLTextureSizeView : public LLContainerView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLTextureSizeView(const std::string& name);
|
LLTextureSizeView(const std::string& name);
|
||||||
|
|||||||
@@ -824,7 +824,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
LLVOAvatar::~LLVOAvatar()
|
LLVOAvatar::~LLVOAvatar()
|
||||||
{
|
{
|
||||||
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
//App teardown is a mess. Avatar destruction can be unpredictable due to all potential refs to the smartptr.
|
||||||
|
//Cannot guarantee that LLNotificationUtil will be usable during shutdown chain.
|
||||||
|
if (!LLApp::isQuitting() && gSavedSettings.getBOOL("DebugAvatarRezTime"))
|
||||||
{
|
{
|
||||||
if (!mFullyLoaded)
|
if (!mFullyLoaded)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user