Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up-to-date LSL/OSSL source highlighting #6

Open
wants to merge 21 commits into
base: future
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a8fb423
Fix compile warning due to signed/unsigned mistake.
TighMacFanatic Jul 17, 2011
4b9ab10
Merge branch 'master' of e:/SL_Dev/Siana
TighMacFanatic Jul 26, 2011
057a154
Minor documentation fixes.
AlericInglewood Jul 29, 2011
ba5caa6
Merge remote-tracking branch 'origin/master'
AlericInglewood Jul 30, 2011
d828f85
LLFrameTimer review and resulting changes.
AlericInglewood Aug 1, 2011
f54ca35
Fix label on disable TP and login screen options.
TighMacFanatic Aug 2, 2011
414666e
Merge remote-tracking branch 'tigh/master'
AlericInglewood Aug 2, 2011
27c91e2
Don't instantiate LLTextParser::getInstance before user logged in.
AlericInglewood Aug 2, 2011
393ee9d
This should fix the settings
siana Aug 3, 2011
d255bfa
Variable size region support, by RevolutionSmythe
siana Aug 3, 2011
f65624b
Debug build fixes, linux32
siana Aug 1, 2011
8787d37
Build fix for that
siana Aug 3, 2011
8d72f6f
This temporarily fixes inventory problems on Aurora.
siana Aug 4, 2011
20d2012
Fix a typo.
AlericInglewood Aug 4, 2011
881d065
Wrap sGlobalRawMemory in AIThreadSafe.
AlericInglewood Aug 4, 2011
7e7a238
Merge remote-tracking branch 'origin/master'
AlericInglewood Aug 5, 2011
5005f4a
Never pass an empty string as directory path to the filepicker.
AlericInglewood Aug 5, 2011
1c6d890
Correct, complete user profile path on Windows
siana Aug 7, 2011
3853d50
This should fix KV TVs
siana Aug 8, 2011
cdebc1c
Version 1.5.10(2)
siana Aug 9, 2011
764bbd6
Added the latest LSL and OSSL functions.
Fritigern Aug 11, 2011
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions etc/message.xml
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@
<key>FetchInventoryDescendents</key>
<boolean>false</boolean>

<key>WebFetchInventoryDescendents</key>
<boolean>true</boolean>

<key>FetchInventory</key>
<boolean>true</boolean>

Expand Down
2 changes: 1 addition & 1 deletion indra/cmake/00-Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ if (LINUX)
endif (${ARCH} STREQUAL "x86_64")
endif (VIEWER)

set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG} -msse2")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_RELEASESSE2 "-O3 ${CMAKE_CXX_FLAGS_RELEASESSE2}")
Expand Down
5 changes: 5 additions & 0 deletions indra/llcommon/indra_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ const char LAND_LAYER_CODE = 'L';
const char WATER_LAYER_CODE = 'W';
const char WIND_LAYER_CODE = '7';
const char CLOUD_LAYER_CODE = '8';
// Extended land layer for Aurora Sim
const char AURORA_LAND_LAYER_CODE = 'M';
const char AURORA_WATER_LAYER_CODE = 'X';
const char AURORA_WIND_LAYER_CODE = '9';
const char AURORA_CLOUD_LAYER_CODE = ':';

// keys
// Bit masks for various keyboard modifier keys.
Expand Down
9 changes: 0 additions & 9 deletions indra/llcommon/llapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,6 @@ LLSD LLApp::getOptionData(OptionPriority level)
return mOptions[level];
}

void LLApp::stepFrame()
{
LLFrameTimer::updateFrameTime();
LLFrameTimer::updateFrameCount();
LLEventTimer::updateClass();
mRunner.run();
}


