diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index eced9783a..ac7f09594 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -336,4 +336,6 @@ MARK_AS_ADVANCED(
CMAKE_SHARED_LINKER_FLAGS_RELEASE
)
+include(GooglePerfTools)
+
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake
index 3ad669c94..d92c39ded 100644
--- a/indra/cmake/GooglePerfTools.cmake
+++ b/indra/cmake/GooglePerfTools.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+
include(Prebuilt)
if(WORD_SIZE EQUAL 64)
@@ -47,9 +48,14 @@ else (USE_GOOGLE_PERFTOOLS)
endif (USE_GOOGLE_PERFTOOLS)
if (NOT(DISABLE_TCMALLOC OR USE_GOOGLE_PERFTOOLS OR STANDALONE))
- message(STATUS "Building with Google TCMalloc")
- set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
- include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
- set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES})
+ if (NOT STATUS_Building_with_Google_TCMalloc)
+ message(STATUS "Building with Google TCMalloc")
+ set(STATUS_Building_with_Google_TCMalloc true PARENT_SCOPE)
+ endif (NOT STATUS_Building_with_Google_TCMalloc)
+ set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1)
+ include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR})
+ set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES})
set(GOOGLE_PERFTOOLS_LINKER_FLAGS ${TCMALLOC_LINKER_FLAGS})
endif()
+
+add_definitions(${TCMALLOC_FLAG})
\ No newline at end of file
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp
index 984e63ca9..4b4108701 100644
--- a/indra/llaudio/llaudioengine_fmodex.cpp
+++ b/indra/llaudio/llaudioengine_fmodex.cpp
@@ -152,8 +152,8 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
<< ")! You should be using FMOD Ex" << FMOD_VERSION << LL_ENDL;
}
- result = mSystem->setSoftwareFormat(44100, FMOD_SOUND_FORMAT_PCM16, 0, 0, FMOD_DSP_RESAMPLER_LINEAR);
- Check_FMOD_Error(result,"FMOD::System::setSoftwareFormat");
+// result = mSystem->setSoftwareFormat(44100, FMOD_SOUND_FORMAT_PCM16, 0, 0, FMOD_DSP_RESAMPLER_LINEAR);
+// Check_FMOD_Error(result,"FMOD::System::setSoftwareFormat");
// In this case, all sounds, PLUS wind and stream will be software.
result = mSystem->setSoftwareChannels(num_channels + 2);
diff --git a/indra/llaudio/llstreamingaudio_fmodex.cpp b/indra/llaudio/llstreamingaudio_fmodex.cpp
index 2f7bdf6bd..6f6973209 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.cpp
+++ b/indra/llaudio/llstreamingaudio_fmodex.cpp
@@ -405,7 +405,7 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
exinfo.cbsize = sizeof(exinfo);
exinfo.suggestedsoundtype = FMOD_SOUND_TYPE_OGGVORBIS; //Hint to speed up loading.*/
- FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_MPEGSEARCH | FMOD_IGNORETAGS, 0, &mInternetStream);
+ FMOD_RESULT result = mSystem->createStream(url.c_str(), FMOD_2D | FMOD_NONBLOCKING | FMOD_IGNORETAGS, 0, &mInternetStream);
if (result!= FMOD_OK)
{
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 6d2bb8f13..12eb04932 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -95,7 +95,19 @@ public:
namespace
{
#if LL_WINDOWS
-typedef std::filebuf _Myfb;
+//typedef std::filebuf _Myfb;
+//Singu note: Wrap around std::filebuf to override the open procedure.
+// The client encodes filepaths in UTF-8, however Windows uses UTF-16 encoding natively.
+// Need to convert paths to UTF-16 before calling std::filebuf::open.
+struct _Myfb : public std::filebuf
+{
+ _Myfb() : std::filebuf() {}
+ _Myfb(_Filet* file) : std::filebuf(file) {}
+ _Myt *open(const char *filename, std::ios_base::openmode mode, int prot = (int)std::ios_base::_Openprot)
+ {
+ return std::filebuf::open(utf8str_to_utf16str(filename).c_str(),mode,prot);
+ }
+};
#else
typedef __gnu_cxx::stdio_filebuf< char > _Myfb;
typedef std::__c_file _Filet;
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h
index 8a0e0e66d..0762dc3f4 100644
--- a/indra/llcommon/llmemory.h
+++ b/indra/llcommon/llmemory.h
@@ -57,13 +57,12 @@ inline void ll_aligned_free( void* ptr )
free( ((void**)ptr)[-1] );
}
-#if !LL_USE_TCMALLOC
inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed with ll_aligned_free_16().
{
-#if defined(LL_WINDOWS)
- return _aligned_malloc(size, 16);
-#elif defined(LL_DARWIN)
+#if (LL_DARWIN || LL_USE_TCMALLOC)
return malloc(size); // default osx malloc is 16 byte aligned.
+#elif LL_WINDOWS
+ return _aligned_malloc(size, 16);
#else
void *rtn;
if (LL_LIKELY(0 == posix_memalign(&rtn, 16, size)))
@@ -75,10 +74,10 @@ inline void* ll_aligned_malloc_16(size_t size) // returned hunk MUST be freed wi
inline void ll_aligned_free_16(void *p)
{
-#if defined(LL_WINDOWS)
+#if (LL_DARWIN || LL_USE_TCMALLOC)
+ free(p);
+#elif LL_WINDOWS
_aligned_free(p);
-#elif defined(LL_DARWIN)
- return free(p);
#else
free(p); // posix_memalign() is compatible with heap deallocator
#endif
@@ -86,10 +85,10 @@ inline void ll_aligned_free_16(void *p)
inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // returned hunk MUST be freed with ll_aligned_free_16().
{
-#if defined(LL_WINDOWS)
- return _aligned_realloc(ptr, size, 16);
-#elif defined(LL_DARWIN)
+#if (LL_DARWIN || LL_USE_TCMALLOC)
return realloc(ptr,size); // default osx malloc is 16 byte aligned.
+#elif LL_WINDOWS
+ return _aligned_realloc(ptr, size, 16);
#else
//FIXME: memcpy is SLOW
void* ret = ll_aligned_malloc_16(size);
@@ -106,18 +105,11 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r
#endif
}
-#else // USE_TCMALLOC
-// ll_aligned_foo_16 are not needed with tcmalloc
-#define ll_aligned_malloc_16 malloc
-#define ll_aligned_realloc_16(a,b,c) realloc(a,b)
-#define ll_aligned_free_16 free
-#endif // USE_TCMALLOC
-
inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed with ll_aligned_free_32().
{
-#if defined(LL_WINDOWS)
+#if LL_WINDOWS
return _aligned_malloc(size, 32);
-#elif defined(LL_DARWIN)
+#elif LL_DARWIN
return ll_aligned_malloc( size, 32 );
#else
void *rtn;
@@ -130,9 +122,9 @@ inline void* ll_aligned_malloc_32(size_t size) // returned hunk MUST be freed wi
inline void ll_aligned_free_32(void *p)
{
-#if defined(LL_WINDOWS)
+#if LL_WINDOWS
_aligned_free(p);
-#elif defined(LL_DARWIN)
+#elif LL_DARWIN
ll_aligned_free( p );
#else
free(p); // posix_memalign() is compatible with heap deallocator
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 4ddc58d18..8a2b6d0b5 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -486,14 +486,10 @@ LLThreadSafeRefCount::LLThreadSafeRefCount() :
LLThreadSafeRefCount::~LLThreadSafeRefCount()
{
- llassert(mRef == 0);
- /* TEMPORARILY disable erroring out on deleting this object with
- nonzero reference count until the problem in AIStateMachine is fixed
if (mRef != 0)
{
llerrs << "deleting non-zero reference" << llendl;
}
- */
}
//============================================================================
diff --git a/indra/llcommon/llversionviewer.h.in b/indra/llcommon/llversionviewer.h.in
index 030623505..e1fa1cab3 100644
--- a/indra/llcommon/llversionviewer.h.in
+++ b/indra/llcommon/llversionviewer.h.in
@@ -34,8 +34,8 @@
#define LL_LLVERSIONVIEWER_H
const S32 LL_VERSION_MAJOR = 1;
-const S32 LL_VERSION_MINOR = 7;
-const S32 LL_VERSION_PATCH = 3;
+const S32 LL_VERSION_MINOR = 8;
+const S32 LL_VERSION_PATCH = 0;
const S32 LL_VERSION_BUILD = ${vBUILD};
const char * const LL_CHANNEL = "${VIEWER_CHANNEL}";
diff --git a/indra/llmessage/aicurlperservice.cpp b/indra/llmessage/aicurlperservice.cpp
index de7c16859..e50dac4c9 100644
--- a/indra/llmessage/aicurlperservice.cpp
+++ b/indra/llmessage/aicurlperservice.cpp
@@ -111,7 +111,7 @@ std::string AIPerServiceRequestQueue::extract_canonical_servicename(std::string
int c = *p;
if (c == ':')
{
- if (!port_colon && std::isdigit(p[1]))
+ if (!port_colon && LLStringOps::isDigit(p[1]))
{
port_colon = p;
}
diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp
index b624daf61..a586ece81 100644
--- a/indra/llmessage/aicurlthread.cpp
+++ b/indra/llmessage/aicurlthread.cpp
@@ -2159,7 +2159,7 @@ size_t BufferedCurlEasyRequest::curlHeaderCallback(char* data, size_t size, size
std::string::iterator pos3 = std::find(pos2, end, '\r');
U32 status = 0;
std::string reason;
- if (pos3 != end && std::isdigit(*pos1))
+ if (pos3 != end && LLStringOps::isDigit(*pos1))
{
status = atoi(&header_line[pos1 - begin]);
reason.assign(pos2, pos3);
@@ -2576,7 +2576,7 @@ bool AIPerServiceRequestQueue::wantsMoreHTTPRequestsFor(AIPerServiceRequestQueue
sQueueEmpty = sQueueFull = false;
if (decrement_threshold)
{
- if (max_pipelined_requests_cache > curl_max_total_concurrent_connections)
+ if (max_pipelined_requests_cache > (S32)curl_max_total_concurrent_connections)
{
// Decrement the threshold because since the last call to this function at least one curl request finished
// and was replaced with another request from the queue, but the queue never ran empty: we have too many
@@ -2601,14 +2601,14 @@ bool AIPerServiceRequestQueue::wantsMoreHTTPRequestsFor(AIPerServiceRequestQueue
}
if (decrement_threshold)
{
- if (max_pipelined_requests_per_service_cache > curl_concurrent_connections_per_service)
+ if (max_pipelined_requests_per_service_cache > (S32)curl_concurrent_connections_per_service)
{
--max_pipelined_requests_per_service;
}
}
else if (increment_threshold && reject)
{
- if (max_pipelined_requests_per_service_cache < 2 * curl_concurrent_connections_per_service)
+ if (max_pipelined_requests_per_service_cache < 2 * (S32)curl_concurrent_connections_per_service)
{
max_pipelined_requests_per_service++;
// Immediately take the new threshold into account.
@@ -2648,7 +2648,7 @@ bool AIPerServiceRequestQueue::wantsMoreHTTPRequestsFor(AIPerServiceRequestQueue
}
if (increment_threshold && reject)
{
- if (max_pipelined_requests_cache < 2 * curl_max_total_concurrent_connections)
+ if (max_pipelined_requests_cache < 2 * (S32)curl_max_total_concurrent_connections)
{
max_pipelined_requests++;
// Immediately take the new threshold into account.
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index e377434b1..381782ed6 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -6,7 +6,6 @@ include(LLPlugin)
include(Linking)
include(PluginAPI)
include(LLMessage)
-include(GooglePerfTools)
include_directories(
${LLPLUGIN_INCLUDE_DIRS}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 1cfb4635a..421f03efa 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -219,10 +219,6 @@ public:
virtual void saveAs() {}
virtual void saveAsType(BOOL type=false) {}
- //
- virtual LLUUID getItemID() { return LLUUID::null; }
- //
-
void setSnapTarget(LLHandle handle) { mSnappedTo = handle; }
void clearSnapTarget() { mSnappedTo.markDead(); }
LLHandle getSnapTarget() const { return mSnappedTo; }
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c5dcff371..fe5a4c03d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -38,7 +38,6 @@ include(LLXML)
#include(LScript)
include(Linking)
include(NDOF)
-include(GooglePerfTools)
include(StateMachine)
include(TemplateCheck)
include(UI)
@@ -90,6 +89,7 @@ set(viewer_SOURCE_FILES
floaterao.cpp
floaterlocalassetbrowse.cpp
floatervoicelicense.cpp
+ generichandlers.cpp
hbfloatergrouptitles.cpp
hippofloaterxml.cpp
hippogridmanager.cpp
@@ -591,6 +591,7 @@ set(viewer_HEADER_FILES
floaterao.h
floaterlocalassetbrowse.h
floatervoicelicense.h
+ generichandlers.h
hbfloatergrouptitles.h
hippofloaterxml.h
hippogridmanager.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f8e7203b1..7cefb59c6 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -693,6 +693,17 @@ Found in Advanced->Rendering->Info Displays
Value
0
+ FakeAway
+
InstantMessageLogPathAnyAccount
+ ClickActionBuyEnabled
+
+ ClickActionPayEnabled
+
DoubleClickAutoPilot
+ DragAndDropDistanceThreshold
+
DropShadowButton
+ EnableGrab
+
EnableGestureSounds
+ DisableClickSitOtherOwner
+
PlayIMSound
+ ClickToWalk
+
SimulateFBOFailure