Merge viewer-neko

master
Ansariel 2019-05-07 23:21:06 +02:00
commit 81b58bbda7
9 changed files with 31 additions and 17 deletions

View File

@ -44,7 +44,7 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
if (!success)
{
LL_ERRS() << "Couldn't load string table " << xml_filename << LL_ENDL;
LL_ERRS() << "Couldn't load string table " << xml_filename << ". Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
return false;
}

View File

@ -24435,17 +24435,6 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>FSExperienceSearchMaturityRating</key>
<map>
<key>Comment</key>
<string>Setting for the user's preferred maturity level for experiences search (consts in indra_constants.h)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>13</integer>
</map>
<key>FSConfirmPayments</key>
<map>
<key>Comment</key>

View File

@ -676,6 +676,17 @@
<key>Value</key>
<string>Snapshot</string>
</map>
<key>ExperienceSearchMaturity</key>
<map>
<key>Comment</key>
<string>Setting for the user's preferred Max Content rating for Experiences search (Default rating is General)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<integer>2</integer>
</map>
<!-- Firestorm settings -->
<key>DebugLookAt</key>

View File

@ -3438,7 +3438,14 @@ bool LLAppViewer::initConfiguration()
// keeps growing, necessitating a method all its own.
void LLAppViewer::initStrings()
{
LLTransUtil::parseStrings("strings.xml", default_trans_args);
std::string strings_file = "strings.xml";
std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file);
if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
{
// initial check to make sure files are there failed
LL_ERRS() << "Viewer failed to find localization and UI files. Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
}
LLTransUtil::parseStrings(strings_file, default_trans_args);
LLTransUtil::parseLanguageStrings("language_settings.xml");
// parseStrings() sets up the LLTrans substitution table. Add this one item.

View File

@ -89,8 +89,7 @@ BOOL LLPanelExperiencePicker::postBuild()
childSetAction(BTN_PROFILE, boost::bind(&LLPanelExperiencePicker::onBtnProfile, this));
getChildView(BTN_PROFILE)->setEnabled(FALSE);
// <FS:Ansariel> Remember maturity level
//getChild<LLComboBox>(TEXT_MATURITY)->setCurrentByIndex(2);
getChild<LLComboBox>(TEXT_MATURITY)->setCurrentByIndex(gSavedPerAccountSettings.getU32("ExperienceSearchMaturity"));
getChild<LLComboBox>(TEXT_MATURITY)->setCommitCallback(boost::bind(&LLPanelExperiencePicker::onMaturity, this));
getChild<LLUICtrl>(TEXT_EDIT)->setFocus(TRUE);
@ -382,6 +381,7 @@ void LLPanelExperiencePicker::filterContent()
void LLPanelExperiencePicker::onMaturity()
{
gSavedPerAccountSettings.setU32("ExperienceSearchMaturity", getChild<LLComboBox>(TEXT_MATURITY)->getCurrentIndex());
if(mResponse.has("experience_keys") && mResponse["experience_keys"].beginArray() != mResponse["experience_keys"].endArray())
{
filterContent();

View File

@ -68,6 +68,7 @@ bool LLTextureFetchDebugger::sDebuggerEnabled = false ;
LLTrace::CountStatHandle<F64> LLTextureFetch::sCacheHit("texture_cache_hit");
LLTrace::CountStatHandle<F64> LLTextureFetch::sCacheAttempt("texture_cache_attempt");
LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > LLTextureFetch::sCacheHitRate("texture_cache_hits");
LLTrace::SampleStatHandle<F32Seconds> LLTextureFetch::sCacheReadLatency("texture_cache_read_latency");
LLTrace::SampleStatHandle<F32Seconds> LLTextureFetch::sTexDecodeLatency("texture_decode_latency");
@ -1323,6 +1324,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize()
<< " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight())
<< " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL;
record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(1));
}
else
{
@ -1338,7 +1340,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
LL_DEBUGS(LOG_TXT) << mID << ": Not in Cache" << LL_ENDL;
setState(LOAD_FROM_NETWORK);
}
record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(0));
// fall through
}
}

View File

@ -312,6 +312,7 @@ public:
static LLTrace::SampleStatHandle<F32Seconds> sCacheReadLatency;
static LLTrace::SampleStatHandle<F32Seconds> sTexDecodeLatency;
static LLTrace::SampleStatHandle<F32Seconds> sTexFetchLatency;
static LLTrace::EventStatHandle<LLUnit<F32, LLUnits::Percent> > sCacheHitRate;
private:
LLMutex mQueueMutex; //to protect mRequestMap and mCommands only

View File

@ -1289,6 +1289,7 @@ void LLViewerFetchedTexture::loadFromFastCache()
F32 cachReadTime = fastCacheTimer.getElapsedTimeF32();
add(LLTextureFetch::sCacheHit, 1.0);
record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(1));
sample(LLTextureFetch::sCacheReadLatency, cachReadTime);
mFullWidth = mRawImage->getWidth() << mRawDiscardLevel;
@ -1321,6 +1322,10 @@ void LLViewerFetchedTexture::loadFromFastCache()
addToCreateTexture();
}
}
else
{
record(LLTextureFetch::sCacheHitRate, LLUnits::Ratio::fromValue(0));
}
}
void LLViewerFetchedTexture::setForSculpt()

View File

@ -73,7 +73,6 @@
Max Content Rating:
</text>
<icons_combo_box
control_name="FSExperienceSearchMaturityRating"
follows="left|top"
height="20"
label="Moderate"