summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/contributions.txt5
-rw-r--r--indra/llcharacter/llmotioncontroller.cpp9
-rw-r--r--indra/llcharacter/llmotioncontroller.h2
-rw-r--r--indra/llcommon/llinitparam.cpp7
-rw-r--r--indra/llui/llscrollcontainer.cpp50
-rw-r--r--indra/llui/llscrollcontainer.h6
-rw-r--r--indra/llui/llxuiparser.cpp36
-rw-r--r--indra/newview/app_settings/settings.xml15
-rw-r--r--indra/newview/llappviewer.cpp74
-rw-r--r--indra/newview/llappviewer.h5
-rw-r--r--indra/newview/llflexibleobject.cpp77
-rw-r--r--indra/newview/llflexibleobject.h4
-rw-r--r--indra/newview/llfloaterland.cpp11
-rw-r--r--indra/newview/llfloaterlinkreplace.cpp22
-rw-r--r--indra/newview/llfloaterlinkreplace.h11
-rw-r--r--indra/newview/llmachineid.cpp35
-rw-r--r--indra/newview/llpanelmaininventory.cpp2
-rw-r--r--indra/newview/llpreviewanim.cpp6
-rw-r--r--indra/newview/lltoolpie.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp95
-rw-r--r--indra/newview/llviewermessage.cpp24
-rw-r--r--indra/newview/llviewerstats.cpp3
-rw-r--r--indra/newview/llvoavatar.cpp58
-rw-r--r--indra/newview/llvoicevivox.cpp18
-rw-r--r--indra/newview/llvoicevivox.h1
-rw-r--r--indra/newview/llweb.cpp16
-rw-r--r--indra/newview/skins/default/xui/en/floater_grid_status.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_web_content.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_active_object_row.xml20
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml3
32 files changed, 367 insertions, 260 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 549adaaef7..6f4e88e836 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -823,6 +823,7 @@ Kitty Barnett
MAINT-6154
MAINT-6568
STORM-2149
+ MAINT-7581
Kolor Fall
Komiko Okamoto
Korvel Noh
@@ -1038,9 +1039,9 @@ Nicholaz Beresford
VWR-2682
VWR-2684
Nick Rhodes
-NickyD
- MAINT-873
Nicky Dasmijn
+ MAINT-873
+ MAINT-7541
VWR-29228
MAINT-1392
MAINT-873
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index d8185aa693..35e76f1d9d 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -139,7 +139,8 @@ LLMotionController::LLMotionController()
mTimeStep(0.f),
mTimeStepCount(0),
mLastInterp(0.f),
- mIsSelf(FALSE)
+ mIsSelf(FALSE),
+ mLastCountAfterPurge(0)
{
}
@@ -238,10 +239,12 @@ void LLMotionController::purgeExcessMotions()
}
}
- if (mLoadedMotions.size() > 2*MAX_MOTION_INSTANCES)
+ U32 loaded_count = mLoadedMotions.size();
+ if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge)
{
- LL_WARNS_ONCE("Animation") << "> " << 2*MAX_MOTION_INSTANCES << " Loaded Motions" << LL_ENDL;
+ LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL;
}
+ mLastCountAfterPurge = loaded_count;
}
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index 72de331694..9d9c64f4f0 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -224,6 +224,8 @@ protected:
F32 mLastInterp;
U8 mJointSignature[2][LL_CHARACTER_MAX_ANIMATED_JOINTS];
+private:
+ U32 mLastCountAfterPurge; //for logging and debugging purposes
};
//-----------------------------------------------------------------------------
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index 1d104cf55d..aa2f4eb289 100644
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -193,12 +193,7 @@ namespace LLInitParam
{
if (!silent)
{
- std::string file_name = p.getCurrentFileName();
- if(!file_name.empty())
- {
- file_name = "in file: " + file_name;
- }
- p.parserWarning(llformat("Failed to parse parameter \"%s\" %s", p.getCurrentElementName().c_str(), file_name.c_str()));
+ p.parserWarning(llformat("Failed to parse parameter \"%s\"", p.getCurrentElementName().c_str()));
}
return false;
}
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index f70eebc594..6135cc56ad 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -72,6 +72,7 @@ LLScrollContainer::Params::Params()
hide_scrollbar("hide_scrollbar"),
min_auto_scroll_rate("min_auto_scroll_rate", 100),
max_auto_scroll_rate("max_auto_scroll_rate", 1000),
+ max_auto_scroll_zone("max_auto_scroll_zone", 16),
reserve_scroll_corner("reserve_scroll_corner", false),
size("size", -1)
{}
@@ -88,6 +89,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p)
mReserveScrollCorner(p.reserve_scroll_corner),
mMinAutoScrollRate(p.min_auto_scroll_rate),
mMaxAutoScrollRate(p.max_auto_scroll_rate),
+ mMaxAutoScrollZone(p.max_auto_scroll_zone),
mScrolledView(NULL),
mSize(p.size)
{
@@ -290,8 +292,22 @@ BOOL LLScrollContainer::handleDragAndDrop(S32 x, S32 y, MASK mask,
return TRUE;
}
+bool LLScrollContainer::canAutoScroll(S32 x, S32 y)
+{
+ if (mAutoScrolling)
+ {
+ return true; // already scrolling
+ }
+ return autoScroll(x, y, false);
+}
+
bool LLScrollContainer::autoScroll(S32 x, S32 y)
{
+ return autoScroll(x, y, true);
+}
+
+bool LLScrollContainer::autoScroll(S32 x, S32 y, bool do_scroll)
+{
static LLUICachedControl<S32> scrollbar_size_control ("UIScrollbarSize", 0);
S32 scrollbar_size = (mSize == -1 ? scrollbar_size_control : mSize);
@@ -302,6 +318,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
screenRectToLocal(getRootView()->getLocalRect(), &screen_local_extents);
LLRect inner_rect_local( 0, mInnerRect.getHeight(), mInnerRect.getWidth(), 0 );
+ // Note: Will also include scrollers as scroll zones, so opposite
+ // scroll zones might have different size due to visible scrollers
if( mScrollbar[HORIZONTAL]->getVisible() )
{
inner_rect_local.mBottom += scrollbar_size;
@@ -316,8 +334,8 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
S32 auto_scroll_speed = ll_round(mAutoScrollRate * LLFrameTimer::getFrameDeltaTimeF32());
// autoscroll region should take up no more than one third of visible scroller area
- S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, 10);
- S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, 10);
+ S32 auto_scroll_region_width = llmin(inner_rect_local.getWidth() / 3, (S32)mMaxAutoScrollZone);
+ S32 auto_scroll_region_height = llmin(inner_rect_local.getHeight() / 3, (S32)mMaxAutoScrollZone);
if( mScrollbar[HORIZONTAL]->getVisible() )
{
@@ -325,8 +343,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
left_scroll_rect.mRight = inner_rect_local.mLeft + auto_scroll_region_width;
if( left_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() > 0) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -334,8 +355,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
right_scroll_rect.mLeft = inner_rect_local.mRight - auto_scroll_region_width;
if( right_scroll_rect.pointInRect( x, y ) && (mScrollbar[HORIZONTAL]->getDocPos() < mScrollbar[HORIZONTAL]->getDocPosMax()) )
{
- mScrollbar[HORIZONTAL]->setDocPos( mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[HORIZONTAL]->setDocPos(mScrollbar[HORIZONTAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
@@ -345,8 +369,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
bottom_scroll_rect.mTop = inner_rect_local.mBottom + auto_scroll_region_height;
if( bottom_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() < mScrollbar[VERTICAL]->getDocPosMax()) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() + auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
@@ -354,8 +381,11 @@ bool LLScrollContainer::autoScroll(S32 x, S32 y)
top_scroll_rect.mBottom = inner_rect_local.mTop - auto_scroll_region_height;
if( top_scroll_rect.pointInRect( x, y ) && (mScrollbar[VERTICAL]->getDocPos() > 0) )
{
- mScrollbar[VERTICAL]->setDocPos( mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed );
- mAutoScrolling = TRUE;
+ if (do_scroll)
+ {
+ mScrollbar[VERTICAL]->setDocPos(mScrollbar[VERTICAL]->getDocPos() - auto_scroll_speed);
+ mAutoScrolling = TRUE;
+ }
scrolling = true;
}
}
diff --git a/indra/llui/llscrollcontainer.h b/indra/llui/llscrollcontainer.h
index c4c4d0a136..e6c7891397 100644
--- a/indra/llui/llscrollcontainer.h
+++ b/indra/llui/llscrollcontainer.h
@@ -66,6 +66,7 @@ public:
hide_scrollbar;
Optional<F32> min_auto_scroll_rate,
max_auto_scroll_rate;
+ Optional<U32> max_auto_scroll_zone;
Optional<LLUIColor> bg_color;
Optional<LLScrollbar::callback_t> scroll_callback;
Optional<S32> size;
@@ -114,7 +115,8 @@ public:
virtual void draw();
virtual bool addChild(LLView* view, S32 tab_group = 0);
-
+
+ bool canAutoScroll(S32 x, S32 y);
bool autoScroll(S32 x, S32 y);
S32 getSize() const { return mSize; }
@@ -128,6 +130,7 @@ private:
virtual void scrollHorizontal( S32 new_pos );
virtual void scrollVertical( S32 new_pos );
void updateScroll();
+ bool autoScroll(S32 x, S32 y, bool do_scroll);
void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const;
LLScrollbar* mScrollbar[ORIENTATION_COUNT];
@@ -141,6 +144,7 @@ private:
F32 mAutoScrollRate;
F32 mMinAutoScrollRate;
F32 mMaxAutoScrollRate;
+ U32 mMaxAutoScrollZone;
bool mHideScrollbar;
};
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 99a0869ce3..138ba8bf02 100644
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -58,10 +58,6 @@ static LLInitParam::Parser::parser_inspect_func_map_t sSimpleXUIInspectFuncs;
const char* NO_VALUE_MARKER = "no_value";
-#ifdef LL_WINDOWS
-const S32 LINE_NUMBER_HERE = 0;
-#endif
-
struct MaxOccursValues : public LLInitParam::TypeValuesHelper<U32, MaxOccursValues>
{
static void declareValues()
@@ -1313,22 +1309,14 @@ bool LLXUIParser::writeSDValue(Parser& parser, const void* val_ptr, name_stack_t
void LLXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserWarning(warning_msg);
}
void LLXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s(%d)", message.c_str(), mCurFileName.c_str(), mCurReadNode->getLineNumber());
+ Parser::parserError(error_msg);
}
@@ -1641,22 +1629,14 @@ bool LLSimpleXUIParser::processText()
void LLSimpleXUIParser::parserWarning(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserWarning(message);
-#endif
+ std::string warning_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserWarning(warning_msg);
}
void LLSimpleXUIParser::parserError(const std::string& message)
{
-#ifdef LL_WINDOWS
- // use Visual Studio friendly formatting of output message for easy access to originating xml
- LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL;
-#else
- Parser::parserError(message);
-#endif
+ std::string error_msg = llformat("%s:\t%s", message.c_str(), mCurFileName.c_str());
+ Parser::parserError(error_msg);
}
bool LLSimpleXUIParser::readFlag(Parser& parser, void* val_ptr)
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c544205df0..0303581d62 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -812,6 +812,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>FramePerSecondLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Test</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>120</integer>
+ </map>
<key>BackgroundYieldTime</key>
<map>
<key>Comment</key>
@@ -1382,7 +1393,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>512</integer>
+ <integer>1024</integer>
</map>
<key>CacheValidateCounter</key>
<map>
@@ -4534,7 +4545,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
+ <string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
<key>HighResSnapshot</key>
<map>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 37340a42b6..f72eb48f81 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -315,8 +315,6 @@ F32SecondsImplicit gFrameIntervalSeconds = 0.f;
F32 gFPSClamped = 10.f; // Pretend we start at target rate.
F32 gFrameDTClamped = 0.f; // Time between adjacent checks to network for packets
U64MicrosecondsImplicit gStartTime = 0; // gStartTime is "private", used only to calculate gFrameTimeSeconds
-U32 gFrameStalls = 0;
-const F64 FRAME_STALL_THRESHOLD = 1.0;
LLTimer gRenderStartTime;
LLFrameTimer gForegroundTime;
@@ -705,7 +703,8 @@ LLAppViewer::LLAppViewer()
mFastTimerLogThread(NULL),
mUpdater(new LLUpdaterService()),
mSettingsLocationList(NULL),
- mIsFirstRun(false)
+ mIsFirstRun(false),
+ mMinMicroSecPerFrame(0.f)
{
if(NULL != sInstance)
{
@@ -1249,6 +1248,9 @@ bool LLAppViewer::init()
joystick->setNeedsReset(true);
/*----------------------------------------------------------------------*/
+ gSavedSettings.getControl("FramePerSecondLimit")->getSignal()->connect(boost::bind(&LLAppViewer::onChangeFrameLimit, this, _2));
+ onChangeFrameLimit(gSavedSettings.getLLSD("FramePerSecondLimit"));
+
return true;
}
@@ -1328,9 +1330,6 @@ bool LLAppViewer::frame()
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
LLSD newFrame;
- LLTimer frameTimer,idleTimer;
- LLTimer debugTime;
-
//LLPrivateMemoryPoolTester::getInstance()->run(false) ;
//LLPrivateMemoryPoolTester::getInstance()->run(true) ;
//LLPrivateMemoryPoolTester::destroy() ;
@@ -1371,14 +1370,6 @@ bool LLAppViewer::frame()
gViewerWindow->getWindow()->gatherInput();
}
-#if 1 && !LL_RELEASE_FOR_DOWNLOAD
- // once per second debug info
- if (debugTime.getElapsedTimeF32() > 1.f)
- {
- debugTime.reset();
- }
-
-#endif
//memory leaking simulation
LLFloaterMemLeak* mem_leak_instance =
LLFloaterReg::findTypedInstance<LLFloaterMemLeak>("mem_leaking");
@@ -1432,7 +1423,24 @@ bool LLAppViewer::frame()
{
pingMainloopTimeout("Main:Display");
gGLActive = TRUE;
+
+ static U64 last_call = 0;
+ if (!gTeleportDisplay)
+ {
+ // Frame/draw throttling
+ U64 elapsed_time = LLTimer::getTotalTime() - last_call;
+ if (elapsed_time < mMinMicroSecPerFrame)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_SLEEP);
+ // llclamp for when time function gets funky
+ U64 sleep_time = llclamp(mMinMicroSecPerFrame - elapsed_time, (U64)1, (U64)1e6);
+ micro_sleep(sleep_time, 0);
+ }
+ }
+ last_call = LLTimer::getTotalTime();
+
display();
+
pingMainloopTimeout("Main:Snapshot");
LLFloaterSnapshot::update(); // take snapshots
LLFloaterOutfitSnapshot::update();
@@ -1460,7 +1468,8 @@ bool LLAppViewer::frame()
|| !gFocusMgr.getAppHasFocus())
{
// Sleep if we're not rendering, or the window is minimized.
- S32 milliseconds_to_sleep = llclamp(gSavedSettings.getS32("BackgroundYieldTime"), 0, 1000);
+ static LLCachedControl<S32> s_bacground_yeild_time(gSavedSettings, "BackgroundYieldTime", 40);
+ S32 milliseconds_to_sleep = llclamp((S32)s_bacground_yeild_time, 0, 1000);
// don't sleep when BackgroundYieldTime set to 0, since this will still yield to other threads
// of equal priority on Windows
if (milliseconds_to_sleep > 0)
@@ -1484,7 +1493,6 @@ bool LLAppViewer::frame()
ms_sleep(500);
}
- idleTimer.reset();
S32 total_work_pending = 0;
S32 total_io_pending = 0;
{
@@ -1537,13 +1545,6 @@ bool LLAppViewer::frame()
}
}
- if ((LLStartUp::getStartupState() >= STATE_CLEANUP) &&
- (frameTimer.getElapsedTimeF64() > FRAME_STALL_THRESHOLD))
- {
- gFrameStalls++;
- }
- frameTimer.reset();
-
resumeMainloopTimeout();
pingMainloopTimeout("Main:End");
@@ -4396,23 +4397,15 @@ bool LLAppViewer::initCache()
// Init the texture cache
// Allocate 80% of the cache size for textures
const S32 MB = 1024 * 1024;
- const S64 MIN_CACHE_SIZE = 64 * MB;
+ const S64 MIN_CACHE_SIZE = 256 * MB;
const S64 MAX_CACHE_SIZE = 9984ll * MB;
const S64 MAX_VFS_SIZE = 1024 * MB; // 1 GB
S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB;
cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
- S64 texture_cache_size = ((cache_size * 8) / 10);
- S64 vfs_size = cache_size - texture_cache_size;
-
- if (vfs_size > MAX_VFS_SIZE)
- {
- // Give the texture cache more space, since the VFS can't be bigger than 1GB.
- // This happens when the user's CacheSize setting is greater than 5GB.
- vfs_size = MAX_VFS_SIZE;
- texture_cache_size = cache_size - MAX_VFS_SIZE;
- }
+ S64 vfs_size = llmin((S64)((cache_size * 2) / 10), MAX_VFS_SIZE);
+ S64 texture_cache_size = cache_size - vfs_size;
S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
texture_cache_size -= extra;
@@ -5585,6 +5578,19 @@ void LLAppViewer::disconnectViewer()
LLUrlEntryParcel::setDisconnected(gDisconnected);
}
+bool LLAppViewer::onChangeFrameLimit(LLSD const & evt)
+{
+ if (evt.asInteger() > 0)
+ {
+ mMinMicroSecPerFrame = 1000000 / evt.asInteger();
+ }
+ else
+ {
+ mMinMicroSecPerFrame = 0;
+ }
+ return false;
+}
+
void LLAppViewer::forceErrorLLError()
{
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 7bb3c32c51..9656deb4e1 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -255,6 +255,8 @@ private:
void sendLogoutRequest();
void disconnectViewer();
+ bool onChangeFrameLimit(LLSD const & evt);
+
// *FIX: the app viewer class should be some sort of singleton, no?
// Perhaps its child class is the singleton and this should be an abstract base.
static LLAppViewer* sInstance;
@@ -316,6 +318,8 @@ private:
LLAppCoreHttp mAppCoreHttp;
bool mIsFirstRun;
+ U64 mMinMicroSecPerFrame; // frame throttling
+
//---------------------------------------------
//*NOTE: Mani - legacy updater stuff
// Still useable?
@@ -371,7 +375,6 @@ extern F32SecondsImplicit gFrameTimeSeconds; // Loses msec precision after ~4
extern F32SecondsImplicit gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds
extern F32 gFPSClamped; // Frames per second, smoothed, weighted toward last frame
extern F32 gFrameDTClamped;
-extern U32 gFrameStalls;
extern LLTimer gRenderStartTime;
extern LLFrameTimer gForegroundTime;
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index b6e61f83b1..e075a311c2 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -43,9 +43,9 @@
#include "llworld.h"
#include "llvoavatar.h"
+static const F32 SEC_PER_FLEXI_FRAME = 1.f / 60.f; // 60 flexi updates per second
/*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f;
std::vector<LLVolumeImplFlexible*> LLVolumeImplFlexible::sInstanceList;
-std::vector<S32> LLVolumeImplFlexible::sUpdateDelay;
static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_REBUILD("Rebuild");
static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
@@ -56,7 +56,10 @@ static LLTrace::BlockTimerStatHandle FTM_DO_FLEXIBLE_UPDATE("Flexible Update");
// constructor
//-----------------------------------------------
LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectData* attributes) :
- mVO(vo), mAttributes(attributes)
+ mVO(vo),
+ mAttributes(attributes),
+ mLastFrameNum(0),
+ mLastUpdatePeriod(0)
{
static U32 seed = 0;
mID = seed++;
@@ -64,7 +67,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mUpdated = FALSE;
mInitializedRes = -1;
mSimulateRes = 0;
- mFrameNum = 0;
mCollisionSphereRadius = 0.f;
mRenderRes = -1;
@@ -75,7 +77,6 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
mInstanceIndex = sInstanceList.size();
sInstanceList.push_back(this);
- sUpdateDelay.push_back(0);
}//-----------------------------------------------
LLVolumeImplFlexible::~LLVolumeImplFlexible()
@@ -86,28 +87,28 @@ LLVolumeImplFlexible::~LLVolumeImplFlexible()
{
sInstanceList[mInstanceIndex] = sInstanceList[end_idx];
sInstanceList[mInstanceIndex]->mInstanceIndex = mInstanceIndex;
- sUpdateDelay[mInstanceIndex] = sUpdateDelay[end_idx];
}
sInstanceList.pop_back();
- sUpdateDelay.pop_back();
}
//static
void LLVolumeImplFlexible::updateClass()
{
- std::vector<S32>::iterator delay_iter = sUpdateDelay.begin();
+ LL_RECORD_BLOCK_TIME(FTM_DO_FLEXIBLE_UPDATE);
+ U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
for (std::vector<LLVolumeImplFlexible*>::iterator iter = sInstanceList.begin();
iter != sInstanceList.end();
++iter)
{
- --(*delay_iter);
- if (*delay_iter <= 0)
+ // Note: by now update period might have changed
+ if ((*iter)->mRenderRes == -1
+ || (*iter)->mLastFrameNum + (*iter)->mLastUpdatePeriod <= virtual_frame_num
+ || (*iter)->mLastFrameNum > virtual_frame_num) //time issues, overflow
{
(*iter)->doIdleUpdate();
}
- ++delay_iter;
}
}
@@ -334,15 +335,12 @@ void LLVolumeImplFlexible::updateRenderRes()
// updated every time step. In the future, perhaps there could be an
// optimization similar to what Havok does for objects that are stationary.
//---------------------------------------------------------------------------------
-static LLTrace::BlockTimerStatHandle FTM_FLEXIBLE_UPDATE("Update Flexies");
void LLVolumeImplFlexible::doIdleUpdate()
{
LLDrawable* drawablep = mVO->mDrawable;
if (drawablep)
{
- //LL_RECORD_BLOCK_TIME(FTM_FLEXIBLE_UPDATE);
-
//ensure drawable is active
drawablep->makeActive();
@@ -354,15 +352,20 @@ void LLVolumeImplFlexible::doIdleUpdate()
{
updateRenderRes();
gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
- sUpdateDelay[mInstanceIndex] = 0;
}
else
{
F32 pixel_area = mVO->getPixelArea();
+ // Note: Flexies afar will be rarely updated, closer ones will be updated more frequently.
+ // But frequency differences are extremely noticeable, so consider modifying update factor,
+ // or at least clamping value a bit more from both sides.
U32 update_period = (U32) (llmax((S32) (LLViewerCamera::getInstance()->getScreenPixelArea()*0.01f/(pixel_area*(sUpdateFactor+1.f))),0)+1);
// MAINT-1890 Clamp the update period to ensure that the update_period is no greater than 32 frames
- update_period = llclamp(update_period, 0U, 32U);
+ update_period = llclamp(update_period, 1U, 32U);
+
+ // We control how fast flexies update, buy splitting updates among frames
+ U64 virtual_frame_num = LLTimer::getElapsedSeconds() / SEC_PER_FLEXI_FRAME;
if (visible)
{
@@ -370,42 +373,44 @@ void LLVolumeImplFlexible::doIdleUpdate()
pixel_area > 256.f)
{
U32 id;
-
if (mVO->isRootEdit())
{
id = mID;
}
else
{
- LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
+ LLVOVolume* parent = (LLVOVolume*)mVO->getParent();
id = parent->getVolumeInterfaceID();
}
- if (mVO->isRootEdit())
- {
- id = mID;
- }
- else
- {
- LLVOVolume* parent = (LLVOVolume*) mVO->getParent();
- id = parent->getVolumeInterfaceID();
- }
- if ((LLDrawable::getCurrentFrame()+id)%update_period == 0)
- {
- sUpdateDelay[mInstanceIndex] = (S32) update_period-1;
+ // Throttle flexies and spread load by preventing flexies from updating in same frame
+ // Shows how many frames we need to wait before next update
+ U64 throttling_delay = (virtual_frame_num + id) % update_period;
- updateRenderRes();
+ if ((throttling_delay == 0 && mLastFrameNum < virtual_frame_num) //one or more virtual frames per frame
+ || (mLastFrameNum + update_period < virtual_frame_num)) // missed virtual frame
+ {
+ // We need mLastFrameNum to compensate for 'unreliable time' and to filter 'duplicate' frames
+ // If happened too late, subtract throttling_delay (it is zero otherwise)
+ mLastFrameNum = virtual_frame_num - throttling_delay;
+
+ // Store update period for updateClass()
+ // Note: Consider substituting update_period with mLastUpdatePeriod everywhere.
+ mLastUpdatePeriod = update_period;
+
+ updateRenderRes();
- gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_POSITION, FALSE);
+ }
+ }
}
- }
- }
else
{
- sUpdateDelay[mInstanceIndex] = (S32) update_period;
- }
-}
+ mLastFrameNum = virtual_frame_num;
+ mLastUpdatePeriod = update_period;
+ }
+ }
}
}
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index a00551df8e..9383ab03ae 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -72,7 +72,6 @@ class LLVolumeImplFlexible : public LLVolumeInterface
{
private:
static std::vector<LLVolumeImplFlexible*> sInstanceList;
- static std::vector<S32> sUpdateDelay;
S32 mInstanceIndex;
public:
@@ -133,7 +132,8 @@ private:
S32 mInitializedRes;
S32 mSimulateRes;
S32 mRenderRes;
- U32 mFrameNum;
+ U64 mLastFrameNum;
+ U32 mLastUpdatePeriod;
LLVector3 mCollisionSpherePosition;
F32 mCollisionSphereRadius;
U32 mID;
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4352909706..695b321751 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2181,17 +2181,8 @@ void LLPanelLandOptions::refreshSearch()
&& region
&& !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH));
- // There is a bug with this panel whereby the Show Directory bit can be
- // slammed off by the Region based on an override. Since this data is cached
- // locally the change will not reflect in the panel, which could cause confusion
- // A workaround for this is to flip the bit off in the locally cached version
- // when we detect a mismatch case.
- if(!can_change && parcel->getParcelFlag(PF_SHOW_DIRECTORY))
- {
- parcel->setParcelFlag(PF_SHOW_DIRECTORY, FALSE);
- }
BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY);
- mCheckShowDirectory ->set(show_directory);
+ mCheckShowDirectory->set(show_directory);
// Set by string in case the order in UI doesn't match the order by index.
LLParcel::ECategory cat = parcel->getCategory();
diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp
index 3f80d6f1a4..10cce3bd22 100644
--- a/indra/newview/llfloaterlinkreplace.cpp
+++ b/indra/newview/llfloaterlinkreplace.cpp
@@ -41,16 +41,13 @@ LLFloaterLinkReplace::LLFloaterLinkReplace(const LLSD& key)
mRemainingItems(0),
mSourceUUID(LLUUID::null),
mTargetUUID(LLUUID::null),
- mInstance(NULL),
mBatchSize(gSavedSettings.getU32("LinkReplaceBatchSize"))
{
mEventTimer.stop();
- mInstance = this;
}
LLFloaterLinkReplace::~LLFloaterLinkReplace()
{
- mInstance = NULL;
}
BOOL LLFloaterLinkReplace::postBuild()
@@ -180,11 +177,9 @@ void LLFloaterLinkReplace::onStartClicked()
}
}
-void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id)
{
LL_DEBUGS() << "Inventory link replace:" << LL_NEWLINE
<< " - old_item_id = " << old_item_id.asString() << LL_NEWLINE
@@ -239,20 +234,21 @@ void LLFloaterLinkReplace::linkCreatedCallback(const LLUUID& old_item_id,
outfit_update_folder = outfit_folder_id;
}
- LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, this, outfit_update_folder));
+ LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::itemRemovedCallback, floater_handle, outfit_update_folder));
remove_inventory_object(old_item_id, cb);
}
-void LLFloaterLinkReplace::itemRemovedCallback(const LLUUID& outfit_folder_id)
+// static
+void LLFloaterLinkReplace::itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id)
{
if (outfit_folder_id.notNull())
{
LLAppearanceMgr::getInstance()->updateClothingOrderingInfo(outfit_folder_id);
}
- if (mInstance)
+ if (!floater_handle.isDead())
{
- decreaseOpenItemCount();
+ floater_handle.get()->decreaseOpenItemCount();
}
}
@@ -324,7 +320,7 @@ void LLFloaterLinkReplace::processBatch(LLInventoryModel::item_array_t items)
LLInventoryObject::const_object_list_t obj_array;
obj_array.push_back(LLConstPointer<LLInventoryObject>(target_item));
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&LLFloaterLinkReplace::linkCreatedCallback,
- this,
+ getDerivedHandle<LLFloaterLinkReplace>(),
source_item->getUUID(),
target_item->getUUID(),
needs_wearable_ordering_update,
diff --git a/indra/newview/llfloaterlinkreplace.h b/indra/newview/llfloaterlinkreplace.h
index 377dd1d450..dd5c301206 100644
--- a/indra/newview/llfloaterlinkreplace.h
+++ b/indra/newview/llfloaterlinkreplace.h
@@ -98,12 +98,9 @@ private:
void updateFoundLinks();
void processBatch(LLInventoryModel::item_array_t items);
- void linkCreatedCallback(const LLUUID& old_item_id,
- const LLUUID& target_item_id,
- bool needs_wearable_ordering_update,
- bool needs_description_update,
- const LLUUID& outfit_folder_id);
- void itemRemovedCallback(const LLUUID& outfit_folder_id);
+ static void linkCreatedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& old_item_id, const LLUUID& target_item_id,
+ bool needs_wearable_ordering_update, bool needs_description_update, const LLUUID& outfit_folder_id);
+ static void itemRemovedCallback(LLHandle<LLFloaterLinkReplace> floater_handle, const LLUUID& outfit_folder_id);
void onSourceItemDrop(const LLUUID& source_item_id);
void onTargetItemDrop(const LLUUID& target_item_id);
@@ -120,8 +117,6 @@ private:
U32 mBatchSize;
LLInventoryModel::item_array_t mRemainingInventoryItems;
-
- LLFloaterLinkReplace* mInstance;
};
#endif // LL_FLOATERLINKREPLACE_H
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index b5fd3df0f3..b0ee8e7fcb 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -37,6 +37,28 @@ using namespace std;
unsigned char static_unique_id[] = {0,0,0,0,0,0};
bool static has_static_unique_id = false;
+#if LL_WINDOWS
+
+class LLComInitialize
+{
+ HRESULT mHR;
+public:
+ LLComInitialize()
+ {
+ mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
+ if (FAILED(mHR))
+ LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
+ }
+
+ ~LLComInitialize()
+ {
+ if (SUCCEEDED(mHR))
+ CoUninitialize();
+ }
+};
+
+#endif //LL_WINDOWS
+
// get an unique machine id.
// NOT THREAD SAFE - do before setting up threads.
// MAC Address doesn't work for Windows 7 since the first returned hardware MAC address changes with each reboot, Go figure??
@@ -59,12 +81,7 @@ S32 LLMachineID::init()
// Step 1: --------------------------------------------------
// Initialize COM. ------------------------------------------
- hres = CoInitializeEx(0, COINIT_MULTITHREADED);
- if (FAILED(hres))
- {
- LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << hres << LL_ENDL;
- return 1; // Program has failed.
- }
+ LLComInitialize comInit;
// Step 2: --------------------------------------------------
// Set general COM security levels --------------------------
@@ -89,7 +106,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << hres << LL_ENDL;
- CoUninitialize();
return 1; // Program has failed.
}
@@ -107,7 +123,6 @@ S32 LLMachineID::init()
if (FAILED(hres))
{
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << hres << LL_ENDL;
- CoUninitialize();
return 1; // Program has failed.
}
@@ -134,7 +149,6 @@ S32 LLMachineID::init()
{
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << hres << LL_ENDL;
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -160,7 +174,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -181,7 +194,6 @@ S32 LLMachineID::init()
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
pSvc->Release();
pLoc->Release();
- CoUninitialize();
return 1; // Program has failed.
}
@@ -236,7 +248,6 @@ S32 LLMachineID::init()
pLoc->Release();
if (pEnumerator)
pEnumerator->Release();
- CoUninitialize();
ret_code=0;
#else
unsigned char * staticPtr = (unsigned char *)(&static_unique_id[0]);
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index dd75ae9c06..c34dd64cba 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -540,7 +540,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
// Check to see if we are auto scrolling from the last frame
LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
- BOOL needsToScroll = panel->getScrollableContainer()->autoScroll(x, y);
+ BOOL needsToScroll = panel->getScrollableContainer()->canAutoScroll(x, y);
if(mFilterTabs)
{
if(needsToScroll)
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index fb40af1302..12ac9e6fc5 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -148,6 +148,12 @@ void LLPreviewAnim::draw()
}
if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
{
+ const LLInventoryItem *item = getItem();
+ LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
+ if (item && motion)
+ {
+ motion->setName(item->getName());
+ }
this->mDidStart = true;
}
}
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fc052ae3aa..b829741b3c 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -113,7 +113,7 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
mMouseDownY = y;
//left mouse down always picks transparent (but see handleMouseUp)
- mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
+ mPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
mPick.mKeyMask = mask;
mMouseButtonDown = true;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index da6b18bb77..6c9fe5e39b 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1511,67 +1511,64 @@ void purge_descendents_of(const LLUUID& id, LLPointer<LLInventoryCallback> cb)
LLPointer<LLViewerInventoryCategory> cat = gInventory.getCategory(id);
if (cat.notNull())
{
- if (LLClipboard::instance().hasContents() && LLClipboard::instance().isCutMode())
+ if (LLClipboard::instance().hasContents())
{
- // Something on the clipboard is in "cut mode" and needs to be preserved
- LL_DEBUGS(LOG_INV) << "purge_descendents_of clipboard case " << cat->getName()
- << " iterate and purge non hidden items" << LL_ENDL;
- LLInventoryModel::cat_array_t* categories;
- LLInventoryModel::item_array_t* items;
- // Get the list of direct descendants in tha categoy passed as argument
- gInventory.getDirectDescendentsOf(id, categories, items);
- std::vector<LLUUID> list_uuids;
- // Make a unique list with all the UUIDs of the direct descendants (items and categories are not treated differently)
- // Note: we need to do that shallow copy as purging things will invalidate the categories or items lists
- for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); it != categories->end(); ++it)
- {
- list_uuids.push_back((*it)->getUUID());
- }
- for (LLInventoryModel::item_array_t::const_iterator it = items->begin(); it != items->end(); ++it)
+ // Remove items from clipboard or it will remain active even if there is nothing to paste/copy
+ LLInventoryModel::cat_array_t categories;
+ LLInventoryModel::item_array_t items;
+ gInventory.collectDescendents(id, categories, items, TRUE);
+
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it)
{
- list_uuids.push_back((*it)->getUUID());
+ if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
+ {
+ // No sense in removing single items, partial 'paste' will result in confusion only
+ LLClipboard::instance().reset();
+ break;
+ }
}
- // Iterate through the list and only purge the UUIDs that are not on the clipboard
- for (std::vector<LLUUID>::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it)
+ if (LLClipboard::instance().hasContents())
{
- if (!LLClipboard::instance().isOnClipboard(*it))
+ for (LLInventoryModel::item_array_t::const_iterator it = items.begin(); it != items.end(); ++it)
{
- remove_inventory_object(*it, NULL);
+ if (LLClipboard::instance().isOnClipboard((*it)->getUUID()))
+ {
+ LLClipboard::instance().reset();
+ break;
+ }
}
}
}
- else
+
+ if (AISAPI::isAvailable())
{
- if (AISAPI::isAvailable())
+ if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
- if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
- {
- LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
- }
- AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
- AISAPI::PurgeDescendents(id, cr);
+ LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL;
}
- else // no cap
+ AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
+ AISAPI::PurgeDescendents(id, cr);
+ }
+ else // no cap
+ {
+ // Fast purge
+ LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
+
+ // send it upstream
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("PurgeInventoryDescendents");
+ msg->nextBlock("AgentData");
+ msg->addUUID("AgentID", gAgent.getID());
+ msg->addUUID("SessionID", gAgent.getSessionID());
+ msg->nextBlock("InventoryData");
+ msg->addUUID("FolderID", id);
+ gAgent.sendReliableMessage();
+
+ // Update model immediately because there is no callback mechanism.
+ gInventory.onDescendentsPurgedFromServer(id);
+ if (cb)
{
- // Fast purge
- LL_DEBUGS(LOG_INV) << "purge_descendents_of fast case " << cat->getName() << LL_ENDL;
-
- // send it upstream
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("PurgeInventoryDescendents");
- msg->nextBlock("AgentData");
- msg->addUUID("AgentID", gAgent.getID());
- msg->addUUID("SessionID", gAgent.getSessionID());
- msg->nextBlock("InventoryData");
- msg->addUUID("FolderID", id);
- gAgent.sendReliableMessage();
-
- // Update model immediately because there is no callback mechanism.
- gInventory.onDescendentsPurgedFromServer(id);
- if (cb)
- {
- cb->fire(id);
- }
+ cb->fire(id);
}
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 06f868dc08..1ce18f5496 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3569,7 +3569,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLAvatarName av_name;
if (LLAvatarNameCache::get(from_id, &av_name))
{
- chat.mFromName = av_name.getDisplayName();
+ chat.mFromName = av_name.getCompleteName();
}
else
{
@@ -6851,14 +6851,10 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
// Get the message ID
msg->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, message_id);
big_reason = LLAgent::sTeleportErrorMessages[message_id];
- if ( big_reason.size() > 0 )
- { // Substitute verbose reason from the local map
- args["REASON"] = big_reason;
- }
- else
- { // Nothing found in the map - use what the server returned in the original message block
+ if ( big_reason.size() <= 0 )
+ {
+ // Nothing found in the map - use what the server returned in the original message block
msg->getStringFast(_PREHASH_Info, _PREHASH_Reason, big_reason);
- args["REASON"] = big_reason;
}
LLSD llsd_block;
@@ -6873,6 +6869,16 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
else
{
+ if(llsd_block.has("REGION_NAME"))
+ {
+ std::string region_name = llsd_block["REGION_NAME"].asString();
+ if(!region_name.empty())
+ {
+ LLStringUtil::format_map_t name_args;
+ name_args["[REGION_NAME]"] = region_name;
+ LLStringUtil::format(big_reason, name_args);
+ }
+ }
// change notification name in this special case
if (handle_teleport_access_blocked(llsd_block, message_id, args["REASON"]))
{
@@ -6884,7 +6890,7 @@ void process_teleport_failed(LLMessageSystem *msg, void**)
}
}
}
-
+ args["REASON"] = big_reason;
}
else
{ // Extra message payload not found - use what the simulator sent
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index f52c82dab7..dd44697dcd 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -585,9 +585,6 @@ void send_stats()
misc["string_1"] = llformat("%d", window_size);
misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value());
-// misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21
-// misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21
-
F32 unbaked_time = LLVOAvatar::sUnbakedTime * 1000.f / gFrameTimeSeconds;
misc["int_1"] = LLSD::Integer(unbaked_time); // Steve: 1.22
F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 80c6805ead..ddb7ba1e4b 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3417,10 +3417,62 @@ void LLVOAvatar::updateDebugText()
std::string output;
if (motionp->getName().empty())
{
+ std::string name;
+ if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
+ {
+ name = motionp->getID().asString();
+ LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
+ for (; anim_it != mAnimationSources.end(); ++anim_it)
+ {
+ if (anim_it->second == motionp->getID())
+ {
+ LLViewerObject* object = gObjectList.findObject(anim_it->first);
+ if (!object)
+ {
+ break;
+ }
+ if (object->isAvatar())
+ {
+ if (mMotionController.mIsSelf)
+ {
+ // Searching inventory by asset id is really long
+ // so just mark as inventory
+ // Also item is likely to be named by LLPreviewAnim
+ name += "(inventory)";
+ }
+ }
+ else
+ {
+ LLViewerInventoryItem* item = NULL;
+ if (!object->isInventoryDirty())
+ {
+ item = object->getInventoryItemByAsset(motionp->getID());
+ }
+ if (item)
+ {
+ name = item->getName();
+ }
+ else if (object->isAttachment())
+ {
+ name += "(" + getAttachmentItemName() + ")";
+ }
+ else
+ {
+ // in-world object, name or content unknown
+ name += "(in-world)";
+ }
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ name = LLUUID::null.asString();
+ }
+
output = llformat("%s - %d",
- gAgent.isGodlikeWithoutAdminMenuFakery() ?
- motionp->getID().asString().c_str() :
- LLUUID::null.asString().c_str(),
+ name.c_str(),
(U32)motionp->getPriority());
}
else
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 189ed54993..a754e857ac 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -153,6 +153,7 @@ static bool sMuteListListener_listening = false;
///////////////////////////////////////////////////////////////////////////////////////////////
static LLProcessPtr sGatewayPtr;
+static LLEventStream sGatewayPump("VivoxDaemonPump", true);
static bool isGatewayRunning()
{
@@ -163,6 +164,7 @@ static void killGateway()
{
if (sGatewayPtr)
{
+ sGatewayPump.stopListening("VivoxDaemonPump");
sGatewayPtr->kill();
}
}
@@ -599,6 +601,19 @@ bool LLVivoxVoiceClient::endAndDisconnectSession()
return true;
}
+bool LLVivoxVoiceClient::callbackEndDaemon(const LLSD& data)
+{
+ if (!LLAppViewer::isExiting())
+ {
+ terminateAudioSession(false);
+ closeSocket();
+ cleanUp();
+ LLVoiceClient::getInstance()->setUserPTTState(false);
+ gAgent.setVoiceConnected(false);
+ }
+ sGatewayPump.stopListening("VivoxDaemonPump");
+ return false;
+}
bool LLVivoxVoiceClient::startAndLaunchDaemon()
{
@@ -670,6 +685,9 @@ bool LLVivoxVoiceClient::startAndLaunchDaemon()
params.args.add(LLVivoxSecurity::getInstance()->connectorHandle());
# endif // VIVOX_HANDLE_ARGS
+ params.postend = sGatewayPump.getName();
+ sGatewayPump.listen("VivoxDaemonPump", boost::bind(&LLVivoxVoiceClient::callbackEndDaemon, this, _1));
+
sGatewayPtr = LLProcess::create(params);
mDaemonHost = LLHost(gSavedSettings.getString("VivoxVoiceHost").c_str(), gSavedSettings.getU32("VivoxVoicePort"));
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 81e924e438..c7ce92fff5 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -623,6 +623,7 @@ private:
bool startAndConnectSession();
bool endAndDisconnectSession();
+ bool callbackEndDaemon(const LLSD& data);
bool startAndLaunchDaemon();
bool provisionVoiceAccount();
bool establishVoiceConnection();
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 8026dc3ea8..ec82765b96 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -224,6 +224,22 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
}
substitution["PARCEL_ID"] = llformat("%d", parcel_id);
+ // find the grid
+ std::string current_grid = LLGridManager::getInstance()->getGridId();
+ std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower);
+ if (current_grid == "agni")
+ {
+ substitution["GRID"] = "secondlife.com";
+ }
+ else if (current_grid == "damballah")
+ {
+ // Staging grid has its own naming scheme.
+ substitution["GRID"] = "secondlife-staging.com";
+ }
+ else
+ {
+ substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str());
+ }
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);
diff --git a/indra/newview/skins/default/xui/en/floater_grid_status.xml b/indra/newview/skins/default/xui/en/floater_grid_status.xml
index b97bd8056d..bf78204282 100644
--- a/indra/newview/skins/default/xui/en/floater_grid_status.xml
+++ b/indra/newview/skins/default/xui/en/floater_grid_status.xml
@@ -12,7 +12,6 @@
save_rect="true"
save_visibility="true"
title=""
- initial_mime_type="text/html"
width="780"
tab_stop="true"
filename="floater_web_content.xml"/>
diff --git a/indra/newview/skins/default/xui/en/floater_web_content.xml b/indra/newview/skins/default/xui/en/floater_web_content.xml
index 4473ce0cda..fe9ffba6cd 100644
--- a/indra/newview/skins/default/xui/en/floater_web_content.xml
+++ b/indra/newview/skins/default/xui/en/floater_web_content.xml
@@ -10,7 +10,6 @@
help_topic="floater_web_content"
save_rect="true"
title=""
- initial_mime_type="text/html"
width="780">
<layout_stack
bottom="775"
diff --git a/indra/newview/skins/default/xui/en/panel_active_object_row.xml b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
index 3e3271b181..656171ff96 100644
--- a/indra/newview/skins/default/xui/en/panel_active_object_row.xml
+++ b/indra/newview/skins/default/xui/en/panel_active_object_row.xml
@@ -18,15 +18,7 @@
left="5"
height="25"
width="25"
- visible="false"
- speaker.name="speaker_p2p"
- speaker.width="20"
- speaker.height="25"
- speaker.left="25"
- speaker.top="25"
- speaker.auto_update="true"
- speaker.draw_border="false"
- speaker.visible="false">
+ visible="false">
</chiclet_script>
<chiclet_offer
name="inv_offer_chiclet"
@@ -36,15 +28,7 @@
left="5"
height="25"
width="25"
- visible="false"
- speaker.name="speaker_p2p"
- speaker.width="20"
- speaker.height="25"
- speaker.left="25"
- speaker.top="25"
- speaker.auto_update="true"
- speaker.draw_border="false"
- speaker.visible="false">
+ visible="false">
</chiclet_offer>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index e844a15118..2316beeb36 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -193,7 +193,7 @@
follows="left|top"
height="16"
increment="1"
- initial_val="256"
+ initial_value="256"
label=""
label_width="0"
left_delta="68"
@@ -213,7 +213,7 @@
follows="left|top"
height="16"
increment="1"
- initial_val="256"
+ initial_value="256"
label=""
label_width="0"
left_delta="20"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index 0cd56af6d7..83ce912c77 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -32,7 +32,7 @@
height="23"
increment="64"
initial_value="1024"
- label="Cache size (64 - 9984MB)"
+ label="Cache size (256 - 9984MB)"
label_width="150"
layout="topleft"
left="80"
@@ -87,7 +87,7 @@
height="23"
layout="topleft"
left="80"
- max_length="4096"
+ max_length_bytes="4096"
name="cache_location"
top_pad="5"
width="205" />
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index 78f771cd51..9e7023d2f2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
border="true"
- has_border="true"
height="408"
label="Text Chat"
layout="topleft"
@@ -541,7 +540,7 @@
height="23"
layout="topleft"
left_pad="55"
- max_length="4096"
+ max_length_bytes="4096"
name="log_path_string"
top_delta="-5"
width="185">