LLFrameTimer review and resulting changes.

This makes the class API a bit more sane, although
only a bit, because I had to leave it working with
possibly new code merged in from LL: the API can't
really change. I also removed some unused code.

While reviewing how LLFrameTimer worked however,
I did find a few instances where things where broken:

* sFrameDeltaTime wasn't correctly updated (more
  than once per frame and therefore erratic). This
  only influenced scrolling speed, but still.
* While dragging an inventory item, the scroll
  arrows of a tab container didn't work
  (LLTabContainer::handleDragAndDrop).
* Map zoom interpolation was broken (it interpolated
  between A and B, but used the already updated
  interpolation for A the next frame...
  (added mCurZoomValInterpolationStart).
This commit is contained in:
Aleric Inglewood
2011-08-01 21:00:27 +02:00
parent ba5caa6d51
commit d828f858c9
19 changed files with 189 additions and 191 deletions

View File

@@ -390,7 +390,7 @@ LLViewerInventoryCategory::LLViewerInventoryCategory(const LLUUID& uuid,
mVersion(LLViewerInventoryCategory::VERSION_UNKNOWN),
mDescendentCount(LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)
{
mDescendentsRequested.reset();
mDescendentsRequested.stop();
}
LLViewerInventoryCategory::LLViewerInventoryCategory(const LLUUID& owner_id) :
@@ -398,7 +398,7 @@ LLViewerInventoryCategory::LLViewerInventoryCategory(const LLUUID& owner_id) :
mVersion(LLViewerInventoryCategory::VERSION_UNKNOWN),
mDescendentCount(LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)
{
mDescendentsRequested.reset();
mDescendentsRequested.stop();
}
LLViewerInventoryCategory::LLViewerInventoryCategory(const LLViewerInventoryCategory* other)
@@ -489,12 +489,12 @@ bool LLViewerInventoryCategory::fetchDescendents()
// <edit>
if((mUUID == gSystemFolderRoot) || (gInventory.isObjectDescendentOf(mUUID, gSystemFolderRoot))) return false;
// </edit>
if((VERSION_UNKNOWN == mVersion)
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
if (VERSION_UNKNOWN == mVersion &&
(!mDescendentsRequested.getStarted() ||
mDescendentsRequested.hasExpired())) // Expired check prevents multiple downloads.
{
const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.reset();
mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
mDescendentsRequested.start(FETCH_TIMER_EXPIRY);
// bitfield
// 1 = by date