Merged in lindenlab/viewer-bear
commit
d66cd019b3
|
|
@ -487,14 +487,15 @@ bool LLImageGL::checkSize(S32 width, S32 height)
|
|||
return check_power_of_two(width) && check_power_of_two(height);
|
||||
}
|
||||
|
||||
void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level)
|
||||
bool LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level)
|
||||
{
|
||||
if (width != mWidth || height != mHeight || ncomponents != mComponents)
|
||||
{
|
||||
// Check if dimensions are a power of two!
|
||||
if (!checkSize(width,height))
|
||||
{
|
||||
LL_ERRS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL;
|
||||
LL_WARNS() << llformat("Texture has non power of two dimension: %dx%d",width,height) << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mTexName)
|
||||
|
|
@ -529,6 +530,8 @@ void LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
|
|||
mMaxDiscardLevel = MAX_DISCARD_LEVEL;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
@ -909,7 +912,11 @@ BOOL LLImageGL::preAddToAtlas(S32 discard_level, const LLImageRaw* raw_image)
|
|||
S32 h = raw_image->getHeight() << discard_level;
|
||||
|
||||
// setSize may call destroyGLTexture if the size does not match
|
||||
setSize(w, h, raw_image->getComponents(), discard_level);
|
||||
if (!setSize(w, h, raw_image->getComponents(), discard_level))
|
||||
{
|
||||
LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !mHasExplicitFormat )
|
||||
{
|
||||
|
|
@ -1273,7 +1280,11 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
|
|||
S32 h = raw_h << discard_level;
|
||||
|
||||
// setSize may call destroyGLTexture if the size does not match
|
||||
setSize(w, h, imageraw->getComponents(), discard_level);
|
||||
if (!setSize(w, h, imageraw->getComponents(), discard_level))
|
||||
{
|
||||
LL_WARNS() << "Trying to create a texture with incorrect dimensions!" << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !mHasExplicitFormat )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ protected:
|
|||
public:
|
||||
virtual void dump(); // debugging info to LL_INFOS()
|
||||
|
||||
void setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
|
||||
bool setSize(S32 width, S32 height, S32 ncomponents, S32 discard_level = -1);
|
||||
void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;}
|
||||
void setAllowCompression(bool allow) { mAllowCompression = allow; }
|
||||
|
||||
|
|
|
|||
|
|
@ -3477,13 +3477,13 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
}
|
||||
else
|
||||
{
|
||||
if (cofVersion < lastRcv)
|
||||
if (cofVersion <= lastRcv)
|
||||
{
|
||||
LL_WARNS("Avatar") << "Have already received update for cof version " << lastRcv
|
||||
<< " but requesting for " << cofVersion << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
if (lastReq > cofVersion)
|
||||
if (lastReq >= cofVersion)
|
||||
{
|
||||
LL_WARNS("Avatar") << "Request already in flight for cof version " << lastReq
|
||||
<< " but requesting for " << cofVersion << LL_ENDL;
|
||||
|
|
@ -3503,7 +3503,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
LL_WARNS("Avatar") << "Forcing version failure on COF Baking" << LL_ENDL;
|
||||
}
|
||||
|
||||
LL_INFOS() << "Requesting bake for COF version " << cofVersion << LL_ENDL;
|
||||
LL_INFOS("Avatar") << "Requesting bake for COF version " << cofVersion << LL_ENDL;
|
||||
|
||||
LLSD postData;
|
||||
if (gSavedSettings.getBOOL("DebugAvatarExperimentalServerAppearanceUpdate"))
|
||||
|
|
|
|||
|
|
@ -1375,7 +1375,7 @@ const LLVector3d& LLFloaterSnapshotBase::getPosTakenGlobal()
|
|||
// static
|
||||
void LLFloaterSnapshot::setAgentEmail(const std::string& email)
|
||||
{
|
||||
LLFloaterSnapshot* instance = getInstance();
|
||||
LLFloaterSnapshot* instance = findInstance();
|
||||
if (instance)
|
||||
{
|
||||
LLSideTrayPanelContainer* panel_container = instance->getChild<LLSideTrayPanelContainer>("panel_container");
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ void LLFloaterMove::setSittingMode(BOOL bSitting)
|
|||
LLPanelStandStopFlying::setStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STOP_FLYING);
|
||||
}
|
||||
}
|
||||
enableInstance(!bSitting);
|
||||
enableInstance();
|
||||
}
|
||||
|
||||
// protected
|
||||
|
|
@ -459,7 +459,7 @@ void LLFloaterMove::showModeButtons(BOOL bShow)
|
|||
}
|
||||
|
||||
//static
|
||||
void LLFloaterMove::enableInstance(BOOL bEnable)
|
||||
void LLFloaterMove::enableInstance()
|
||||
{
|
||||
LLFloaterMove* instance = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
|
||||
if (instance)
|
||||
|
|
@ -470,7 +470,7 @@ void LLFloaterMove::enableInstance(BOOL bEnable)
|
|||
}
|
||||
else
|
||||
{
|
||||
instance->showModeButtons(bEnable);
|
||||
instance->showModeButtons(isAgentAvatarValid() && !gAgentAvatarp->isSitting());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -566,7 +566,7 @@ BOOL LLPanelStandStopFlying::postBuild()
|
|||
{
|
||||
mStandButton = getChild<LLButton>("stand_btn");
|
||||
mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this));
|
||||
mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance, TRUE));
|
||||
mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance));
|
||||
mStandButton->setVisible(FALSE);
|
||||
LLHints::registerHintTarget("stand_btn", mStandButton->getHandle());
|
||||
|
||||
|
|
@ -685,8 +685,7 @@ void LLPanelStandStopFlying::onStandButtonClick()
|
|||
LLSelectMgr::getInstance()->deselectAllForStandingUp();
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
|
||||
setFocus(FALSE); // EXT-482
|
||||
mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once.
|
||||
setFocus(FALSE);
|
||||
}
|
||||
|
||||
void LLPanelStandStopFlying::onStopFlyingButtonClick()
|
||||
|
|
@ -694,7 +693,6 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
|
|||
gAgent.setFlying(FALSE);
|
||||
|
||||
setFocus(FALSE); // EXT-482
|
||||
mStopFlyingButton->setVisible(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
static void setAlwaysRunMode(bool run);
|
||||
void setAlwaysRunModeImpl(bool run);
|
||||
static void setSittingMode(BOOL bSitting);
|
||||
static void enableInstance(BOOL bEnable);
|
||||
static void enableInstance();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
static void sUpdateFlyingStatus();
|
||||
|
|
|
|||
|
|
@ -1928,6 +1928,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
|
|||
{
|
||||
//make a duplicate to keep the original raw image untouched.
|
||||
raw = raw->duplicate();
|
||||
if (raw->isBufferInvalid())
|
||||
{
|
||||
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
raw->scale(w, h) ;
|
||||
|
||||
discardlevel += i ;
|
||||
|
|
|
|||
|
|
@ -508,8 +508,8 @@ class LLFileEnableCloseAllWindows : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::getInstance();
|
||||
LLFloaterOutfitSnapshot* floater_outfit_snapshot = LLFloaterOutfitSnapshot::getInstance();
|
||||
LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
|
||||
LLFloaterOutfitSnapshot* floater_outfit_snapshot = LLFloaterOutfitSnapshot::findInstance();
|
||||
bool is_floaters_snapshot_opened = (floater_snapshot && floater_snapshot->isInVisibleChain())
|
||||
|| (floater_outfit_snapshot && floater_outfit_snapshot->isInVisibleChain());
|
||||
bool open_children = gFloaterView->allChildrenClosed() && !is_floaters_snapshot_opened;
|
||||
|
|
@ -523,10 +523,10 @@ class LLFileCloseAllWindows : public view_listener_t
|
|||
{
|
||||
bool app_quitting = false;
|
||||
gFloaterView->closeAllChildren(app_quitting);
|
||||
LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::getInstance();
|
||||
LLFloaterSnapshot* floater_snapshot = LLFloaterSnapshot::findInstance();
|
||||
if (floater_snapshot)
|
||||
floater_snapshot->closeFloater(app_quitting);
|
||||
LLFloaterOutfitSnapshot* floater_outfit_snapshot = LLFloaterOutfitSnapshot::getInstance();
|
||||
LLFloaterOutfitSnapshot* floater_outfit_snapshot = LLFloaterOutfitSnapshot::findInstance();
|
||||
if (floater_outfit_snapshot)
|
||||
floater_outfit_snapshot->closeFloater(app_quitting);
|
||||
if (gMenuHolder) gMenuHolder->hideMenus();
|
||||
|
|
|
|||
|
|
@ -6611,6 +6611,11 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
|
|||
if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit)
|
||||
continue;
|
||||
|
||||
if (script_perm.question == "JoinAnExperience")
|
||||
{ // Some experience only permissions do not have an explicit permission bit. Add them here.
|
||||
script_question += " " + LLTrans::getString("ForceSitAvatar") + "\n";
|
||||
}
|
||||
|
||||
script_question += " " + LLTrans::getString(script_perm.question) + "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,6 +251,11 @@ BOOL gDisplayBadge = FALSE;
|
|||
static const U8 NO_FACE = 255;
|
||||
BOOL gQuietSnapshot = FALSE;
|
||||
|
||||
// Minimum value for UIScaleFactor, also defined in preferences, ui_scale_slider
|
||||
static const F32 MIN_UI_SCALE = 0.75f;
|
||||
// 2.0 in preferences, but win10 supports larger scaling and value is used more as
|
||||
// sanity check, so leaving space for larger values from DPI updates.
|
||||
static const F32 MAX_UI_SCALE = 7.0f;
|
||||
static const F32 MIN_DISPLAY_SCALE = 0.75f;
|
||||
|
||||
std::string LLViewerWindow::sSnapshotBaseName;
|
||||
|
|
@ -1595,9 +1600,16 @@ BOOL LLViewerWindow::handleDeviceChange(LLWindow *window)
|
|||
|
||||
void LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
|
||||
{
|
||||
gSavedSettings.setF32("UIScaleFactor", ui_scale_factor);
|
||||
LLViewerWindow::reshape(window_width, window_height);
|
||||
mResDirty = true;
|
||||
if (ui_scale_factor >= MIN_UI_SCALE && ui_scale_factor <= MAX_UI_SCALE)
|
||||
{
|
||||
gSavedSettings.setF32("UIScaleFactor", ui_scale_factor);
|
||||
LLViewerWindow::reshape(window_width, window_height);
|
||||
mResDirty = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "DPI change caused UI scale to go out of bounds: " << ui_scale_factor << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg)
|
||||
|
|
@ -1753,6 +1765,11 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
|
||||
|
||||
F32 system_scale_factor = mWindow->getSystemUISize();
|
||||
if (system_scale_factor < MIN_UI_SCALE || system_scale_factor > MAX_UI_SCALE)
|
||||
{
|
||||
// reset to default;
|
||||
system_scale_factor = 1.f;
|
||||
}
|
||||
if (p.first_run || gSavedSettings.getF32("LastSystemUIScaleFactor") != system_scale_factor)
|
||||
{
|
||||
mSystemUIScaleFactorChanged = !p.first_run;
|
||||
|
|
@ -1763,7 +1780,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
|
||||
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
|
||||
// the size of a window or fullscreen context may have been adjusted slightly...)
|
||||
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
|
||||
F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE);
|
||||
|
||||
mDisplayScale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f));
|
||||
mDisplayScale *= ui_scale_factor;
|
||||
|
|
@ -5251,7 +5268,7 @@ F32 LLViewerWindow::getWorldViewAspectRatio() const
|
|||
|
||||
void LLViewerWindow::calcDisplayScale()
|
||||
{
|
||||
F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
|
||||
F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor"), MIN_UI_SCALE, MAX_UI_SCALE);
|
||||
LLVector2 display_scale;
|
||||
display_scale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f));
|
||||
display_scale *= ui_scale_factor;
|
||||
|
|
@ -5264,7 +5281,7 @@ void LLViewerWindow::calcDisplayScale()
|
|||
|
||||
if (display_scale != mDisplayScale)
|
||||
{
|
||||
LL_INFOS() << "Setting display scale to " << display_scale << LL_ENDL;
|
||||
LL_INFOS() << "Setting display scale to " << display_scale << " for ui scale: " << ui_scale_factor << LL_ENDL;
|
||||
|
||||
mDisplayScale = display_scale;
|
||||
// Init default fonts
|
||||
|
|
|
|||
|
|
@ -499,6 +499,7 @@ Please try logging in again in a minute.</string>
|
|||
<string name="TeleportYourAgent">Teleport you</string>
|
||||
<string name="ManageEstateSilently">Manage your estates silently</string>
|
||||
<string name="ChangeYourDefaultAnimations">Change your default animations</string>
|
||||
<string name="ForceSitAvatar">Force your avatar to sit</string>
|
||||
|
||||
<string name="NotConnected">Not Connected</string>
|
||||
<string name="AgentNameSubst">(You)</string> <!-- Substitution for agent name -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue