Merged lindenlab/viewer-lion into default
commit
2b19f3d87b
|
|
@ -327,7 +327,10 @@ BOOL gDisconnected = FALSE;
|
|||
// used to restore texture state after a mode switch
|
||||
LLFrameTimer gRestoreGLTimer;
|
||||
BOOL gRestoreGL = FALSE;
|
||||
BOOL gUseWireframe = FALSE;
|
||||
BOOL gUseWireframe = FALSE;
|
||||
|
||||
//use for remember deferred mode in wireframe switch
|
||||
BOOL gInitialDeferredModeForWireframe = FALSE;
|
||||
|
||||
// VFS globals - see llappviewer.h
|
||||
LLVFS* gStaticVFS = NULL;
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@ extern BOOL gDisconnected;
|
|||
extern LLFrameTimer gRestoreGLTimer;
|
||||
extern BOOL gRestoreGL;
|
||||
extern BOOL gUseWireframe;
|
||||
extern BOOL gInitialDeferredModeForWireframe;
|
||||
|
||||
// VFS globals - gVFS is for general use
|
||||
// gStaticVFS is read-only and is shipped w/ the viewer
|
||||
|
|
|
|||
|
|
@ -587,7 +587,12 @@ BOOL LLPanelPeople::postBuild()
|
|||
getChild<LLFilterEditor>("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLFilterEditor>("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLFilterEditor>("fbc_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
|
||||
|
||||
if(gMaxAgentGroups <= BASE_MAX_AGENT_GROUPS)
|
||||
{
|
||||
getChild<LLTextBox>("groupcount")->setText(getString("GroupCountWithInfo"));
|
||||
getChild<LLTextBox>("groupcount")->setURLClickedCallback(boost::bind(&LLPanelPeople::onGroupLimitInfo, this));
|
||||
}
|
||||
|
||||
mTabContainer = getChild<LLTabContainer>("tabs");
|
||||
mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2));
|
||||
|
|
|
|||
|
|
@ -2522,7 +2522,8 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
|
|||
mFetchDebugger(NULL),
|
||||
mFetchSource(LLTextureFetch::FROM_ALL),
|
||||
mOriginFetchSource(LLTextureFetch::FROM_ALL),
|
||||
mFetcherLocked(FALSE)
|
||||
mFetcherLocked(FALSE),
|
||||
mTextureInfoMainThread(false)
|
||||
{
|
||||
mMaxBandwidth = gSavedSettings.getF32("ThrottleBandwidthKBPS");
|
||||
mTextureInfo.setUpLogging(gSavedSettings.getBOOL("LogTextureDownloadsToViewerLog"), gSavedSettings.getBOOL("LogTextureDownloadsToSimulator"), U32Bytes(gSavedSettings.getU32("TextureLoggingThreshold")));
|
||||
|
|
@ -3128,6 +3129,7 @@ void LLTextureFetch::shutDownImageDecodeThread()
|
|||
// Threads: Ttf
|
||||
void LLTextureFetch::startThread()
|
||||
{
|
||||
mTextureInfo.startRecording();
|
||||
}
|
||||
|
||||
// Threads: Ttf
|
||||
|
|
@ -3138,6 +3140,8 @@ void LLTextureFetch::endThread()
|
|||
<< ", ResWaits: " << mTotalResourceWaitCount
|
||||
<< ", TotalHTTPReq: " << getTotalNumHTTPRequests()
|
||||
<< LL_ENDL;
|
||||
|
||||
mTextureInfo.stopRecording();
|
||||
}
|
||||
|
||||
// Threads: Ttf
|
||||
|
|
@ -3541,8 +3545,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
|
|||
if (log_to_viewer_log || log_to_sim)
|
||||
{
|
||||
U64Microseconds timeNow = LLTimer::getTotalTime();
|
||||
mTextureInfo.setRequestSize(id, worker->mFileSize);
|
||||
mTextureInfo.setRequestCompleteTimeAndLog(id, timeNow);
|
||||
mTextureInfoMainThread.setRequestSize(id, worker->mFileSize);
|
||||
mTextureInfoMainThread.setRequestCompleteTimeAndLog(id, timeNow);
|
||||
}
|
||||
}
|
||||
worker->unlockWorkMutex(); // -Mw
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ private:
|
|||
F32 mTextureBandwidth; // <none>
|
||||
F32 mMaxBandwidth; // Mfnq
|
||||
LLTextureInfo mTextureInfo;
|
||||
LLTextureInfo mTextureInfoMainThread;
|
||||
|
||||
// XXX possible delete
|
||||
U32Bits mHTTPTextureBits; // Mfnq
|
||||
|
|
|
|||
|
|
@ -36,14 +36,16 @@ static LLTrace::CountStatHandle<S32> sTextureDownloadsCompleted("texture_downloa
|
|||
static LLTrace::CountStatHandle<S32Bytes > sTextureDataDownloaded("texture_data_downloaded", "amount of texture data downloaded");
|
||||
static LLTrace::CountStatHandle<U32Milliseconds > sTexureDownloadTime("texture_download_time", "amount of time spent fetching textures");
|
||||
|
||||
LLTextureInfo::LLTextureInfo() :
|
||||
LLTextureInfo::LLTextureInfo(bool postponeStartRecoreder) :
|
||||
mLogTextureDownloadsToViewerLog(false),
|
||||
mLogTextureDownloadsToSimulator(false),
|
||||
mTextureDownloadProtocol("NONE"),
|
||||
mTextureLogThreshold(LLUnits::Kilobytes::fromValue(100))
|
||||
{
|
||||
mTextures.clear();
|
||||
mRecording.start();
|
||||
if (!postponeStartRecoreder)
|
||||
{
|
||||
startRecording();
|
||||
}
|
||||
}
|
||||
|
||||
void LLTextureInfo::setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold)
|
||||
|
|
@ -78,15 +80,7 @@ U32 LLTextureInfo::getTextureInfoMapSize()
|
|||
|
||||
bool LLTextureInfo::has(const LLUUID& id)
|
||||
{
|
||||
std::map<LLUUID, LLTextureInfoDetails *>::iterator iterator = mTextures.find(id);
|
||||
if (iterator == mTextures.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return mTextures.end() != mTextures.find(id);
|
||||
}
|
||||
|
||||
void LLTextureInfo::setRequestStartTime(const LLUUID& id, U64 startTime)
|
||||
|
|
@ -192,15 +186,12 @@ void LLTextureInfo::setRequestCompleteTimeAndLog(const LLUUID& id, U64Microsecon
|
|||
LLSD LLTextureInfo::getAverages()
|
||||
{
|
||||
LLSD averagedTextureData;
|
||||
S32 averageDownloadRate;
|
||||
U32Milliseconds download_time = mRecording.getSum(sTexureDownloadTime);
|
||||
if(download_time == (U32Milliseconds)0)
|
||||
S32 averageDownloadRate = 0;
|
||||
unsigned int download_time = mRecording.getSum(sTexureDownloadTime).valueInUnits<LLUnits::Seconds>();
|
||||
|
||||
if (0 != download_time)
|
||||
{
|
||||
averageDownloadRate = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time.valueInUnits<LLUnits::Seconds>();
|
||||
averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time;
|
||||
}
|
||||
|
||||
averagedTextureData["bits_per_second"] = averageDownloadRate;
|
||||
|
|
@ -212,6 +203,16 @@ LLSD LLTextureInfo::getAverages()
|
|||
return averagedTextureData;
|
||||
}
|
||||
|
||||
void LLTextureInfo::startRecording()
|
||||
{
|
||||
mRecording.start();
|
||||
}
|
||||
|
||||
void LLTextureInfo::stopRecording()
|
||||
{
|
||||
mRecording.stop();
|
||||
}
|
||||
|
||||
void LLTextureInfo::resetTextureStatistics()
|
||||
{
|
||||
mRecording.restart();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
class LLTextureInfo
|
||||
{
|
||||
public:
|
||||
LLTextureInfo();
|
||||
LLTextureInfo(bool postponeStartRecoreder = true);
|
||||
~LLTextureInfo();
|
||||
|
||||
void setUpLogging(bool writeToViewerLog, bool sendToSim, U32Bytes textureLogThreshold);
|
||||
|
|
@ -53,6 +53,8 @@ public:
|
|||
void resetTextureStatistics();
|
||||
U32 getTextureInfoMapSize();
|
||||
LLSD getAverages();
|
||||
void startRecording();
|
||||
void stopRecording();
|
||||
|
||||
private:
|
||||
void addRequest(const LLUUID& id);
|
||||
|
|
|
|||
|
|
@ -1245,9 +1245,24 @@ class LLAdvancedToggleWireframe : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
gUseWireframe = !(gUseWireframe);
|
||||
|
||||
if (gUseWireframe)
|
||||
{
|
||||
gInitialDeferredModeForWireframe = LLPipeline::sRenderDeferred;
|
||||
}
|
||||
|
||||
gWindowResized = TRUE;
|
||||
LLPipeline::updateRenderDeferred();
|
||||
gPipeline.resetVertexBuffers();
|
||||
|
||||
if (!gUseWireframe && !gInitialDeferredModeForWireframe && LLPipeline::sRenderDeferred != gInitialDeferredModeForWireframe && gPipeline.isInit())
|
||||
{
|
||||
LLPipeline::refreshCachedSettings();
|
||||
gPipeline.releaseGLBuffers();
|
||||
gPipeline.createGLBuffers();
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
|
|||
<string
|
||||
name="AltMiniMapToolTipMsg"
|
||||
value="[REGION](Double-click to teleport, shift-drag to pan)"/>
|
||||
<string
|
||||
name="GroupCountWithInfo"
|
||||
value="You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Want more?]"/>
|
||||
<tab_container
|
||||
bottom="-10"
|
||||
follows="all"
|
||||
|
|
@ -506,7 +509,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
|
|||
left="3"
|
||||
use_ellipses="true"
|
||||
name="groupcount">
|
||||
You belong to [COUNT] groups, and can join [REMAINING] more. [secondlife:/// Want more?]
|
||||
You belong to [COUNT] groups, and can join [REMAINING] more.
|
||||
</text>
|
||||
<group_list
|
||||
allow_select="true"
|
||||
|
|
|
|||
Loading…
Reference in New Issue