summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1669ce6312..f1ec489a20 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -486,6 +486,10 @@ public:
}
ypos += y_inc;
+ addText(xpos, ypos, llformat("UI Verts/Calls: %d/%d", LLRender::sUIVerts, LLRender::sUICalls));
+ LLRender::sUICalls = LLRender::sUIVerts = 0;
+ ypos += y_inc;
+
addText(xpos,ypos, llformat("%d/%d Nodes visible", gPipeline.mNumVisibleNodes, LLSpatialGroup::sNodeCount));
ypos += y_inc;
@@ -826,8 +830,10 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (slurl_dnd_enabled)
{
+
// special case SLURLs
- if ( LLSLURL::isSLURL( data ) )
+ // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964)
+ if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) )
{
if (drop)
{
@@ -2004,12 +2010,15 @@ void LLViewerWindow::drawDebugText()
{
gGL.color4f(1,1,1,1);
gGL.pushMatrix();
+ gGL.pushUIMatrix();
{
// scale view by UI global scale factor and aspect ratio correction factor
- glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
mDebugText->draw();
}
+ gGL.popUIMatrix();
gGL.popMatrix();
+
gGL.flush();
}
@@ -2057,9 +2066,11 @@ void LLViewerWindow::draw()
// No translation needed, this view is glued to 0,0
gGL.pushMatrix();
+ LLUI::pushMatrix();
{
+
// scale view by UI global scale factor and aspect ratio correction factor
- glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
LLVector2 old_scale_factor = LLUI::sGLScaleFactor;
// apply camera zoom transform (for high res screenshots)
@@ -2125,6 +2136,7 @@ void LLViewerWindow::draw()
LLUI::sGLScaleFactor = old_scale_factor;
}
+ LLUI::popMatrix();
gGL.popMatrix();
#if LL_DEBUG
@@ -2477,6 +2489,9 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params)
// event processing.
void LLViewerWindow::updateUI()
{
+ static LLFastTimer::DeclareTimer ftm("Update UI");
+ LLFastTimer t(ftm);
+
static std::string last_handle_msg;
LLConsole::updateClass();
@@ -3008,17 +3023,16 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
if (mWorldViewRectRaw != new_world_rect)
{
- LLRect old_world_rect = mWorldViewRectRaw;
mWorldViewRectRaw = new_world_rect;
gResizeScreenTexture = TRUE;
LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
+ LLRect old_world_rect_scaled = mWorldViewRectScaled;
mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale);
// sending a signal with a new WorldView rect
- old_world_rect = calcScaledRect(old_world_rect, mDisplayScale);
- mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled);
+ mOnWorldViewRectUpdated(old_world_rect_scaled, mWorldViewRectScaled);
}
}
@@ -3058,7 +3072,6 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
// Must be called after displayObjects is called, which sets the mGLName parameter
// NOTE: This function gets called 3 times:
// render_ui_3d: FALSE, FALSE, TRUE
-// renderObjectsForSelect: TRUE, pick_parcel_wall, FALSE
// render_hud_elements: FALSE, FALSE, FALSE
void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud )
{