void LLApp::setupErrorHandling()
{
// Error handling is done by starting up an error handling thread, which just sleeps and
Expand Down
19 changes: 0 additions & 19 deletions indra/llcommon/llapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,6 @@ class LL_COMMON_API LLApp : public LLOptionInterface
pid_t fork();
#endif

/**
* @brief Get a reference to the application runner
*
* Please use the runner with caution. Since the Runner usage
* pattern is not yet clear, this method just gives access to it
* to add and remove runnables.
* @return Returns the application runner. Do not save the
* pointer past the caller's stack frame.
*/
LLRunner& getRunner() { return mRunner; }

public:
typedef std::map<std::string, std::string> string_map;
string_map mOptionMap; // Contains all command-line options and arguments in a map
Expand All @@ -264,11 +253,6 @@ class LL_COMMON_API LLApp : public LLOptionInterface
static LLAppChildCallback sDefaultChildCallback;
#endif

/**
* @brief This method is called once a frame to do once a frame tasks.
*/
void stepFrame();

/**
* @ brief This method is called once as soon as logging is initialized.
*/
Expand All @@ -289,9 +273,6 @@ class LL_COMMON_API LLApp : public LLOptionInterface
// Default application threads
LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback

// This is the application level runnable scheduler.
LLRunner mRunner;

/** @name Runtime option implementation */
//@{

Expand Down
90 changes: 49 additions & 41 deletions indra/llcommon/llframetimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2009, Linden Research, Inc.
* Copyright (c) 2011, Aleric Inglewood.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
Expand Down Expand Up @@ -35,48 +36,55 @@

#include "llframetimer.h"

// Local constants.
static F64 const USEC_PER_SECOND = 1000000.0;
static F64 const USEC_TO_SEC_F64 = 0.000001;

// Static members
//LLTimer LLFrameTimer::sInternalTimer;
U64 LLFrameTimer::sStartTotalTime = totalTime();
F64 LLFrameTimer::sFrameTime = 0.0;
U64 LLFrameTimer::sTotalTime = 0;
F64 LLFrameTimer::sTotalSeconds = 0.0;
S32 LLFrameTimer::sFrameCount = 0;
U64 LLFrameTimer::sFrameDeltaTime = 0;
const F64 USEC_PER_SECOND = 1000000.0;
const F64 USEC_TO_SEC_F64 = 0.000001;
U64 const LLFrameTimer::sStartTotalTime = totalTime(); // Application start in microseconds since epoch.
U64 LLFrameTimer::sTotalTime = LLFrameTimer::sStartTotalTime; // Current time in microseconds since epoch, updated at least once per frame.
F64 LLFrameTimer::sTotalSeconds = // Current time in seconds since epoch, updated together with LLFrameTimer::sTotalTime.
U64_to_F64(LLFrameTimer::sTotalTime) * USEC_TO_SEC_F64;
F64 LLFrameTimer::sFrameTime = 0.0; // Current time in seconds since application start, updated together with LLFrameTimer::sTotalTime.
// Updated exactly once per frame:
S32 LLFrameTimer::sFrameCount = 0; // Current frame number (number of frames since application start).
U64 LLFrameTimer::sPrevTotalTime = LLFrameTimer::sStartTotalTime; // Previous (frame) time in microseconds since epoch, updated once per frame.
U64 LLFrameTimer::sFrameDeltaTime = 0; // Microseconds between last two calls to LLFrameTimer::updateFrameTimeAndCount.

// static
void LLFrameTimer::updateFrameTime()
{
U64 total_time = totalTime();
sFrameDeltaTime = total_time - sTotalTime;
sTotalTime = total_time;
sTotalTime = totalTime();
sTotalSeconds = U64_to_F64(sTotalTime) * USEC_TO_SEC_F64;
sFrameTime = U64_to_F64(sTotalTime - sStartTotalTime) * USEC_TO_SEC_F64;
}

void LLFrameTimer::start()
// static
void LLFrameTimer::updateFrameTimeAndCount()
{
reset();
mStarted = TRUE;
updateFrameTime();
sFrameDeltaTime = sTotalTime - sPrevTotalTime;
sPrevTotalTime = sTotalTime;
++sFrameCount;
}

void LLFrameTimer::stop()
void LLFrameTimer::reset(F32 expiration)
{
mStarted = FALSE;
llassert(!mPaused);
mStartTime = sFrameTime;
mExpiry = sFrameTime + expiration;
}

void LLFrameTimer::reset()
void LLFrameTimer::start(F32 expiration)
{
mStartTime = sFrameTime;
mExpiry = sFrameTime;
reset(expiration);
mRunning = true; // Start, if not already started.
}

void LLFrameTimer::resetWithExpiry(F32 expiration)
void LLFrameTimer::stop()
{
reset();
setTimerExpirySec(expiration);
llassert(!mPaused);
mRunning = false;
}

// Don't combine pause/unpause with start/stop
Expand All @@ -89,25 +97,31 @@ void LLFrameTimer::resetWithExpiry(F32 expiration)
// Note: elapsed would also be valid with no unpause() call (= time run until pause() called)
void LLFrameTimer::pause()
{
if (mStarted)
mStartTime = sFrameTime - mStartTime; // save dtime
mStarted = FALSE;
if (!mPaused)
{
mStartTime = sFrameTime - mStartTime; // Abuse mStartTime to store the elapsed time so far.
}
mPaused = true;
}

void LLFrameTimer::unpause()
{
if (!mStarted)
mStartTime = sFrameTime - mStartTime; // restore dtime
mStarted = TRUE;
if (mPaused)
{
mStartTime = sFrameTime - mStartTime; // Set mStartTime consistent with the elapsed time so far.
}
mPaused = false;
}

void LLFrameTimer::setTimerExpirySec(F32 expiration)
{
mExpiry = expiration + mStartTime;
llassert(!mPaused);
mExpiry = mStartTime + expiration;
}

void LLFrameTimer::setExpiryAt(F64 seconds_since_epoch)
{
llassert(!mPaused);
mStartTime = sFrameTime;
mExpiry = seconds_since_epoch - (USEC_TO_SEC_F64 * sStartTotalTime);
}
Expand All @@ -119,20 +133,14 @@ F64 LLFrameTimer::expiresAt() const
return expires_at;
}

BOOL LLFrameTimer::checkExpirationAndReset(F32 expiration)
bool LLFrameTimer::checkExpirationAndReset(F32 expiration)
{
//llinfos << "LLFrameTimer::checkExpirationAndReset()" << llendl;
//llinfos << " mStartTime:" << mStartTime << llendl;
//llinfos << " sFrameTime:" << sFrameTime << llendl;
//llinfos << " mExpiry: " << mExpiry << llendl;

if(hasExpired())
if (hasExpired())
{
reset();
setTimerExpirySec(expiration);
return TRUE;
reset(expiration);
return true;
}
return FALSE;
return false;
}

// static
Expand Down
Loading