summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/CMakeLists.txt19
-rw-r--r--indra/newview/generate_breakpad_symbols.py51
-rw-r--r--indra/newview/llappviewer.cpp15
-rw-r--r--indra/newview/llappviewerwin32.cpp5
-rw-r--r--indra/newview/llassetuploadresponders.cpp8
-rw-r--r--indra/newview/lldrawable.cpp39
-rw-r--r--indra/newview/lldrawpoolalpha.cpp6
-rw-r--r--indra/newview/lldriverparam.h10
-rw-r--r--indra/newview/lleventpoll.cpp2
-rwxr-xr-x[-rw-r--r--]indra/newview/llface.cpp3
-rw-r--r--indra/newview/llfloaterbuycontents.cpp4
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp56
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h7
-rw-r--r--indra/newview/llfloatertos.cpp6
-rw-r--r--indra/newview/llfolderview.cpp3
-rw-r--r--indra/newview/llgroupmgr.cpp184
-rw-r--r--indra/newview/llgroupmgr.h6
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp15
-rw-r--r--indra/newview/llpanelgroupinvite.cpp2
-rw-r--r--indra/newview/llpanelgrouproles.cpp7
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp8
-rw-r--r--indra/newview/llpolymesh.cpp2
-rw-r--r--indra/newview/llpolymesh.h10
-rw-r--r--indra/newview/llpolymorph.cpp60
-rw-r--r--indra/newview/llpolymorph.h13
-rw-r--r--indra/newview/llspatialpartition.cpp102
-rw-r--r--indra/newview/llspatialpartition.h12
-rw-r--r--indra/newview/lltexlayer.cpp8
-rw-r--r--indra/newview/lltexlayerparams.h20
-rw-r--r--indra/newview/lltexturefetch.cpp2
-rwxr-xr-xindra/newview/lltranslate.h4
-rw-r--r--indra/newview/llviewermenu.cpp12
-rwxr-xr-xindra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp71
-rw-r--r--indra/newview/llviewerobject.h3
-rw-r--r--indra/newview/llviewerobjectlist.cpp5
-rw-r--r--indra/newview/llviewerobjectlist.h1
-rw-r--r--indra/newview/llviewerregion.cpp22
-rwxr-xr-xindra/newview/llviewerwindow.cpp3
-rw-r--r--indra/newview/llvovolume.cpp12
-rw-r--r--indra/newview/llvovolume.h1
-rw-r--r--indra/newview/pipeline.cpp23
-rw-r--r--indra/newview/tests/lltranslate_test.cpp7
-rw-r--r--indra/newview/viewer_manifest.py243
44 files changed, 750 insertions, 346 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0031362210..ccf4ce8d1f 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1564,6 +1564,7 @@ set(PACKAGE ON CACHE BOOL
if (WINDOWS)
set_target_properties(${VIEWER_BINARY_NAME}
PROPERTIES
+ # *TODO -reenable this once we get server usage sorted out
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /MAP\"secondlife-bin.MAP\" /OPT:REF"
@@ -1992,8 +1993,9 @@ if (INSTALL)
endif (INSTALL)
if (PACKAGE)
+ set(SYMBOL_SEARCH_DIRS "")
if (WINDOWS)
- set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-windows.tar.bz2")
# slplugin.exe failing symbols dump - need to debug, might have to do with updated version of google breakpad
# set(VIEWER_EXE_GLOBS "${VIEWER_BINARY_NAME}${CMAKE_EXECUTABLE_SUFFIX} slplugin.exe")
@@ -2002,13 +2004,20 @@ if (PACKAGE)
set(VIEWER_COPY_MANIFEST copy_w_viewer_manifest)
endif (WINDOWS)
if (DARWIN)
- set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
+ # *TODO: Generate these search dirs in the cmake files related to each binary.
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/llplugin/slplugin/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_crash_logger/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/mac_updater/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/gstreamer010/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/quicktime/${CMAKE_CFG_INTDIR}")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_BINARY_DIR}/media_plugins/webkit/${CMAKE_CFG_INTDIR}")
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-darwin.tar.bz2")
- set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin")
+ set(VIEWER_EXE_GLOBS "'Second Life' SLPlugin mac-updater mac-crash-logger")
set(VIEWER_LIB_GLOB "*.dylib")
endif (DARWIN)
if (LINUX)
- set(VIEWER_DIST_DIR "${CMAKE_CURRENT_BINARY_DIR}/packaged")
+ list(APPEND SYMBOL_SEARCH_DIRS "${CMAKE_CURRENT_BINARY_DIR}/packaged")
set(VIEWER_SYMBOL_FILE "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-symbols-linux.tar.bz2")
set(VIEWER_EXE_GLOBS "do-not-directly-run-secondlife-bin SLPlugin")
set(VIEWER_LIB_GLOB "*${CMAKE_SHARED_MODULE_SUFFIX}*")
@@ -2028,7 +2037,7 @@ if (PACKAGE)
ARGS
"${CMAKE_CURRENT_SOURCE_DIR}/generate_breakpad_symbols.py"
"${LLBUILD_CONFIG}"
- "${VIEWER_DIST_DIR}"
+ "${SYMBOL_SEARCH_DIRS}"
"${VIEWER_EXE_GLOBS}"
"${VIEWER_LIB_GLOB}"
"${AUTOBUILD_INSTALL_DIR}/bin/dump_syms"
diff --git a/indra/newview/generate_breakpad_symbols.py b/indra/newview/generate_breakpad_symbols.py
index 5ebec1563e..4181e4ebb3 100644
--- a/indra/newview/generate_breakpad_symbols.py
+++ b/indra/newview/generate_breakpad_symbols.py
@@ -39,17 +39,20 @@ import shlex
import subprocess
import tarfile
import StringIO
+import pprint
+
+DEBUG=False
def usage():
- print >>sys.stderr, "usage: %s viewer_dir viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0]
+ print >>sys.stderr, "usage: %s search_dirs viewer_exes libs_suffix dump_syms_tool viewer_symbol_file" % sys.argv[0]
class MissingModuleError(Exception):
def __init__(self, modules):
Exception.__init__(self, "Failed to find required modules: %r" % modules)
self.modules = modules
-def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file):
- print "generate_breakpad_symbols run with args: %s" % str((configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file))
+def main(configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file):
+ print "generate_breakpad_symbols run with args: %s" % str((configuration, search_dirs, viewer_exes, libs_suffix, dump_syms_tool, viewer_symbol_file))
if not re.match("release", configuration, re.IGNORECASE):
print "skipping breakpad symbol generation for non-release build."
@@ -67,21 +70,49 @@ def main(configuration, viewer_dir, viewer_exes, libs_suffix, dump_syms_tool, vi
return True
return fnmatch.fnmatch(f, libs_suffix)
+ search_dirs = search_dirs.split(";")
+
def list_files():
- for (dirname, subdirs, filenames) in os.walk(viewer_dir):
- #print "scanning '%s' for modules..." % dirname
- for f in itertools.ifilter(matches, filenames):
- yield os.path.join(dirname, f)
+ for search_dir in search_dirs:
+ for (dirname, subdirs, filenames) in os.walk(search_dir):
+ if DEBUG:
+ print "scanning '%s' for modules..." % dirname
+ for f in itertools.ifilter(matches, filenames):
+ yield os.path.join(dirname, f)
def dump_module(m):
print "dumping module '%s' with '%s'..." % (m, dump_syms_tool)
- child = subprocess.Popen([dump_syms_tool, m] , stdout=subprocess.PIPE)
+ dsym_full_path = m
+ child = subprocess.Popen([dump_syms_tool, dsym_full_path] , stdout=subprocess.PIPE)
out, err = child.communicate()
return (m,child.returncode, out, err)
- out = tarfile.open(viewer_symbol_file, 'w:bz2')
+
+ modules = {}
+
+ for m in list_files():
+ if DEBUG:
+ print "examining module '%s' ... " % m,
+ filename=os.path.basename(m)
+ if -1 != m.find("DWARF"):
+ # Just use this module; it has the symbols we want.
+ modules[filename] = m
+ if DEBUG:
+ print "found dSYM entry"
+ elif filename not in modules:
+ # Only use this if we don't already have a (possibly better) entry.
+ modules[filename] = m
+ if DEBUG:
+ print "found new entry"
+ elif DEBUG:
+ print "ignoring entry"
+
+
+ print "Found these following modules:"
+ pprint.pprint( modules )
- for (filename,status,symbols,err) in itertools.imap(dump_module, list_files()):
+ out = tarfile.open(viewer_symbol_file, 'w:bz2')
+ for (filename,status,symbols,err) in itertools.imap(dump_module, modules.values()):
if status == 0:
module_line = symbols[:symbols.index('\n')]
module_line = module_line.split()
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c9458857d1..0a9d6229ef 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1891,8 +1891,17 @@ bool LLAppViewer::cleanup()
sTextureFetch->shutDownTextureCacheThread() ;
sTextureFetch->shutDownImageDecodeThread() ;
+ llinfos << "Shutting down message system" << llendflush;
+ end_messaging_system();
+
+ // *NOTE:Mani - The following call is not thread safe.
+ LL_CHECK_MEMORY
+ LLCurl::cleanupClass();
+ LL_CHECK_MEMORY
+
LLFilePickerThread::cleanupClass();
+ //MUST happen AFTER LLCurl::cleanupClass
delete sTextureCache;
sTextureCache = NULL;
delete sTextureFetch;
@@ -1961,12 +1970,6 @@ bool LLAppViewer::cleanup()
LLViewerAssetStatsFF::cleanup();
- llinfos << "Shutting down message system" << llendflush;
- end_messaging_system();
-
- // *NOTE:Mani - The following call is not thread safe.
- LLCurl::cleanupClass();
-
// If we're exiting to launch an URL, do that here so the screen
// is at the right resolution before we launch IE.
if (!gLaunchFileOnQuit.empty())
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 53c77fa22e..e0ca1232b0 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -131,7 +131,9 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
// Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1
// Enable to get mem debugging within visual studio.
- //_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#if LL_DEBUG
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#else
_CrtSetDbgFlag(0); // default, just making explicit
ULONG ulEnableLFH = 2;
@@ -146,6 +148,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
heap_enable_lfh_error[i] = GetLastError();
}
#endif
+#endif
// *FIX: global
gIconResource = MAKEINTRESOURCE(IDI_LL_ICON);
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 65bfc990d1..7b2c536f5a 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -919,7 +919,7 @@ public:
bool uploadConfirmationCallback(
const LLSD& notification,
const LLSD& response,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
+ LLPointer<LLNewAgentInventoryVariablePriceResponder> responder)
{
S32 option;
std::string confirmation_url;
@@ -949,7 +949,7 @@ public:
void confirmUpload(
const std::string& confirmation_url,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
+ LLPointer<LLNewAgentInventoryVariablePriceResponder> responder)
{
if ( getFilename().empty() )
{
@@ -1124,7 +1124,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(
// and cause sadness.
mImpl->confirmUpload(
confirmation_url,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this));
+ LLPointer<LLNewAgentInventoryVariablePriceResponder>(this));
}
else
{
@@ -1157,7 +1157,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(
mImpl,
_1,
_2,
- boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)));
+ LLPointer<LLNewAgentInventoryVariablePriceResponder>(this)));
}
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4eda2b92b3..4894d63e13 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -624,7 +624,9 @@ BOOL LLDrawable::updateMove()
{
return FALSE;
}
-
+
+ makeActive();
+
BOOL done;
if (isState(MOVE_UNDAMPED))
@@ -633,7 +635,6 @@ BOOL LLDrawable::updateMove()
}
else
{
- makeActive();
done = updateMoveDamped();
}
return done;
@@ -951,6 +952,12 @@ LLSpatialGroup* LLDrawable::getSpatialGroup() const
void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
{
+ //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this
+ llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this));
+
+ //precondition: groupp MUST be null or groupp MUST contain this
+ llassert(!groupp || groupp->hasElement(this));
+
/*if (mSpatialGroupp && (groupp != mSpatialGroupp))
{
mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY);
@@ -970,9 +977,12 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp)
}
}
- mSpatialGroupp = groupp;
+ //postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1
+ //postcondition: if next group is NOT NULL, binIndex must not be -1
+ llassert(groupp == NULL ? (mSpatialGroupp == NULL || mSpatialGroupp->isDead()) || getBinIndex() == -1 :
+ getBinIndex() != -1);
- llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1);
+ mSpatialGroupp = groupp;
}
LLSpatialPartition* LLDrawable::getSpatialPartition()
@@ -1400,7 +1410,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
markDead();
return;
}
-
+
if (gShiftFrame)
{
return;
@@ -1483,13 +1493,11 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable::cleanupReferences();
if (mDrawable)
{
- LLSpatialGroup* group = mDrawable->getSpatialGroup();
- if (group)
- {
- group->mOctreeNode->remove(mDrawable);
- mDrawable->setSpatialGroup(NULL);
- }
+ /*
+ DON'T DO THIS -- this should happen through octree destruction
+
+ mDrawable->setSpatialGroup(NULL);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1500,15 +1508,10 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable* drawable = child->mDrawable;
if (drawable)
{
- LLSpatialGroup* group = drawable->getSpatialGroup();
- if (group)
- {
- group->mOctreeNode->remove(drawable);
- drawable->setSpatialGroup(NULL);
- }
+ drawable->setSpatialGroup(NULL);
}
}
- }
+ }*/
LLDrawable* drawablep = mDrawable;
mDrawable = NULL;
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index b4f6bf9383..313b310e1e 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -411,12 +411,6 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
continue;
}
- if ((params.mVertexBuffer->getTypeMask() & mask) != mask)
- { //FIXME!
- llwarns << "Missing required components, skipping render batch." << llendl;
- continue;
- }
-
LLRenderPass::applyModelMatrix(params);
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 7a4d711d4e..c0976d1d43 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -83,6 +83,16 @@ public:
LLDriverParam(LLWearable *wearablep);
~LLDriverParam();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLDriverParamInfo* getInfo() const { return (LLDriverParamInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 4f4d9a40b4..2c786b7f8b 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -86,7 +86,7 @@ namespace
class LLEventPollEventTimer : public LLEventTimer
{
- typedef boost::intrusive_ptr<LLEventPollResponder> EventPollResponderPtr;
+ typedef LLPointer<LLEventPollResponder> EventPollResponderPtr;
public:
LLEventPollEventTimer(F32 period, EventPollResponderPtr responder)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 4a0c94df33..188f943f13 100644..100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -166,7 +166,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
//special value to indicate uninitialized position
mIndicesIndex = 0xFFFFFFFF;
-
+
+ mIndexInTex = 0;
mTexture = NULL;
mTEOffset = -1;
mTextureIndex = 255;
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 809d344d01..bca4b5e447 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -211,8 +211,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
BOOL item_is_multi = FALSE;
if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED
- || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
- && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
+ || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK))
{
item_is_multi = TRUE;
}
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 0fe0e151fb..1e46d7a402 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -98,7 +98,11 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed)
mLabelSuggestedUseD(NULL),
mEditD(NULL),
mApplyEditsButton(NULL),
- mBeaconColor()
+ mBeaconColor(),
+ mPreviousValueA(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueB(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueC(LLPathfindingLinkset::MAX_WALKABILITY_VALUE),
+ mPreviousValueD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE)
{
}
@@ -168,7 +172,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditA = findChild<LLLineEditor>("edit_a_value");
llassert(mEditA != NULL);
mEditA->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditA->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueA));
mLabelEditB = findChild<LLTextBase>("edit_b_label");
llassert(mLabelEditB != NULL);
@@ -179,7 +183,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditB = findChild<LLLineEditor>("edit_b_value");
llassert(mEditB != NULL);
mEditB->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditB->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueB));
mLabelEditC = findChild<LLTextBase>("edit_c_label");
llassert(mLabelEditC != NULL);
@@ -190,7 +194,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditC = findChild<LLLineEditor>("edit_c_value");
llassert(mEditC != NULL);
mEditC->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditC->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueC));
mLabelEditD = findChild<LLTextBase>("edit_d_label");
llassert(mLabelEditD != NULL);
@@ -201,7 +205,7 @@ BOOL LLFloaterPathfindingLinksets::postBuild()
mEditD = findChild<LLLineEditor>("edit_d_value");
llassert(mEditD != NULL);
mEditD->setPrevalidate(LLTextValidate::validateNonNegativeS32);
- mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1));
+ mEditD->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered, this, _1, mPreviousValueD));
mApplyEditsButton = findChild<LLButton>("apply_edit_values");
llassert(mApplyEditsButton != NULL);
@@ -323,26 +327,38 @@ void LLFloaterPathfindingLinksets::onClearFiltersClicked()
rebuildObjectsScrollList();
}
-void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl)
+void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue)
{
LLLineEditor *pLineEditor = static_cast<LLLineEditor *>(pUICtrl);
llassert(pLineEditor != NULL);
const std::string &valueString = pLineEditor->getText();
- S32 value;
- if (LLStringUtil::convertToS32(valueString, value))
+ S32 intValue;
+ LLSD value;
+ bool doResetValue = false;
+
+ if (valueString.empty())
{
- if ((value < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (value > LLPathfindingLinkset::MAX_WALKABILITY_VALUE))
- {
- value = llclamp(value, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
- pLineEditor->setValue(LLSD(value));
- }
+ value = pPreviousValue;
+ doResetValue = true;
+ }
+ else if (LLStringUtil::convertToS32(valueString, intValue))
+ {
+ doResetValue = ((intValue < LLPathfindingLinkset::MIN_WALKABILITY_VALUE) || (intValue > LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(llclamp(intValue, LLPathfindingLinkset::MIN_WALKABILITY_VALUE, LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
}
else
{
- pLineEditor->setValue(LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE));
+ value = LLSD(LLPathfindingLinkset::MAX_WALKABILITY_VALUE);
+ doResetValue = true;
+ }
+
+ if (doResetValue)
+ {
+ pLineEditor->setValue(value);
}
+ pPreviousValue = value;
}
void LLFloaterPathfindingLinksets::onApplyChangesClicked()
@@ -376,10 +392,14 @@ void LLFloaterPathfindingLinksets::updateEditFieldValues()
const LLPathfindingLinkset *linkset = dynamic_cast<const LLPathfindingLinkset *>(firstSelectedObjectPtr.get());
setEditLinksetUse(linkset->getLinksetUse());
- mEditA->setValue(LLSD(linkset->getWalkabilityCoefficientA()));
- mEditB->setValue(LLSD(linkset->getWalkabilityCoefficientB()));
- mEditC->setValue(LLSD(linkset->getWalkabilityCoefficientC()));
- mEditD->setValue(LLSD(linkset->getWalkabilityCoefficientD()));
+ mPreviousValueA = LLSD(linkset->getWalkabilityCoefficientA());
+ mPreviousValueB = LLSD(linkset->getWalkabilityCoefficientB());
+ mPreviousValueC = LLSD(linkset->getWalkabilityCoefficientC());
+ mPreviousValueD = LLSD(linkset->getWalkabilityCoefficientD());
+ mEditA->setValue(mPreviousValueA);
+ mEditB->setValue(mPreviousValueB);
+ mEditC->setValue(mPreviousValueC);
+ mEditD->setValue(mPreviousValueD);
}
}
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index 6538308122..7149da9215 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -74,7 +74,7 @@ private:
void onApplyAllFilters();
void onClearFiltersClicked();
- void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
+ void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl, LLSD &pPreviousValue);
void onApplyChangesClicked();
void clearFilters();
@@ -132,6 +132,11 @@ private:
LLButton *mApplyEditsButton;
LLColor4 mBeaconColor;
+
+ LLSD mPreviousValueA;
+ LLSD mPreviousValueB;
+ LLSD mPreviousValueC;
+ LLSD mPreviousValueD;
};
#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H
diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp
index c5df7e16e9..a242b224cd 100644
--- a/indra/newview/llfloatertos.cpp
+++ b/indra/newview/llfloatertos.cpp
@@ -71,9 +71,9 @@ class LLIamHere : public LLHTTPClient::Responder
public:
- static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent )
+ static LLIamHere* build( LLFloaterTOS* parent )
{
- return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) );
+ return new LLIamHere( parent );
};
virtual void setParent( LLFloaterTOS* parentIn )
@@ -102,7 +102,7 @@ class LLIamHere : public LLHTTPClient::Responder
// this is global and not a class member to keep crud out of the header file
namespace {
- boost::intrusive_ptr< LLIamHere > gResponsePtr = 0;
+ LLPointer< LLIamHere > gResponsePtr = 0;
};
BOOL LLFloaterTOS::postBuild()
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index d4080ab3f7..8e540a0cc8 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2234,12 +2234,11 @@ void LLFolderView::doIdle()
mDebugFilters = debug_filters;
arrangeAll();
}
-
BOOL filter_modified_and_active = mFilter->isModified() && mFilter->isNotDefault();
mNeedsAutoSelect = filter_modified_and_active &&
!(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
mFilter->clearModified();
-
+
// filter to determine visibility before arranging
filterFromRoot();
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index aceb7f0614..6916cf813a 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -36,6 +36,7 @@
#include <vector>
#include <algorithm>
+#include "llappviewer.h"
#include "llagent.h"
#include "llui.h"
#include "message.h"
@@ -745,6 +746,7 @@ void LLGroupMgrGroupData::cancelRoleChanges()
LLGroupMgr::LLGroupMgr()
{
+ mLastGroupMembersRequestFrame = 0;
}
LLGroupMgr::~LLGroupMgr()
@@ -1500,6 +1502,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id)
}
}
+
void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id)
{
lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl;
@@ -1832,6 +1835,187 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id,
}
}
+
+// Responder class for capability group management
+class GroupMemberDataResponder : public LLHTTPClient::Responder
+{
+public:
+ GroupMemberDataResponder() {}
+ virtual ~GroupMemberDataResponder() {}
+ virtual void result(const LLSD& pContent);
+ virtual void error(U32 pStatus, const std::string& pReason);
+private:
+ LLSD mMemberData;
+};
+
+void GroupMemberDataResponder::error(U32 pStatus, const std::string& pReason)
+{
+ LL_WARNS("GrpMgr") << "Error receiving group member data." << LL_ENDL;
+}
+
+void GroupMemberDataResponder::result(const LLSD& content)
+{
+ LLGroupMgr::processCapGroupMembersRequest(content);
+}
+
+
+// static
+void LLGroupMgr::sendCapGroupMembersRequest(const LLUUID& group_id)
+{
+ // Have we requested the information already this frame?
+ if(mLastGroupMembersRequestFrame == gFrameCount)
+ return;
+
+ LLViewerRegion* currentRegion = gAgent.getRegion();
+ // Thank you FS:Ansariel!
+ if(!currentRegion)
+ {
+ LL_WARNS("GrpMgr") << "Agent does not have a current region. Uh-oh!" << LL_ENDL;
+ return;
+ }
+
+ // Check to make sure we have our capabilities
+ if(!currentRegion->capabilitiesReceived())
+ {
+ LL_WARNS("GrpMgr") << " Capabilities not received!" << LL_ENDL;
+ return;
+ }
+
+ // Get our capability
+ std::string cap_url = currentRegion->getCapability("GroupMemberData");
+
+ // Thank you FS:Ansariel!
+ if(cap_url.empty())
+ {
+ LL_INFOS("GrpMgr") << "Region has no GroupMemberData capability. Falling back to UDP fetch." << LL_ENDL;
+ sendGroupMembersRequest(group_id);
+ return;
+ }
+
+ // Post to our service. Add a body containing the group_id.
+ LLSD body = LLSD::emptyMap();
+ body["group_id"] = group_id;
+
+ LLHTTPClient::ResponderPtr grp_data_responder = new GroupMemberDataResponder();
+
+ // This could take a while to finish, timeout after 5 minutes.
+ LLHTTPClient::post(cap_url, body, grp_data_responder, LLSD(), 300);
+
+ mLastGroupMembersRequestFrame = gFrameCount;
+}
+
+
+// static
+void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
+{
+ // Did we get anything in content?
+ if(!content.size())
+ {
+ LL_DEBUGS("GrpMgr") << "No group member data received." << LL_ENDL;
+ return;
+ }
+
+ // If we have no members, there's no reason to do anything else
+ S32 num_members = content["member_count"];
+ if(num_members < 1)
+ return;
+
+ LLUUID group_id = content["group_id"].asUUID();
+
+ LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
+ if(!group_datap)
+ {
+ LL_WARNS("GrpMgr") << "Received incorrect, possibly stale, group or request id" << LL_ENDL;
+ return;
+ }
+
+ group_datap->mMemberCount = num_members;
+
+ LLSD member_list = content["members"];
+ LLSD titles = content["titles"];
+ LLSD defaults = content["defaults"];
+
+ std::string online_status;
+ std::string title;
+ S32 contribution;
+ U64 member_powers;
+ // If this is changed to a bool, make sure to change the LLGroupMemberData constructor
+ BOOL is_owner;
+
+ // Compute this once, rather than every time.
+ U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16);
+
+ LLSD::map_const_iterator member_iter_start = member_list.beginMap();
+ LLSD::map_const_iterator member_iter_end = member_list.endMap();
+ for( ; member_iter_start != member_iter_end; ++member_iter_start)
+ {
+ // Reset defaults
+ online_status = "unknown";
+ title = titles[0].asString();
+ contribution = 0;
+ member_powers = default_powers;
+ is_owner = false;
+
+ const LLUUID member_id(member_iter_start->first);
+ LLSD member_info = member_iter_start->second;
+
+ if(member_info.has("last_login"))
+ {
+ online_status = member_info["last_login"].asString();
+ if(online_status == "Online")
+ online_status = LLTrans::getString("group_member_status_online");
+ else
+ formatDateString(online_status);
+ }
+
+ if(member_info.has("title"))
+ title = titles[member_info["title"].asInteger()].asString();
+
+ if(member_info.has("powers"))
+ member_powers = llstrtou64(member_info["powers"].asString().c_str(), NULL, 16);
+
+ if(member_info.has("donated_square_meters"))
+ contribution = member_info["donated_square_meters"];
+
+ if(member_info.has("owner"))
+ is_owner = true;
+
+ LLGroupMemberData* data = new LLGroupMemberData(member_id,
+ contribution,
+ member_powers,
+ title,
+ online_status,
+ is_owner);
+
+ group_datap->mMembers[member_id] = data;
+ }
+
+ // Technically, we have this data, but to prevent completely overhauling
+ // this entire system (it would be nice, but I don't have the time),
+ // I'm going to be dumb and just call services I most likely don't need
+ // with the thought being that the system might need it to be done.
+ //
+ // TODO:
+ // Refactor to reduce multiple calls for data we already have.
+ if(group_datap->mTitles.size() < 1)
+ LLGroupMgr::getInstance()->sendGroupTitlesRequest(group_id);
+
+
+ group_datap->mMemberDataComplete = TRUE;
+ group_datap->mMemberRequestID.setNull();
+ // Make the role-member data request
+ if (group_datap->mPendingRoleMemberRequest)
+ {
+ group_datap->mPendingRoleMemberRequest = FALSE;
+ LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(group_id);
+ }
+
+ group_datap->mChanged = TRUE;
+ LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA);
+
+}
+
+
void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id)
{
lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl;
diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h
index df3cd17e03..62b2978f21 100644
--- a/indra/newview/llgroupmgr.h
+++ b/indra/newview/llgroupmgr.h
@@ -340,6 +340,10 @@ public:
static void sendGroupMemberEjects(const LLUUID& group_id,
uuid_vec_t& member_ids);
+ // BAKER
+ void sendCapGroupMembersRequest(const LLUUID& group_id);
+ static void processCapGroupMembersRequest(const LLSD& content);
+
void cancelGroupRoleChanges(const LLUUID& group_id);
static void processGroupPropertiesReply(LLMessageSystem* msg, void** data);
@@ -375,6 +379,8 @@ private:
typedef std::set<LLParticularGroupObserver*> observer_set_t;
typedef std::map<LLUUID,observer_set_t> observer_map_t;
observer_map_t mParticularObservers;
+
+ S32 mLastGroupMembersRequestFrame;
};
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index bc594b5517..f6ce7de47e 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -313,11 +313,10 @@ void LLPanelGroupGeneral::activate()
{
LLGroupMgr::getInstance()->sendGroupTitlesRequest(mGroupID);
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID);
-
if (!gdatap || !gdatap->isMemberDataComplete() )
{
- LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID);
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
}
mFirstUse = FALSE;
@@ -714,7 +713,7 @@ void LLPanelGroupGeneral::updateMembers()
for( ; mMemberProgress != gdatap->mMembers.end() && i<UPDATE_MEMBERS_PER_FRAME;
++mMemberProgress, ++i)
{
- //llinfos << "Adding " << iter->first << ", " << iter->second->getTitle() << llendl;
+ lldebugs << "Adding " << mMemberProgress->first << ", " << mMemberProgress->second->getTitle() << llendl;
LLGroupMemberData* member = mMemberProgress->second;
if (!member)
{
@@ -758,15 +757,15 @@ void LLPanelGroupGeneral::updateMembers()
}
sAllTime += all_timer.getElapsedTimeF32();
- llinfos << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl;
+ lldebugs << "Updated " << i << " of " << UPDATE_MEMBERS_PER_FRAME << "members in the list." << llendl;
if (mMemberProgress == gdatap->mMembers.end())
{
- llinfos << " member list completed." << llendl;
+ lldebugs << " member list completed." << llendl;
mListVisibleMembers->setEnabled(TRUE);
- llinfos << "All Time: " << sAllTime << llendl;
- llinfos << "SD Time: " << sSDTime << llendl;
- llinfos << "Element Time: " << sElementTime << llendl;
+ lldebugs << "All Time: " << sAllTime << llendl;
+ lldebugs << "SD Time: " << sSDTime << llendl;
+ lldebugs << "Element Time: " << sElementTime << llendl;
}
else
{
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp
index 00dd206571..1ed8d8cf03 100644
--- a/indra/newview/llpanelgroupinvite.cpp
+++ b/indra/newview/llpanelgroupinvite.cpp
@@ -570,8 +570,8 @@ void LLPanelGroupInvite::updateLists()
if (!mPendingUpdate)
{
LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID);
- LLGroupMgr::getInstance()->sendGroupMembersRequest(mImplementation->mGroupID);
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID);
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID);
}
mPendingUpdate = TRUE;
}
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index f825ee3215..bbe47ae943 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -356,7 +356,7 @@ void LLPanelGroupRoles::activate()
if (!gdatap || !gdatap->isMemberDataComplete() )
{
- LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID);
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
}
// Check role data.
@@ -1987,7 +1987,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
if (!gdatap || !gdatap->isMemberDataComplete())
{
- LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID);
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
}
if (!gdatap || !gdatap->isRoleMemberDataComplete())
@@ -2580,7 +2580,7 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
}
else
{
- LLGroupMgr::getInstance()->sendGroupMembersRequest(mGroupID);
+ LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID);
}
if (gdatap->isRoleDataComplete())
@@ -2604,6 +2604,7 @@ void LLPanelGroupActionsSubTab::handleActionSelect()
LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mGroupID);
}
}
+
void LLPanelGroupRoles::setGroupID(const LLUUID& id)
{
LLPanelGroupTab::setGroupID(id);
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 66c9c323cb..5d75375847 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -115,8 +115,8 @@ void LLPanelMarketplaceInbox::onFocusReceived()
if (sidepanel_inventory)
{
sidepanel_inventory->clearSelections(true, false);
- }
-
+ }
+
gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
}
@@ -168,8 +168,8 @@ U32 LLPanelMarketplaceInbox::getFreshItemCount() const
if (inbox_item_view && inbox_item_view->isFresh())
{
fresh_item_count++;
- }
- }
+ }
+ }
}
}
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 70f3b5335e..9902d047e4 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -241,7 +241,7 @@ BOOL LLPolyMeshSharedData::allocateVertexData( U32 numVertices )
mBaseNormals[i].clear();
mBaseBinormals[i].clear();
mTexCoords[i].clear();
- mWeights[i] = 0.f;
+ mWeights[i] = 0.f;
}
mNumVertices = numVertices;
return TRUE;
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index ffb11a3f7e..850171d169 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -406,6 +406,16 @@ public:
LLPolySkeletalDistortion(LLVOAvatar *avatarp);
~LLPolySkeletalDistortion();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// Special: These functions are overridden by child classes
LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; }
// This sets mInfo and calls initialization functions
diff --git a/indra/newview/llpolymorph.cpp b/indra/newview/llpolymorph.cpp
index d25d1420ee..bd96608641 100644
--- a/indra/newview/llpolymorph.cpp
+++ b/indra/newview/llpolymorph.cpp
@@ -73,9 +73,9 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@@ -89,17 +89,12 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
}
}
-
//-----------------------------------------------------------------------------
// ~LLPolyMorphData()
//-----------------------------------------------------------------------------
LLPolyMorphData::~LLPolyMorphData()
{
- delete [] mVertexIndices;
- delete [] mCoords;
- delete [] mNormals;
- delete [] mBinormals;
- delete [] mTexCoords;
+ freeData();
}
//-----------------------------------------------------------------------------
@@ -119,11 +114,16 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-------------------------------------------------------------------------
+ // free any existing data
+ //-------------------------------------------------------------------------
+ freeData();
+
+ //-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
- mCoords = new LLVector4a[numVertices];
- mNormals = new LLVector4a[numVertices];
- mBinormals = new LLVector4a[numVertices];
+ mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
+ mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];
@@ -207,6 +207,42 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
}
//-----------------------------------------------------------------------------
+// freeData()
+//-----------------------------------------------------------------------------
+void LLPolyMorphData::freeData()
+{
+ if (mCoords != NULL)
+ {
+ ll_aligned_free_16(mCoords);
+ mCoords = NULL;
+ }
+
+ if (mNormals != NULL)
+ {
+ ll_aligned_free_16(mNormals);
+ mNormals = NULL;
+ }
+
+ if (mBinormals != NULL)
+ {
+ ll_aligned_free_16(mBinormals);
+ mBinormals = NULL;
+ }
+
+ if (mTexCoords != NULL)
+ {
+ delete [] mTexCoords;
+ mTexCoords = NULL;
+ }
+
+ if (mVertexIndices != NULL)
+ {
+ delete [] mVertexIndices;
+ mVertexIndices = NULL;
+ }
+}
+
+//-----------------------------------------------------------------------------
// LLPolyMorphTargetInfo()
//-----------------------------------------------------------------------------
LLPolyMorphTargetInfo::LLPolyMorphTargetInfo()
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 46e23b7792..678599d7e1 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -48,6 +48,16 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
@@ -67,6 +77,9 @@ public:
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
+
+private:
+ void freeData();
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 06c87e57fc..2083afdcf5 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1859,6 +1859,8 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
drawablep->setSpatialGroup(NULL);
}
+ drawablep->setSpatialGroup(NULL);
+
assert_octree_valid(mOctree);
return TRUE;
@@ -4194,7 +4196,7 @@ public:
{
if (index < 255)
{
- if (facep->mDrawInfo->mTextureList.size()<= index)
+ if (facep->mDrawInfo->mTextureList.size() <= index)
{
llerrs << "Face texture index out of bounds." << llendl;
}
@@ -4714,55 +4716,63 @@ LLCullResult::LLCullResult()
mVisibleListAllocated = 0;
mVisibleBridgeAllocated = 0;
- mVisibleGroups = NULL;
- mVisibleGroupsEnd = NULL;
- mAlphaGroups = NULL;
- mAlphaGroupsEnd = NULL;
- mOcclusionGroups = NULL;
- mOcclusionGroupsEnd = NULL;
- mDrawableGroups = NULL;
- mDrawableGroupsEnd = NULL;
- mVisibleList = NULL;
- mVisibleListEnd = NULL;
- mVisibleBridge = NULL;
- mVisibleBridgeEnd = NULL;
+ mVisibleGroups.clear();
+ mVisibleGroups.push_back(NULL);
+ mVisibleGroupsEnd = &mVisibleGroups[0];
+ mAlphaGroups.clear();
+ mAlphaGroups.push_back(NULL);
+ mAlphaGroupsEnd = &mAlphaGroups[0];
+ mOcclusionGroups.clear();
+ mOcclusionGroups.push_back(NULL);
+ mOcclusionGroupsEnd = &mOcclusionGroups[0];
+ mDrawableGroups.clear();
+ mDrawableGroups.push_back(NULL);
+ mDrawableGroupsEnd = &mDrawableGroups[0];
+ mVisibleList.clear();
+ mVisibleList.push_back(NULL);
+ mVisibleListEnd = &mVisibleList[0];
+ mVisibleBridge.clear();
+ mVisibleBridge.push_back(NULL);
+ mVisibleBridgeEnd = &mVisibleBridge[0];
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
{
- mRenderMap[i] = NULL;
- mRenderMapEnd[i] = NULL;
+ mRenderMap[i].clear();
+ mRenderMap[i].push_back(NULL);
+ mRenderMapEnd[i] = &mRenderMap[i][0];
mRenderMapAllocated[i] = 0;
}
clear();
}
-void LLCullResult::pushBack(void**& head, U32& count, void* val)
+template <class T, class V>
+void LLCullResult::pushBack(T& head, U32& count, V* val)
{
+ head[count] = val;
+ head.push_back(NULL);
count++;
- head = (void**) realloc((void*) head, sizeof(void*) * count);
- head[count-1] = val;
}
void LLCullResult::clear()
{
mVisibleGroupsSize = 0;
- mVisibleGroupsEnd = mVisibleGroups;
+ mVisibleGroupsEnd = &mVisibleGroups[0];
mAlphaGroupsSize = 0;
- mAlphaGroupsEnd = mAlphaGroups;
+ mAlphaGroupsEnd = &mAlphaGroups[0];
mOcclusionGroupsSize = 0;
- mOcclusionGroupsEnd = mOcclusionGroups;
+ mOcclusionGroupsEnd = &mOcclusionGroups[0];
mDrawableGroupsSize = 0;
- mDrawableGroupsEnd = mDrawableGroups;
+ mDrawableGroupsEnd = &mDrawableGroups[0];
mVisibleListSize = 0;
- mVisibleListEnd = mVisibleList;
+ mVisibleListEnd = &mVisibleList[0];
mVisibleBridgeSize = 0;
- mVisibleBridgeEnd = mVisibleBridge;
+ mVisibleBridgeEnd = &mVisibleBridge[0];
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
@@ -4772,13 +4782,13 @@ void LLCullResult::clear()
mRenderMap[i][j] = 0;
}
mRenderMapSize[i] = 0;
- mRenderMapEnd[i] = mRenderMap[i];
+ mRenderMapEnd[i] = &(mRenderMap[i][0]);
}
}
LLCullResult::sg_iterator LLCullResult::beginVisibleGroups()
{
- return mVisibleGroups;
+ return &mVisibleGroups[0];
}
LLCullResult::sg_iterator LLCullResult::endVisibleGroups()
@@ -4788,7 +4798,7 @@ LLCullResult::sg_iterator LLCullResult::endVisibleGroups()
LLCullResult::sg_iterator LLCullResult::beginAlphaGroups()
{
- return mAlphaGroups;
+ return &mAlphaGroups[0];
}
LLCullResult::sg_iterator LLCullResult::endAlphaGroups()
@@ -4798,7 +4808,7 @@ LLCullResult::sg_iterator LLCullResult::endAlphaGroups()
LLCullResult::sg_iterator LLCullResult::beginOcclusionGroups()
{
- return mOcclusionGroups;
+ return &mOcclusionGroups[0];
}
LLCullResult::sg_iterator LLCullResult::endOcclusionGroups()
@@ -4808,7 +4818,7 @@ LLCullResult::sg_iterator LLCullResult::endOcclusionGroups()
LLCullResult::sg_iterator LLCullResult::beginDrawableGroups()
{
- return mDrawableGroups;
+ return &mDrawableGroups[0];
}
LLCullResult::sg_iterator LLCullResult::endDrawableGroups()
@@ -4818,7 +4828,7 @@ LLCullResult::sg_iterator LLCullResult::endDrawableGroups()
LLCullResult::drawable_iterator LLCullResult::beginVisibleList()
{
- return mVisibleList;
+ return &mVisibleList[0];
}
LLCullResult::drawable_iterator LLCullResult::endVisibleList()
@@ -4828,7 +4838,7 @@ LLCullResult::drawable_iterator LLCullResult::endVisibleList()
LLCullResult::bridge_iterator LLCullResult::beginVisibleBridge()
{
- return mVisibleBridge;
+ return &mVisibleBridge[0];
}
LLCullResult::bridge_iterator LLCullResult::endVisibleBridge()
@@ -4838,7 +4848,7 @@ LLCullResult::bridge_iterator LLCullResult::endVisibleBridge()
LLCullResult::drawinfo_iterator LLCullResult::beginRenderMap(U32 type)
{
- return mRenderMap[type];
+ return &mRenderMap[type][0];
}
LLCullResult::drawinfo_iterator LLCullResult::endRenderMap(U32 type)
@@ -4854,10 +4864,10 @@ void LLCullResult::pushVisibleGroup(LLSpatialGroup* group)
}
else
{
- pushBack((void**&) mVisibleGroups, mVisibleGroupsAllocated, (void*) group);
+ pushBack(mVisibleGroups, mVisibleGroupsAllocated, group);
}
++mVisibleGroupsSize;
- mVisibleGroupsEnd = mVisibleGroups+mVisibleGroupsSize;
+ mVisibleGroupsEnd = &mVisibleGroups[mVisibleGroupsSize];
}
void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
@@ -4868,10 +4878,10 @@ void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
}
else
{
- pushBack((void**&) mAlphaGroups, mAlphaGroupsAllocated, (void*) group);
+ pushBack(mAlphaGroups, mAlphaGroupsAllocated, group);
}
++mAlphaGroupsSize;
- mAlphaGroupsEnd = mAlphaGroups+mAlphaGroupsSize;
+ mAlphaGroupsEnd = &mAlphaGroups[mAlphaGroupsSize];
}
void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
@@ -4882,10 +4892,10 @@ void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
}
else
{
- pushBack((void**&) mOcclusionGroups, mOcclusionGroupsAllocated, (void*) group);
+ pushBack(mOcclusionGroups, mOcclusionGroupsAllocated, group);
}
++mOcclusionGroupsSize;
- mOcclusionGroupsEnd = mOcclusionGroups+mOcclusionGroupsSize;
+ mOcclusionGroupsEnd = &mOcclusionGroups[mOcclusionGroupsSize];
}
void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
@@ -4896,10 +4906,10 @@ void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
}
else
{
- pushBack((void**&) mDrawableGroups, mDrawableGroupsAllocated, (void*) group);
+ pushBack(mDrawableGroups, mDrawableGroupsAllocated, group);
}
++mDrawableGroupsSize;
- mDrawableGroupsEnd = mDrawableGroups+mDrawableGroupsSize;
+ mDrawableGroupsEnd = &mDrawableGroups[mDrawableGroupsSize];
}
void LLCullResult::pushDrawable(LLDrawable* drawable)
@@ -4910,10 +4920,10 @@ void LLCullResult::pushDrawable(LLDrawable* drawable)
}
else
{
- pushBack((void**&) mVisibleList, mVisibleListAllocated, (void*) drawable);
+ pushBack(mVisibleList, mVisibleListAllocated, drawable);
}
++mVisibleListSize;
- mVisibleListEnd = mVisibleList+mVisibleListSize;
+ mVisibleListEnd = &mVisibleList[mVisibleListSize];
}
void LLCullResult::pushBridge(LLSpatialBridge* bridge)
@@ -4924,10 +4934,10 @@ void LLCullResult::pushBridge(LLSpatialBridge* bridge)
}
else
{
- pushBack((void**&) mVisibleBridge, mVisibleBridgeAllocated, (void*) bridge);
+ pushBack(mVisibleBridge, mVisibleBridgeAllocated, bridge);
}
++mVisibleBridgeSize;
- mVisibleBridgeEnd = mVisibleBridge+mVisibleBridgeSize;
+ mVisibleBridgeEnd = &mVisibleBridge[mVisibleBridgeSize];
}
void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
@@ -4938,10 +4948,10 @@ void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
}
else
{
- pushBack((void**&) mRenderMap[type], mRenderMapAllocated[type], (void*) draw_info);
+ pushBack(mRenderMap[type], mRenderMapAllocated[type], draw_info);
}
++mRenderMapSize[type];
- mRenderMapEnd[type] = mRenderMap[type] + mRenderMapSize[type];
+ mRenderMapEnd[type] = &(mRenderMap[type][mRenderMapSize[type]]);
}
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index f050df2b39..b1706d9d35 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -350,6 +350,8 @@ public:
element_list& getData() { return mOctreeNode->getData(); }
element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
+ bool hasElement(LLDrawable* drawablep) { return std::find(mOctreeNode->getDataBegin(), mOctreeNode->getDataEnd(), drawablep) != mOctreeNode->getDataEnd(); }
+
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
bool isEmpty() const { return mOctreeNode->isEmpty(); }
@@ -567,10 +569,10 @@ class LLCullResult
public:
LLCullResult();
- typedef LLSpatialGroup** sg_list_t;
- typedef LLDrawable** drawable_list_t;
- typedef LLSpatialBridge** bridge_list_t;
- typedef LLDrawInfo** drawinfo_list_t;
+ typedef std::vector<LLSpatialGroup*> sg_list_t;
+ typedef std::vector<LLDrawable*> drawable_list_t;
+ typedef std::vector<LLSpatialBridge*> bridge_list_t;
+ typedef std::vector<LLDrawInfo*> drawinfo_list_t;
typedef LLSpatialGroup** sg_iterator;
typedef LLSpatialBridge** bridge_iterator;
@@ -620,7 +622,7 @@ public:
private:
- void pushBack(void** &head, U32& count, void* val);
+ template <class T, class V> void pushBack(T &head, U32& count, V* val);
U32 mVisibleGroupsSize;
U32 mAlphaGroupsSize;
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 467115c928..ad09af6594 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -510,7 +510,13 @@ void LLTexLayerSetBuffer::doUpload()
BOOL valid = FALSE;
LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C;
S32 file_size = 0;
- U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size);
+
+ //data buffer MUST be allocated using LLImageBase
+ LLVFile file(gVFS, asset_id, LLAssetType::AT_TEXTURE);
+ file_size = file.getSize();
+ U8* data = integrity_test->allocateData(file_size);
+ file.read(data, file_size);
+
if (data)
{
valid = integrity_test->validate(data, file_size); // integrity_test will delete 'data'
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 2c0da60b48..fffe20208f 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -67,6 +67,16 @@ public:
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@@ -143,6 +153,16 @@ public:
LLTexLayerParamColor( LLVOAvatar* avatar );
/* virtual */ ~LLTexLayerParamColor();
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 7adf5212c2..adffb2c706 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2977,7 +2977,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher)
~lcl_responder()
{
+ LL_CHECK_MEMORY
mFetcher->decrCurlPOSTCount();
+ LL_CHECK_MEMORY
}
// virtual
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index c58e1adb8c..db5ad9479c 100755
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -263,8 +263,8 @@ public :
EService mService;
};
- typedef boost::intrusive_ptr<TranslationReceiver> TranslationReceiverPtr;
- typedef boost::intrusive_ptr<KeyVerificationReceiver> KeyVerificationReceiverPtr;
+ typedef LLPointer<TranslationReceiver> TranslationReceiverPtr;
+ typedef LLPointer<KeyVerificationReceiver> KeyVerificationReceiverPtr;
/**
* Translate given text.
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 01a54509ef..d11e7e32c7 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5134,12 +5134,6 @@ class LLEditDelete : public view_listener_t
}
};
-bool enable_object_return()
-{
- return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
- (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
-}
-
void handle_spellcheck_replace_with_suggestion(const LLUICtrl* ctrl, const LLSD& param)
{
const LLContextMenu* menu = dynamic_cast<const LLContextMenu*>(ctrl->getParent());
@@ -5212,6 +5206,12 @@ bool enable_spellcheck_add_to_ignore(const LLUICtrl* ctrl)
return (spellcheck_handler) && (spellcheck_handler->canAddToIgnore());
}
+bool enable_object_return()
+{
+ return (!LLSelectMgr::getInstance()->getSelection()->isEmpty() &&
+ (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER)));
+}
+
bool enable_object_delete()
{
bool new_value =
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 903f4437a7..b048332e59 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3340,9 +3340,9 @@ public :
{
}
- static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args)
+ static ChatTranslationReceiver* build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args)
{
- return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args));
+ return new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args);
}
protected:
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index b2e6dc4571..2fe6cd578b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -237,6 +237,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTimeDilation(1.f),
mRotTime(0.f),
mAngularVelocityRot(),
+ mPreviousRotation(),
mState(0),
mMedia(NULL),
mClickAction(0),
@@ -784,7 +785,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
-
+
if (parentp && mDrawable->isActive())
{
parentp->makeActive();
@@ -1410,9 +1411,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#else
val = (U16 *) &data[count];
#endif
- setAngularVelocity( U16_to_F32(val[VX], -size, size),
+ new_angv.set(U16_to_F32(val[VX], -size, size),
U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size));
+ setAngularVelocity(new_angv);
break;
case 16:
@@ -1436,9 +1438,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
- setAngularVelocity( U8_to_F32(data[13], -size, size),
+ new_angv.set(U8_to_F32(data[13], -size, size),
U8_to_F32(data[14], -size, size),
U8_to_F32(data[15], -size, size) );
+ setAngularVelocity(new_angv);
break;
}
@@ -1510,9 +1513,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackU16(val[VX], "AccX");
dp->unpackU16(val[VY], "AccY");
dp->unpackU16(val[VZ], "AccZ");
- setAngularVelocity( U16_to_F32(val[VX], -64.f, 64.f),
+ new_angv.set(U16_to_F32(val[VX], -64.f, 64.f),
U16_to_F32(val[VY], -64.f, 64.f),
U16_to_F32(val[VZ], -64.f, 64.f));
+ setAngularVelocity(new_angv);
}
break;
case OUT_FULL_COMPRESSED:
@@ -1556,8 +1560,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (value & 0x80)
{
- dp->unpackVector3(vec, "Omega");
- setAngularVelocity(vec);
+ dp->unpackVector3(new_angv, "Omega");
+ setAngularVelocity(new_angv);
}
if (value & 0x20)
@@ -2038,12 +2042,16 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
- if (new_rot != getRotation()
- || new_angv != old_angv)
+ if ((new_rot != getRotation())
+ || (new_angv != old_angv))
+ {
+ if (new_rot != mPreviousRotation)
{
- if (new_angv != old_angv)
+ resetRot();
+ }
+ else if (new_angv != old_angv)
{
- if (flagUsePhysics())
+ if (flagUsePhysics() || new_angv.isExactlyZero())
{
resetRot();
}
@@ -2053,6 +2061,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
}
}
+ // Remember the last rotation value
+ mPreviousRotation = new_rot;
+
// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
setRotation(new_rot * mAngularVelocityRot);
setChanged(ROTATED | SILHOUETTE);
@@ -2159,28 +2170,28 @@ void LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
if (!mDead)
{
- // CRO - don't velocity interp linked objects!
- // Leviathan - but DO velocity interp joints
- if (!mStatic && sVelocityInterpolate && !isSelected())
- {
- // calculate dt from last update
- F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
- F32 dt = mTimeDilation * dt_raw;
+ // CRO - don't velocity interp linked objects!
+ // Leviathan - but DO velocity interp joints
+ if (!mStatic && sVelocityInterpolate && !isSelected())
+ {
+ // calculate dt from last update
+ F32 dt_raw = (F32)(time - mLastInterpUpdateSecs);
+ F32 dt = mTimeDilation * dt_raw;
applyAngularVelocity(dt);
-
+
if (isAttachment())
- {
- mLastInterpUpdateSecs = time;
+ {
+ mLastInterpUpdateSecs = time;
return;
- }
- else
- { // Move object based on it's velocity and rotation
- interpolateLinearMotion(time, dt);
- }
}
+ else
+ { // Move object based on it's velocity and rotation
+ interpolateLinearMotion(time, dt);
+ }
+ }
- updateDrawable(FALSE);
+ updateDrawable(FALSE);
}
}
@@ -4080,7 +4091,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos
return retval;
}
-
+//virtual
void LLViewerObject::changeTEImage(S32 index, LLViewerTexture* new_image)
{
if(index < 0 || index >= getNumTEs())
@@ -5384,9 +5395,9 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
mPhysicsShapeUnknown = false;
if (type != mPhysicsShapeType)
{
- mPhysicsShapeType = type;
- mCostStale = true;
- }
+ mPhysicsShapeType = type;
+ mCostStale = true;
+}
}
void LLViewerObject::setPhysicsGravity(F32 gravity)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 22e0de681e..1fb30db8f2 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -322,7 +322,7 @@ public:
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
/*virtual*/ BOOL setMaterial(const U8 material);
virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
- void changeTEImage(S32 index, LLViewerTexture* new_image) ;
+ virtual void changeTEImage(S32 index, LLViewerTexture* new_image) ;
LLViewerTexture *getTEImage(const U8 te) const;
void fitFaceTexture(const U8 face);
@@ -725,6 +725,7 @@ protected:
F32 mTimeDilation; // Time dilation sent with the object.
F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
LLQuaternion mAngularVelocityRot; // accumulated rotation from the angular velocity computations
+ LLQuaternion mPreviousRotation;
U8 mState; // legacy
LLViewerObjectMedia* mMedia; // NULL if no media associated
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index e399b45cba..3eeab0bf3e 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -1446,8 +1446,11 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp)
}
}
- llassert(objectp->isActive() || objectp->getListIndex() == -1);
+ //post condition: if object is active, it must be on the active list
+ llassert(!active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) != mActiveObjects.end());
+ //post condition: if object is not active, it must not be on the active list
+ llassert(active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) == mActiveObjects.end());
}
void LLViewerObjectList::updateObjectCost(LLViewerObject* object)
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 9936432a71..449a4633ff 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -129,6 +129,7 @@ public:
LLViewerObject *getSelectedObject(const U32 object_id);
inline S32 getNumObjects() { return (S32) mObjects.size(); }
+ inline S32 getNumActiveObjects() { return (S32) mActiveObjects.size(); }
void addToMap(LLViewerObject *objectp);
void removeFromMap(LLViewerObject *objectp);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index effa368b7a..b607afbd9d 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -255,10 +255,9 @@ public:
}
}
- static boost::intrusive_ptr<BaseCapabilitiesComplete> build( U64 region_handle, S32 id )
+ static BaseCapabilitiesComplete* build( U64 region_handle, S32 id )
{
- return boost::intrusive_ptr<BaseCapabilitiesComplete>(
- new BaseCapabilitiesComplete(region_handle, id) );
+ return new BaseCapabilitiesComplete(region_handle, id);
}
private:
@@ -1524,11 +1523,9 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("CopyInventoryFromNotecard");
capabilityNames.append("CreateInventoryCategory");
capabilityNames.append("DispatchRegionInfo");
+ capabilityNames.append("EnvironmentSettings");
capabilityNames.append("EstateChangeInfo");
capabilityNames.append("EventQueueGet");
- capabilityNames.append("EnvironmentSettings");
- capabilityNames.append("ObjectMedia");
- capabilityNames.append("ObjectMediaNavigate");
if (gSavedSettings.getBOOL("UseHTTPInventory"))
{
@@ -1539,10 +1536,11 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
}
capabilityNames.append("GetDisplayNames");
- capabilityNames.append("GetTexture");
capabilityNames.append("GetMesh");
capabilityNames.append("GetObjectCost");
capabilityNames.append("GetObjectPhysicsData");
+ capabilityNames.append("GetTexture");
+ capabilityNames.append("GroupMemberData");
capabilityNames.append("GroupProposalBallot");
capabilityNames.append("HomeLocation");
capabilityNames.append("LandResources");
@@ -1551,9 +1549,10 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("MeshUploadFlag");
capabilityNames.append("NavMeshGenerationStatus");
capabilityNames.append("NewFileAgentInventory");
+ capabilityNames.append("ObjectMedia");
+ capabilityNames.append("ObjectMediaNavigate");
capabilityNames.append("ObjectNavMeshProperties");
capabilityNames.append("ParcelPropertiesUpdate");
- capabilityNames.append("ParcelNavigateMedia");
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ProductInfoRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
@@ -1567,10 +1566,9 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("SendUserReport");
capabilityNames.append("SendUserReportWithScreenshot");
capabilityNames.append("ServerReleaseNotes");
- capabilityNames.append("SimConsole");
- capabilityNames.append("SimulatorFeatures");
capabilityNames.append("SetDisplayName");
capabilityNames.append("SimConsoleAsync");
+ capabilityNames.append("SimulatorFeatures");
capabilityNames.append("StartGroupProposal");
capabilityNames.append("TerrainNavMeshProperties");
capabilityNames.append("TextureStats");
@@ -1578,10 +1576,10 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("UpdateAgentInformation");
capabilityNames.append("UpdateAgentLanguage");
capabilityNames.append("UpdateGestureAgentInventory");
- capabilityNames.append("UpdateNotecardAgentInventory");
- capabilityNames.append("UpdateScriptAgent");
capabilityNames.append("UpdateGestureTaskInventory");
+ capabilityNames.append("UpdateNotecardAgentInventory");
capabilityNames.append("UpdateNotecardTaskInventory");
+ capabilityNames.append("UpdateScriptAgent");
capabilityNames.append("UpdateScriptTask");
capabilityNames.append("UploadBakedTexture");
capabilityNames.append("ViewerMetrics");
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 1798d554b9..c3af0f6a51 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -563,6 +563,9 @@ public:
addText(xpos, ypos, llformat("%d Render Calls", gPipeline.mBatchCount));
ypos += y_inc;
+ addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects()));
+ ypos += y_inc;
+
addText(xpos, ypos, llformat("%d Matrix Ops", gPipeline.mMatrixOpCount));
ypos += y_inc;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9c36cfee59..e99898a83c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1803,6 +1803,18 @@ void LLVOVolume::setNumTEs(const U8 num_tes)
return ;
}
+//virtual
+void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep)
+{
+ BOOL changed = (mTEImages[index] != imagep);
+ LLViewerObject::changeTEImage(index, imagep);
+ if (changed)
+ {
+ gPipeline.markTextured(mDrawable);
+ mFaceMappingChanged = TRUE;
+ }
+}
+
void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep)
{
BOOL changed = (mTEImages[te] != imagep);
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 0082f2e991..5482c80f2b 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -173,6 +173,7 @@ public:
/*virtual*/ void setScale(const LLVector3 &scale, BOOL damped);
+ /*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) ;
/*virtual*/ void setNumTEs(const U8 num_tes);
/*virtual*/ void setTEImage(const U8 te, LLViewerTexture *imagep);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 920bac93a2..678898797f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -706,6 +706,8 @@ void LLPipeline::cleanup()
mInitialized = FALSE;
mDeferredVB = NULL;
+
+ mCubeVB = NULL;
}
//============================================================================
@@ -2328,7 +2330,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
bound_shader = true;
gOcclusionCubeProgram.bind();
}
-
+
if (sUseOcclusion > 1)
{
if (mCubeVB.isNull())
@@ -2506,7 +2508,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
{
gOcclusionCubeProgram.bind();
}
- }
+ }
if (mCubeVB.isNull())
{ //cube VB will be used for issuing occlusion queries
@@ -2563,11 +2565,6 @@ void LLPipeline::updateGL()
glu->mInQ = FALSE;
LLGLUpdate::sGLQ.pop_front();
}
-
- { //seed VBO Pools
- LLFastTimer t(FTM_SEED_VBO_POOLS);
- LLVertexBuffer::seedPools();
- }
}
{ //seed VBO Pools
@@ -3376,11 +3373,11 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderPhysicalBeacons(LLDrawable* drawablep)
{
@@ -3405,11 +3402,11 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderMOAPBeacons(LLDrawable* drawablep)
{
@@ -3445,11 +3442,11 @@ void renderMOAPBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderParticleBeacons(LLDrawable* drawablep)
{
@@ -3474,11 +3471,11 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void renderSoundHighlights(LLDrawable* drawablep)
{
@@ -3496,11 +3493,11 @@ void renderSoundHighlights(LLDrawable* drawablep)
if (facep)
{
gPipeline.mHighlightFaces.push_back(facep);
- }
}
}
}
}
+}
void LLPipeline::postSort(LLCamera& camera)
{
@@ -3713,7 +3710,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (facep)
{
gPipeline.mSelectedFaces.push_back(facep);
- }
+ }
}
return true;
}
diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp
index 10e37fae97..fd9527d631 100644
--- a/indra/newview/tests/lltranslate_test.cpp
+++ b/indra/newview/tests/lltranslate_test.cpp
@@ -299,11 +299,6 @@ LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLCo
std::string LLControlGroup::getString(const std::string& name) { return "dummy"; }
LLControlGroup::~LLControlGroup() {}
-namespace boost {
- void intrusive_ptr_add_ref(LLCurl::Responder*) {}
- void intrusive_ptr_release(LLCurl::Responder*) {}
-}
-
LLCurl::Responder::Responder() {}
void LLCurl::Responder::completedHeader(U32, std::string const&, LLSD const&) {}
void LLCurl::Responder::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t& buffer) {}
@@ -314,7 +309,7 @@ void LLCurl::Responder::result(LLSD const&) {}
LLCurl::Responder::~Responder() {}
void LLHTTPClient::get(const std::string&, const LLSD&, ResponderPtr, const LLSD&, const F32) {}
-void LLHTTPClient::get(const std::string&, boost::intrusive_ptr<LLCurl::Responder>, const LLSD&, const F32) {}
+void LLHTTPClient::get(const std::string&, LLPointer<LLCurl::Responder>, const LLSD&, const F32) {}
LLBufferStream::LLBufferStream(const LLChannelDescriptors& channels, LLBufferArray* buffer)
: std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) {}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 3c3aba23f8..b962b6b044 100644
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -28,6 +28,7 @@ $/LicenseInfo$
"""
import sys
import os.path
+import errno
import re
import tarfile
import time
@@ -74,20 +75,20 @@ class ViewerManifest(LLManifest):
# include the list of Lindens (if any)
# see https://wiki.lindenlab.com/wiki/Generated_Linden_Credits
linden_names_path = os.getenv("LINDEN_CREDITS")
- if linden_names_path :
+ if not linden_names_path :
+ print "No 'LINDEN_CREDITS' specified in environment, using built-in list"
+ else:
try:
linden_file = open(linden_names_path,'r')
+ except IOError:
+ print "No Linden names found at '%s', using built-in list" % linden_names_path
+ else:
# all names should be one line, but the join below also converts to a string
linden_names = ', '.join(linden_file.readlines())
self.put_in_file(linden_names, "lindens.txt")
linden_file.close()
print "Linden names extracted from '%s'" % linden_names_path
self.file_list.append([linden_names_path,self.dst_path_of("lindens.txt")])
- except IOError:
- print "No Linden names found at '%s', using built-in list" % linden_names_path
- pass
- else :
- print "No 'LINDEN_CREDITS' specified in environment, using built-in list"
# ... and the entire windlight directory
self.path("windlight")
@@ -149,14 +150,9 @@ class ViewerManifest(LLManifest):
self.path("gpu_table.txt")
# The summary.json file gets left in the base checkout dir by
- # build.sh. It's only created for a build.sh build, therefore we
- # have to check whether it exists. :-P
- summary_json = "summary.json"
- summary_json_path = os.path.join(os.pardir, os.pardir, summary_json)
- if os.path.exists(os.path.join(self.get_src_prefix(), summary_json_path)):
- self.path(summary_json_path, summary_json)
- else:
- print "No %s" % os.path.join(self.get_src_prefix(), summary_json_path)
+ # build.sh. It's only created for a build.sh build.
+ if not self.path2basename(os.path.join(os.pardir, os.pardir), "summary.json"):
+ print "No summary.json file"
def login_channel(self):
"""Channel reported for login and upgrade purposes ONLY;
@@ -327,13 +323,13 @@ class WindowsManifest(ViewerManifest):
self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe())
# Plugin host application
- self.path(os.path.join(os.pardir,
- 'llplugin', 'slplugin', self.args['configuration'], "slplugin.exe"),
- "slplugin.exe")
+ self.path2basename(os.path.join(os.pardir,
+ 'llplugin', 'slplugin', self.args['configuration']),
+ "slplugin.exe")
#self.disable_manifest_check()
- self.path(src="../viewer_components/updater/scripts/windows/update_install.bat", dst="update_install.bat")
+ self.path2basename("../viewer_components/updater/scripts/windows", "update_install.bat")
# Get shared libs from the shared libs staging directory
if self.prefix(src=os.path.join(os.pardir, 'sharedlibs', self.args['configuration']),
dst=""):
@@ -367,9 +363,7 @@ class WindowsManifest(ViewerManifest):
# Get fmod dll, continue if missing
- try:
- self.path("fmod.dll")
- except:
+ if not self.path("fmod.dll"):
print "Skipping fmod.dll"
# For textures
@@ -537,6 +531,7 @@ class WindowsManifest(ViewerManifest):
result += 'File ' + pkg_file + '\n'
else:
result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n'
+
# at the end of a delete, just rmdir all the directories
if not install:
deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list]
@@ -710,85 +705,82 @@ class DarwinManifest(ViewerManifest):
self.path("uk.lproj")
self.path("zh-Hans.lproj")
- libdir = "../packages/lib/release"
- dylibs = {}
+ def path_optional(src, dst):
+ """
+ For a number of our self.path() calls, not only do we want
+ to deal with the absence of src, we also want to remember
+ which were present. Return either an empty list (absent)
+ or a list containing dst (present). Concatenate these
+ return values to get a list of all libs that are present.
+ """
+ if self.path(src, dst):
+ return [dst]
+ print "Skipping %s" % dst
+ return []
- # Need to get the llcommon dll from any of the build directories as well
- lib = "llcommon"
- libfile = "lib%s.dylib" % lib
- try:
- self.path(self.find_existing_file(os.path.join(os.pardir,
- lib,
- self.args['configuration'],
- libfile),
- os.path.join(libdir, libfile)),
- dst=libfile)
- except RuntimeError:
- print "Skipping %s" % libfile
- dylibs[lib] = False
- else:
- dylibs[lib] = True
-
- if dylibs["llcommon"]:
- for libfile in ("libapr-1.0.dylib",
- "libaprutil-1.0.dylib",
- "libexpat.1.5.2.dylib",
- "libexception_handler.dylib",
- "libGLOD.dylib",
- "libcollada14dom.dylib"
- ):
- self.path(os.path.join(libdir, libfile), libfile)
-
- # SLVoice and vivox lols
- for libfile in ('libsndfile.dylib', 'libvivoxoal.dylib', 'libortp.dylib', \
- 'libvivoxsdk.dylib', 'libvivoxplatform.dylib', 'SLVoice') :
- self.path(os.path.join(libdir, libfile), libfile)
+ libdir = "../packages/lib/release"
+ # dylibs is a list of all the .dylib files we expect to need
+ # in our bundled sub-apps. For each of these we'll create a
+ # symlink from sub-app/Contents/Resources to the real .dylib.
+ # Need to get the llcommon dll from any of the build directories as well.
+ libfile = "libllcommon.dylib"
+ dylibs = path_optional(self.find_existing_file(os.path.join(os.pardir,
+ "llcommon",
+ self.args['configuration'],
+ libfile),
+ os.path.join(libdir, libfile)),
+ dst=libfile)
+
+ for libfile in (
+ "libapr-1.0.dylib",
+ "libaprutil-1.0.dylib",
+ "libcollada14dom.dylib",
+ "libexpat.1.5.2.dylib",
+ "libexception_handler.dylib",
+ "libGLOD.dylib",
+ ):
+ dylibs += path_optional(os.path.join(libdir, libfile), libfile)
+
+ # SLVoice and vivox lols, no symlinks needed
+ for libfile in (
+ 'libortp.dylib',
+ 'libsndfile.dylib',
+ 'libvivoxoal.dylib',
+ 'libvivoxsdk.dylib',
+ 'libvivoxplatform.dylib',
+ 'SLVoice',
+ ):
+ self.path2basename(libdir, libfile)
- try:
- # FMOD for sound
- self.path(self.args['configuration'] + "/libfmodwrapper.dylib", "libfmodwrapper.dylib")
- except:
- print "Skipping FMOD - not found"
+ # FMOD for sound
+ libfile = "libfmodwrapper.dylib"
+ path_optional(os.path.join(self.args['configuration'], libfile), libfile)
# our apps
- self.path("../mac_crash_logger/" + self.args['configuration'] + "/mac-crash-logger.app", "mac-crash-logger.app")
- self.path("../mac_updater/" + self.args['configuration'] + "/mac-updater.app", "mac-updater.app")
-
- # plugin launcher
- self.path("../llplugin/slplugin/" + self.args['configuration'] + "/SLPlugin.app", "SLPlugin.app")
-
- # our apps dependencies on shared libs
- if dylibs["llcommon"]:
- mac_crash_logger_res_path = self.dst_path_of("mac-crash-logger.app/Contents/Resources")
- mac_updater_res_path = self.dst_path_of("mac-updater.app/Contents/Resources")
- slplugin_res_path = self.dst_path_of("SLPlugin.app/Contents/Resources")
- for libfile in ("libllcommon.dylib",
- "libapr-1.0.dylib",
- "libaprutil-1.0.dylib",
- "libexpat.1.5.2.dylib",
- "libexception_handler.dylib",
- "libGLOD.dylib",
- "libcollada14dom.dylib"
- ):
- target_lib = os.path.join('../../..', libfile)
- self.run_command("ln -sf %(target)r %(link)r" %
- {'target': target_lib,
- 'link' : os.path.join(mac_crash_logger_res_path, libfile)}
- )
- self.run_command("ln -sf %(target)r %(link)r" %
- {'target': target_lib,
- 'link' : os.path.join(mac_updater_res_path, libfile)}
- )
- self.run_command("ln -sf %(target)r %(link)r" %
- {'target': target_lib,
- 'link' : os.path.join(slplugin_res_path, libfile)}
- )
+ for app_bld_dir, app in (("mac_crash_logger", "mac-crash-logger.app"),
+ ("mac_updater", "mac-updater.app"),
+ # plugin launcher
+ (os.path.join("llplugin", "slplugin"), "SLPlugin.app"),
+ ):
+ self.path2basename(os.path.join(os.pardir,
+ app_bld_dir, self.args['configuration']),
+ app)
+
+ # our apps dependencies on shared libs
+ # for each app, for each dylib we collected in dylibs,
+ # create a symlink to the real copy of the dylib.
+ resource_path = self.dst_path_of(os.path.join(app, "Contents", "Resources"))
+ for libfile in dylibs:
+ symlinkf(os.path.join(os.pardir, os.pardir, os.pardir, libfile),
+ os.path.join(resource_path, libfile))
# plugins
if self.prefix(src="", dst="llplugin"):
- self.path("../media_plugins/quicktime/" + self.args['configuration'] + "/media_plugin_quicktime.dylib", "media_plugin_quicktime.dylib")
- self.path("../media_plugins/webkit/" + self.args['configuration'] + "/media_plugin_webkit.dylib", "media_plugin_webkit.dylib")
- self.path("../packages/lib/release/libllqtwebkit.dylib", "libllqtwebkit.dylib")
+ self.path2basename("../media_plugins/quicktime/" + self.args['configuration'],
+ "media_plugin_quicktime.dylib")
+ self.path2basename("../media_plugins/webkit/" + self.args['configuration'],
+ "media_plugin_webkit.dylib")
+ self.path2basename("../packages/lib/release", "libllqtwebkit.dylib")
self.end_prefix("llplugin")
@@ -955,20 +947,25 @@ class LinuxManifest(ViewerManifest):
self.path("client-readme-voice.txt","README-linux-voice.txt")
self.path("client-readme-joystick.txt","README-linux-joystick.txt")
self.path("wrapper.sh","secondlife")
- self.path("handle_secondlifeprotocol.sh", "etc/handle_secondlifeprotocol.sh")
- self.path("register_secondlifeprotocol.sh", "etc/register_secondlifeprotocol.sh")
- self.path("refresh_desktop_app_entry.sh", "etc/refresh_desktop_app_entry.sh")
- self.path("launch_url.sh","etc/launch_url.sh")
+ if self.prefix(src="", dst="etc"):
+ self.path("handle_secondlifeprotocol.sh")
+ self.path("register_secondlifeprotocol.sh")
+ self.path("refresh_desktop_app_entry.sh")
+ self.path("launch_url.sh")
+ self.end_prefix("etc")
self.path("install.sh")
self.end_prefix("linux_tools")
# Create an appropriate gridargs.dat for this package, denoting required grid.
self.put_in_file(self.flags_list(), 'etc/gridargs.dat')
- self.path("secondlife-bin","bin/do-not-directly-run-secondlife-bin")
- self.path("../linux_crash_logger/linux-crash-logger","bin/linux-crash-logger.bin")
- self.path("../linux_updater/linux-updater", "bin/linux-updater.bin")
- self.path("../llplugin/slplugin/SLPlugin", "bin/SLPlugin")
+ if self.prefix(src="", dst="bin"):
+ self.path("secondlife-bin","do-not-directly-run-secondlife-bin")
+ self.path("../linux_crash_logger/linux-crash-logger","linux-crash-logger.bin")
+ self.path("../linux_updater/linux-updater", "linux-updater.bin")
+ self.path2basename("../llplugin/slplugin", "SLPlugin")
+ self.path2basename("../viewer_components/updater/scripts/linux", "update_install")
+ self.end_prefix("bin")
if self.prefix("res-sdl"):
self.path("*")
@@ -984,17 +981,13 @@ class LinuxManifest(ViewerManifest):
self.end_prefix("res-sdl")
self.end_prefix(icon_path)
- self.path("../viewer_components/updater/scripts/linux/update_install", "bin/update_install")
-
# plugins
if self.prefix(src="", dst="bin/llplugin"):
- self.path("../media_plugins/webkit/libmedia_plugin_webkit.so", "libmedia_plugin_webkit.so")
+ self.path2basename("../media_plugins/webkit", "libmedia_plugin_webkit.so")
self.path("../media_plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
self.end_prefix("bin/llplugin")
- try:
- self.path("../llcommon/libllcommon.so", "lib/libllcommon.so")
- except:
+ if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"):
print "Skipping llcommon.so (assuming llcommon was linked statically)"
self.path("featuretable_linux.txt")
@@ -1078,15 +1071,11 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libopenjpeg.so*")
self.path("libdirectfb-1.4.so.5")
self.path("libfusion-1.4.so.5")
- self.path("libdirect-1.4.so.5.0.4")
- self.path("libdirect-1.4.so.5")
- self.path("libhunspell-1.3.so")
- self.path("libhunspell-1.3.so.0")
- self.path("libhunspell-1.3.so.0.0.0")
+ self.path("libdirect-1.4.so.5*")
+ self.path("libhunspell-1.3.so*")
self.path("libalut.so")
self.path("libopenal.so", "libopenal.so.1")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname
-
# KLUDGE: As of 2012-04-11, the 'fontconfig' package installs
# libfontconfig.so.1.4.4, along with symlinks libfontconfig.so.1
# and libfontconfig.so. Before we added support for library-file
@@ -1105,7 +1094,13 @@ class Linux_i686Manifest(LinuxManifest):
# previous call did, without having to explicitly state the
# version number.
self.path("libfontconfig.so.*.*")
- self.path("libtcmalloc.so*") #formerly called google perf tools
+ try:
+ self.path("libtcmalloc.so*") #formerly called google perf tools
+ pass
+ except:
+ print "tcmalloc files not found, skipping"
+ pass
+
try:
self.path("libfmod-3.75.so")
pass
@@ -1140,5 +1135,25 @@ class Linux_x86_64Manifest(LinuxManifest):
################################################################
+def symlinkf(src, dst):
+ """
+ Like ln -sf, but uses os.symlink() instead of running ln.
+ """
+ try:
+ os.symlink(src, dst)
+ except OSError, err:
+ if err.errno != errno.EEXIST:
+ raise
+ # We could just blithely attempt to remove and recreate the target
+ # file, but that strategy doesn't work so well if we don't have
+ # permissions to remove it. Check to see if it's already the
+ # symlink we want, which is the usual reason for EEXIST.
+ if not (os.path.islink(dst) and os.readlink(dst) == src):
+ # Here either dst isn't a symlink or it's the wrong symlink.
+ # Remove and recreate. Caller will just have to deal with any
+ # exceptions at this stage.
+ os.remove(dst)
+ os.symlink(src, dst)
+
if __name__ == "__main__":
main()