summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchatbar.cpp2
-rw-r--r--indra/newview/lldynamictexture.cpp1
-rw-r--r--indra/newview/llfloaterabout.cpp3
-rw-r--r--indra/newview/llfloaterimagepreview.cpp3
-rw-r--r--indra/newview/llfolderview.cpp9
-rw-r--r--indra/newview/llinventorymodel.cpp2
-rw-r--r--indra/newview/llpreview.cpp1
-rw-r--r--indra/newview/llpreviewtexture.cpp51
-rw-r--r--indra/newview/llselectmgr.cpp35
-rw-r--r--indra/newview/llstartup.cpp5
-rw-r--r--indra/newview/lltoolfocus.cpp4
-rw-r--r--indra/newview/llviewerdisplay.cpp28
-rw-r--r--indra/newview/llviewerwindow.cpp49
-rw-r--r--indra/newview/llviewerwindow.h8
14 files changed, 66 insertions, 135 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
index 34c178f509..19b6d80082 100644
--- a/indra/newview/llchatbar.cpp
+++ b/indra/newview/llchatbar.cpp
@@ -580,8 +580,6 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
// << " outlen " << out_str.getLength()
// << llendl;
}
- // make sure we don't do UI-only render as it is apparent avatar isn't animating
- gViewerWindow->finishFastFrame();
}
// static
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 49fcce4911..0f0a9d9bda 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -187,7 +187,6 @@ BOOL LLDynamicTexture::updateAllInstances()
if (dynamicTexture->render())
{
result = TRUE;
- gViewerWindow->finishFastFrame();
sNumRenders++;
}
dynamicTexture->postRender(result);
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 9c8c0162c6..5ced5eafb7 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -26,7 +26,10 @@
#include "llvieweruictrlfactory.h"
#include "viewer.h" // for gViewerDigest
+#if LL_LIBXUL_ENABLED
#include "llmozlib.h"
+#endif // LL_LIBXUL_ENABLED
+
#include "llglheaders.h"
extern LLCPUInfo gSysCPU;
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 68a5a90bcc..1ae6decfdd 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -160,7 +160,6 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata)
break;
}
fp->mAvatarPreview->refresh();
- //gViewerWindow->requestFastFrame(fp);
}
//-----------------------------------------------------------------------------
@@ -470,7 +469,6 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask)
}
LLUI::setCursorPositionLocal(this, mLastMouseX, mLastMouseY);
- //gViewerWindow->requestFastFrame(this);
}
if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview)
@@ -502,7 +500,6 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
mAvatarPreview->zoom((F32)clicks * -0.2f);
mAvatarPreview->refresh();
- //gViewerWindow->requestFastFrame(this);
}
return TRUE;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 462e1515fd..0dc7daa587 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -3841,10 +3841,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )
}
}
- if (handled)
- {
- gViewerWindow->requestFastFrame(this);
- }
return handled;
}
@@ -3880,11 +3876,6 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare
handled = TRUE;
}
- if (handled)
- {
- gViewerWindow->requestFastFrame(this);
- }
-
return handled;
}
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 90455f5902..2a686c46b9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2356,7 +2356,7 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo
if(!gInventory.isObjectDescendentOf(lastitem->getUUID(), trash_id))
{
LLMultiPreview* multi_previewp = LLMultiPreview::getAutoOpenInstance(folder_id);
- if (!multi_previewp && all_one_folder)
+ if (!multi_previewp && all_one_folder && count > 1)
{
S32 left, top;
gFloaterView->getNewFloaterPosition(&left, &top);
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 7241b939ad..c5e589529c 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -473,6 +473,7 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)
LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater("Preview", rect)
{
+ setCanResize(TRUE);
}
void LLMultiPreview::open() /*Flawfinder: ignore*/
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index b9c63b5ad8..95973a102e 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -312,43 +312,46 @@ void LLPreviewTexture::updateAspectRatio()
button_height = BTN_HEIGHT + PREVIEW_PAD;
}
- LLRect window_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
- window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
- window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD;
- LLMultiFloater* hostp = getHost();
- if (hostp)
- {
- // try to keep aspect ratio when hosted, as hosting view can resize without user input
- mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height);
- }
- else
+ if (client_height != mLastHeight || client_width != mLastWidth)
{
- mClientRect.setLeftTopAndSize(LLPANEL_BORDER_WIDTH + PREVIEW_PAD + 6,
- mRect.getHeight() - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD),
- mRect.getWidth() - horiz_pad,
- mRect.getHeight() - (view_height - client_height) - 8);
- }
-
- if (mImage->mFullHeight > mLastHeight && mImage->mFullWidth > mLastWidth)
- {
- mLastWidth = image_width;
- mLastHeight = image_height;
+ mLastWidth = client_width;
+ mLastHeight = client_height;
S32 old_top = mRect.mTop;
S32 old_left = mRect.mLeft;
- if (hostp)
+ if (getHost())
{
- hostp->growToFit(this, view_width, view_height);
+ getHost()->growToFit(this, view_width, view_height);
}
else
{
reshape( view_width, view_height );
S32 new_bottom = old_top - mRect.getHeight();
setOrigin( old_left, new_bottom );
+ // Try to keep whole view onscreen, don't allow partial offscreen.
+ gFloaterView->adjustToFitScreen(this, FALSE);
}
+ }
- // Try to keep whole view onscreen, don't allow partial offscreen.
- gFloaterView->adjustToFitScreen(this, FALSE);
+ // clamp texture size to fit within actual size of floater after attempting resize
+ client_width = llmin(client_width, mRect.getWidth() - horiz_pad);
+ client_height = llmin(client_height, mRect.getHeight() - PREVIEW_HEADER_SIZE - (2 * CLIENT_RECT_VPAD) - LLPANEL_BORDER_WIDTH - info_height);
+
+ LLRect window_rect(0, mRect.getHeight(), mRect.getWidth(), 0);
+ window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
+ window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD;
+
+ if (getHost())
+ {
+ // try to keep aspect ratio when hosted, as hosting view can resize without user input
+ mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height);
+ }
+ else
+ {
+ mClientRect.setLeftTopAndSize(LLPANEL_BORDER_WIDTH + PREVIEW_PAD + 6,
+ mRect.getHeight() - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD),
+ mRect.getWidth() - horiz_pad,
+ client_height);
}
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 046029ea1e..c4e166d68d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1278,21 +1278,30 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
{
if (item)
{
- LLToolDragAndDrop::dropTextureAllFaces(objectp,
- item,
- LLToolDragAndDrop::SOURCE_AGENT,
- LLUUID::null);
- }
- else
- {
- S32 num_faces = objectp->getNumTEs();
- for( S32 face = 0; face < num_faces; face++ )
+ if (te == -1) // all faces
+ {
+ LLToolDragAndDrop::dropTextureAllFaces(objectp,
+ item,
+ LLToolDragAndDrop::SOURCE_AGENT,
+ LLUUID::null);
+ }
+ else // one face
{
- // Texture picker defaults aren't inventory items
- // * Don't need to worry about permissions for them
- // * Can just apply the texture and be done with it.
- objectp->setTEImage(face, gImageList.getImage(imageid));
+ LLToolDragAndDrop::dropTextureOneFace(objectp,
+ te,
+ item,
+ LLToolDragAndDrop::SOURCE_AGENT,
+ LLUUID::null);
}
+ }
+
+ else // not an inventory item
+ {
+ // Texture picker defaults aren't inventory items
+ // * Don't need to worry about permissions for them
+ // * Can just apply the texture and be done with it.
+ objectp->setTEImage(te, gImageList.getImage(imageid));
+
objectp->sendTEUpdate();
}
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 282de24060..04b5fe7340 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -126,10 +126,13 @@
#include "viewer.h"
#include "llmediaengine.h"
#include "llfasttimerview.h"
-#include "llmozlib.h"
#include "llweb.h"
#include "llfloaterhtml.h"
+#if LL_LIBXUL_ENABLED
+#include "llmozlib.h"
+#endif // LL_LIBXUL_ENABLED
+
#if LL_WINDOWS
#include "llwindebug.h"
#include "lldxhardware.h"
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index 2d1cb9c493..c439797c47 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -69,13 +69,13 @@ LLToolCamera::~LLToolCamera()
// virtual
void LLToolCamera::handleSelect()
{
- gFloaterTools->setStatusText("Click and drag to change view");
+ if (gFloaterTools) gFloaterTools->setStatusText("Click and drag to change view");
}
// virtual
void LLToolCamera::handleDeselect()
{
- gFloaterTools->setStatusText("");
+ if (gFloaterTools) gFloaterTools->setStatusText("");
// gAgent.setLookingAtAvatar(FALSE);
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 413a3ac819..9c3643128b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -155,11 +155,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
// Clean up memory the pools may have allocated
if (rebuild)
{
- if (!gViewerWindow->renderingFastFrame())
- {
- gFrameStats.start(LLFrameStats::REBUILD);
- gPipeline.rebuildPools();
- }
+ gFrameStats.start(LLFrameStats::REBUILD);
+ gPipeline.rebuildPools();
}
return;
}
@@ -359,14 +356,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
}
}
- if (rebuild)
- {
- if (gViewerWindow->renderingFastFrame())
- {
- gFrameStats.start(LLFrameStats::STATE_SORT);
- gFrameStats.start(LLFrameStats::REBUILD);
- }
- }
/////////////////////////////
//
@@ -452,7 +441,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
gPipeline.updateCull();
stop_glerror();
- if (rebuild && !gViewerWindow->renderingFastFrame())
+ if (rebuild)
{
LLFastTimer t(LLFastTimer::FTM_REBUILD);
@@ -516,12 +505,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
// glPopMatrix();
//}
- if (gViewerWindow->renderingFastFrame())
- {
- gFrameStats.start(LLFrameStats::RENDER_SYNC);
- gFrameStats.start(LLFrameStats::RENDER_GEOM);
- }
- else if (!(gLogoutRequestSent && gHaveSavedSnapshot)
+ if (!(gLogoutRequestSent && gHaveSavedSnapshot)
&& !gRestoreGL
&& !gDisconnected)
{
@@ -566,7 +550,7 @@ void render_ui_and_swap()
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
LLFastTimer t(LLFastTimer::FTM_RENDER_UI);
- if (!gViewerWindow->renderingFastFrame() && !gDisconnected)
+ if (!gDisconnected)
{
render_ui_3d();
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -587,8 +571,6 @@ void render_ui_and_swap()
gViewerWindow->mWindow->swapBuffers();
}
}
-
- gViewerWindow->finishFirstFastFrame();
}
void render_ui_3d()
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 79db7b72cc..1b39c5bf7e 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1150,15 +1150,13 @@ LLViewerWindow::LLViewerWindow(
mSuppressToolbox( FALSE ),
mHideCursorPermanent( FALSE ),
mPickPending(FALSE),
- mIgnoreActivate( FALSE ),
- mRenderFullFrame(FALSE)
+ mIgnoreActivate( FALSE )
{
// Default to application directory.
strcpy(LLViewerWindow::sSnapshotBaseName, "Snapshot"); /* Flawfinder: ignore */
strcpy(LLViewerWindow::sMovieBaseName, "SLmovie"); /* Flawfinder: ignore */
LLViewerWindow::sSnapshotDir[0] = '\0';
- mFastFrameTimer.stop();
// create window
mWindow = LLWindowManager::createWindow(
@@ -1250,7 +1248,6 @@ LLViewerWindow::LLViewerWindow(
// Create container for all sub-views
mRootView = new LLRootView("root", mVirtualWindowRect, FALSE);
- mRootView->setRenderInFastFrame(FALSE);
if (!gNoRender)
{
@@ -3126,8 +3123,6 @@ void LLViewerWindow::performPick()
return;
}
- finishFastFrame();
-
mPickPending = FALSE;
U32 te_offset = NO_FACE;
@@ -3413,45 +3408,6 @@ void LLViewerWindow::analyzeHit(
//llinfos << "DEBUG Hit Nothing " << llendl;
}
-
-void LLViewerWindow::requestFastFrame(LLView *view)
-{
- if (!mPickPending &&
- mWindow->getSwapMethod() != LLWindow::SWAP_METHOD_UNDEFINED &&
- gStartupState >= STATE_STARTED &&
- gSavedSettings.getBOOL("RenderFastUI") &&
- !gbCapturing)
- {
- if (!mFastFrameTimer.getStarted())
- {
- // we're double buffered, so when first requesting a fast ui update
- // we need to render the scene again so that the front and back buffers
- // are synced
- mRenderFullFrame = TRUE;
- }
- // calculation new expiration time and reset timer
- F32 expiration;
- if (mFastFrameTimer.hasExpired())
- {
- expiration = FAST_FRAME_INCREMENT;
- }
- else
- {
- expiration = llmin(MAX_FAST_FRAME_TIME, mFastFrameTimer.getTimeToExpireF32() + FAST_FRAME_INCREMENT);
- }
-
- mFastFrameTimer.start();
- mFastFrameTimer.setTimerExpirySec(expiration);
-
- LLView::sFastFrameView = view->getRootMostFastFrameView();
- if (!LLView::sFastFrameView)
- {
- LLView::sFastFrameView = view;
- }
- }
-}
-
-
// Returns unit vector relative to camera
// indicating direction of point on screen x,y
LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
@@ -3925,9 +3881,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
return FALSE;
}
- // IW 3/5/04 We don'a wan' nunna yer fest frumes har!
- finishFastFrame();
-
// PRE SNAPSHOT
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 251c0155b6..0097a00b7a 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -205,12 +205,6 @@ public:
LLViewerObject* getObjectUnderCursor(const F32 depth = 16.0f);
- void requestFastFrame(LLView* view);
- BOOL renderingFastFrame() { return mFastFrameTimer.getStarted() && !firstFastFrame(); }
- void finishFastFrame() { mFastFrameTimer.stop(); mRenderFullFrame = FALSE; }
- BOOL firstFastFrame() { return mRenderFullFrame; }
- void finishFirstFastFrame() { mRenderFullFrame = FALSE; }
-
// Returns a pointer to the last object hit
LLViewerObject *lastObjectHit();
LLViewerObject *lastNonFloraObjectHit();
@@ -326,8 +320,6 @@ protected:
static char sMovieBaseName[LL_MAX_PATH]; /* Flawfinder: ignore */
BOOL mIgnoreActivate;
- LLFrameTimer mFastFrameTimer;
- BOOL mRenderFullFrame;
U8* mPickBuffer;
};