CachedControl cleanup in random places. LL's ctor format is supported, so using such in LL code to ease diffs.
This commit is contained in:
@@ -7613,7 +7613,7 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LogMessages</key>
|
||||
<key>LogMessages</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Log network traffic</string>
|
||||
@@ -7624,6 +7624,17 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LogTextureNetworkTraffic</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Log network traffic for textures</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LoginAsGod</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -12720,6 +12731,28 @@
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>TextureDisable</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If TRUE, do not load textures for in-world content</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>TextureDiscardLevel</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Specify texture resolution (0 = highest, 5 = lowest)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>TextureLoadFullRes</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -308,9 +308,9 @@ public:
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
{
|
||||
static LLCachedControl<bool> log_to_viewer_log("LogTextureDownloadsToViewerLog",false);
|
||||
static LLCachedControl<bool> log_to_sim("LogTextureDownloadsToSimulator",false);
|
||||
static bool log_texture_traffic = false;
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
|
||||
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
if (log_to_viewer_log || log_to_sim)
|
||||
{
|
||||
@@ -661,7 +661,6 @@ public:
|
||||
* Corresponds to LLTextureFetch::commandSendMetrics()
|
||||
*/
|
||||
|
||||
#if HTTP_METRICS
|
||||
class TFReqSendMetrics : public LLTextureFetch::TFRequest
|
||||
{
|
||||
public:
|
||||
@@ -705,7 +704,6 @@ public:
|
||||
const LLUUID mAgentID;
|
||||
LLViewerAssetStats * mMainStats;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Examines the merged viewer metrics report and if found to be too long,
|
||||
@@ -1131,7 +1129,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
|
||||
if (mState == LOAD_FROM_NETWORK)
|
||||
{
|
||||
static const LLCachedControl<bool> use_http("ImagePipelineUseHTTP", false);
|
||||
static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP");
|
||||
|
||||
// if (mHost != LLHost::invalid) use_http = false;
|
||||
if (use_http && mCanUseHTTP && mUrl.empty()) // get http url.
|
||||
@@ -1486,7 +1484,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
|
||||
if (mState == DECODE_IMAGE)
|
||||
{
|
||||
static LLCachedControl<bool> textures_decode_disabled("TextureDecodeDisabled", false);
|
||||
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
|
||||
if(textures_decode_disabled)
|
||||
{
|
||||
// for debug use, don't decode
|
||||
@@ -2360,12 +2358,13 @@ void LLTextureFetch::commonUpdate()
|
||||
//virtual
|
||||
S32 LLTextureFetch::update(U32 max_time_ms)
|
||||
{
|
||||
static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS");
|
||||
|
||||
{
|
||||
mNetworkQueueMutex.lock() ;
|
||||
static const LLCachedControl<F32> max_bandwidth("ThrottleBandwidthKBPS", 2000);
|
||||
mMaxBandwidth = max_bandwidth;
|
||||
|
||||
gTextureList.sTextureBits += mHTTPTextureBits;
|
||||
mMaxBandwidth = band_width ;
|
||||
|
||||
gTextureList.sTextureBits += mHTTPTextureBits ;
|
||||
mHTTPTextureBits = 0 ;
|
||||
|
||||
mNetworkQueueMutex.unlock() ;
|
||||
@@ -2567,8 +2566,8 @@ void LLTextureFetch::sendRequestListToSimulators()
|
||||
// llinfos << "IMAGE REQUEST: " << req->mID << " Discard: " << req->mDesiredDiscard
|
||||
// << " Packet: " << packet << " Priority: " << req->mImagePriority << llendl;
|
||||
|
||||
static LLCachedControl<bool> log_to_viewer_log("LogTextureDownloadsToViewerLog",false);
|
||||
static LLCachedControl<bool> log_to_sim("LogTextureDownloadsToSimulator",false);
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
|
||||
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
|
||||
if (log_to_viewer_log || log_to_sim)
|
||||
{
|
||||
mTextureInfo.setRequestStartTime(req->mID, LLTimer::getTotalTime());
|
||||
@@ -2789,8 +2788,8 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1
|
||||
|
||||
if(packet_num >= (worker->mTotalPackets - 1))
|
||||
{
|
||||
static LLCachedControl<bool> log_to_viewer_log("LogTextureDownloadsToViewerLog",false);
|
||||
static LLCachedControl<bool> log_to_sim("LogTextureDownloadsToSimulator",false);
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
|
||||
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
|
||||
|
||||
if (log_to_viewer_log || log_to_sim)
|
||||
{
|
||||
|
||||
@@ -1542,7 +1542,7 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
||||
item = new LLMenuItemCheckGL("Animate Textures", menu_toggle_control, NULL, menu_check_control, (void*)"AnimateTextures");
|
||||
menu->append(item);
|
||||
|
||||
item = new LLMenuItemCheckGL("Disable Textures", menu_toggle_variable, NULL, menu_check_variable, (void*)&LLViewerTexture::sDontLoadVolumeTextures);
|
||||
item = new LLMenuItemCheckGL("Disable Textures", menu_toggle_control, NULL, menu_check_control, (void*)"TextureDisable");
|
||||
menu->append(item);
|
||||
|
||||
item = new LLMenuItemCheckGL("HTTP Get Textures", menu_toggle_control, NULL, menu_check_control, (void*)"ImagePipelineUseHTTP");
|
||||
|
||||
@@ -104,7 +104,6 @@ S32 LLViewerTexture::sMaxSmallImageSize = MAX_CACHED_RAW_IMAGE_AREA ;
|
||||
BOOL LLViewerTexture::sFreezeImageScalingDown = FALSE ;
|
||||
F32 LLViewerTexture::sCurrentTime = 0.0f ;
|
||||
//BOOL LLViewerTexture::sUseTextureAtlas = FALSE ;
|
||||
BOOL LLViewerTexture::sDontLoadVolumeTextures = FALSE ;
|
||||
|
||||
const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by
|
||||
const F32 desired_discard_bias_max = (F32)MAX_DISCARD_LEVEL; // max number of levels to reduce image quality by
|
||||
@@ -1537,7 +1536,7 @@ void LLViewerFetchedTexture::processTextureStats()
|
||||
{
|
||||
updateVirtualSize() ;
|
||||
|
||||
static LLCachedControl<bool> textures_fullres("TextureLoadFullRes",false);
|
||||
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
|
||||
|
||||
if (textures_fullres)
|
||||
{
|
||||
@@ -1825,7 +1824,7 @@ S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching()
|
||||
|
||||
bool LLViewerFetchedTexture::updateFetch()
|
||||
{
|
||||
static LLCachedControl<bool> textures_decode_disabled("TextureDecodeDisabled",false);
|
||||
static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled");
|
||||
if(textures_decode_disabled)
|
||||
{
|
||||
return false ;
|
||||
@@ -2027,11 +2026,11 @@ bool LLViewerFetchedTexture::updateFetch()
|
||||
c = mComponents;
|
||||
}
|
||||
|
||||
/*const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
|
||||
const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
|
||||
if (override_tex_discard_level != 0)
|
||||
{
|
||||
desired_discard = override_tex_discard_level;
|
||||
}*/
|
||||
}
|
||||
|
||||
// bypass texturefetch directly by pulling from LLTextureCache
|
||||
bool fetch_request_created = false;
|
||||
@@ -3014,8 +3013,8 @@ BOOL LLViewerLODTexture::isUpdateFrozen()
|
||||
void LLViewerLODTexture::processTextureStats()
|
||||
{
|
||||
updateVirtualSize() ;
|
||||
|
||||
static LLCachedControl<bool> textures_fullres("TextureLoadFullRes", false);
|
||||
|
||||
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes");
|
||||
|
||||
if (textures_fullres)
|
||||
{
|
||||
|
||||
@@ -336,7 +336,6 @@ public:
|
||||
static BOOL sFreezeImageScalingDown ;//do not scale down image res if set.
|
||||
static F32 sCurrentTime ;
|
||||
//static BOOL sUseTextureAtlas ;
|
||||
static BOOL sDontLoadVolumeTextures ;
|
||||
|
||||
static LLPointer<LLViewerTexture> sNullImagep; // Null texture for non-textured objects.
|
||||
};
|
||||
|
||||
@@ -1188,7 +1188,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
|
||||
// static
|
||||
void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
static LLCachedControl<bool> log_texture_traffic("LogTextureNetworkTraffic",false) ;
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
|
||||
|
||||
@@ -1260,7 +1260,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d
|
||||
// static
|
||||
void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
static LLCachedControl<bool> log_texture_traffic("LogTextureNetworkTraffic",FALSE) ;
|
||||
static LLCachedControl<bool> log_texture_traffic(gSavedSettings,"LogTextureNetworkTraffic") ;
|
||||
|
||||
LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
|
||||
LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
|
||||
|
||||
@@ -502,8 +502,10 @@ void LLVOVolume::updateTextureVirtualSize()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (LLViewerTexture::sDontLoadVolumeTextures || LLAppViewer::getTextureFetch()->mDebugPause)
|
||||
|
||||
static LLCachedControl<bool> dont_load_textures(gSavedSettings,"TextureDisable");
|
||||
|
||||
if (dont_load_textures || LLAppViewer::getTextureFetch()->mDebugPause) // || !mDrawable->isVisible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user