Reduce findChild UI stutter when toasts are created
parent
4fa41c5c78
commit
699a6cd95c
|
|
@ -119,7 +119,7 @@ void LLDebugView::draw()
|
|||
{
|
||||
if (mFloaterSnapRegion == NULL)
|
||||
{
|
||||
mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
|
||||
mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
|
||||
}
|
||||
|
||||
LLRect debug_rect;
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
|
|||
|
||||
if (mFloaterSnapRegion == NULL)
|
||||
{
|
||||
mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
|
||||
mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
|
||||
}
|
||||
LLRect channel_rect;
|
||||
mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
|
||||
|
|
@ -376,7 +376,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
|
|||
|
||||
if (mFloaterSnapRegion == NULL)
|
||||
{
|
||||
mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
|
||||
mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
|
||||
}
|
||||
|
||||
if (!getParent())
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ LLRect LLScreenChannelBase::getChannelRect()
|
|||
|
||||
if (mFloaterSnapRegion == NULL)
|
||||
{
|
||||
mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
|
||||
mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
|
||||
}
|
||||
|
||||
if (mChicletRegion == NULL)
|
||||
{
|
||||
mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
|
||||
mChicletRegion = gViewerWindow->getChicletContainer();
|
||||
}
|
||||
|
||||
LLRect channel_rect;
|
||||
|
|
@ -103,12 +103,12 @@ bool LLScreenChannelBase::postBuild()
|
|||
{
|
||||
if (mFloaterSnapRegion == NULL)
|
||||
{
|
||||
mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
|
||||
mFloaterSnapRegion = gViewerWindow->getFloaterSnapRegion();
|
||||
}
|
||||
|
||||
if (mChicletRegion == NULL)
|
||||
{
|
||||
mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
|
||||
mChicletRegion = gViewerWindow->getChicletContainer();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -2079,6 +2079,8 @@ void LLViewerWindow::initBase()
|
|||
// Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI())
|
||||
gToolBarView->setVisible(false);
|
||||
|
||||
mFloaterSnapRegion = gToolBarView->getChild<LLView>("floater_snap_region");
|
||||
mChicletContainer = gToolBarView->getChild<LLPanel>("chiclet_container");
|
||||
// Constrain floaters to inside the menu and status bar regions.
|
||||
gFloaterView = main_view->getChild<LLFloaterView>("Floater View");
|
||||
for (S32 i = 0; i < LLToolBarEnums::TOOLBAR_COUNT; ++i)
|
||||
|
|
@ -2089,7 +2091,7 @@ void LLViewerWindow::initBase()
|
|||
toolbarp->getCenterLayoutPanel()->setReshapeCallback(boost::bind(&LLFloaterView::setToolbarRect, gFloaterView, _1, _2));
|
||||
}
|
||||
}
|
||||
gFloaterView->setFloaterSnapView(main_view->getChild<LLView>("floater_snap_region")->getHandle());
|
||||
gFloaterView->setFloaterSnapView(mFloaterSnapRegion->getHandle());
|
||||
gSnapshotFloaterView = main_view->getChild<LLSnapshotFloaterView>("Snapshot Floater View");
|
||||
|
||||
const F32 CHAT_PERSIST_TIME = 20.f;
|
||||
|
|
|
|||
|
|
@ -463,6 +463,9 @@ public:
|
|||
|
||||
static std::string getLastSnapshotDir();
|
||||
|
||||
LLView* getFloaterSnapRegion() { return mFloaterSnapRegion; }
|
||||
LLPanel* getChicletContainer() { return mChicletContainer; }
|
||||
|
||||
private:
|
||||
bool shouldShowToolTipFor(LLMouseHandler *mh);
|
||||
|
||||
|
|
@ -491,6 +494,8 @@ private:
|
|||
LLRect mWorldViewRectRaw; // area of screen for 3D world
|
||||
LLRect mWorldViewRectScaled; // area of screen for 3D world scaled by UI size
|
||||
LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views
|
||||
LLView* mFloaterSnapRegion = nullptr;
|
||||
LLPanel* mChicletContainer = nullptr;
|
||||
LLVector2 mDisplayScale;
|
||||
|
||||
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords
|
||||
|
|
|
|||
Loading…
Reference in New Issue