diff options
40 files changed, 295 insertions, 280 deletions
| diff --git a/autobuild.xml b/autobuild.xml index 0f71472d1f..803e479078 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3128,9 +3128,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <key>archive</key>              <map>                <key>hash</key> -              <string>c5ab9d9d7482e48cd76f4bf391900a8c</string> +              <string>5ba21b80695975ab1e1b1c79d0f10c10</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/43369/385585/viewer_manager-2.0.531000-darwin64-531000.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55879/522561/viewer_manager-2.0.539630-darwin64-539630.tar.bz2</string>              </map>              <key>name</key>              <string>darwin64</string> @@ -3152,9 +3152,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <key>archive</key>              <map>                <key>hash</key> -              <string>6b10d7407686d9e12e63576256581e3e</string> +              <string>0f788eb745fc062ad737824836e48691</string>                <key>url</key> -              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/43370/385592/viewer_manager-2.0.531000-windows-531000.tar.bz2</string> +              <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55880/522567/viewer_manager-2.0.539630-windows-539630.tar.bz2</string>              </map>              <key>name</key>              <string>windows</string> @@ -3165,7 +3165,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>          <key>source_type</key>          <string>hg</string>          <key>version</key> -        <string>2.0.531000</string> +        <string>2.0.539630</string>        </map>        <key>vlc-bin</key>        <map> diff --git a/doc/contributions.txt b/doc/contributions.txt index 7bbbf6430a..8047c7cbe0 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -1086,6 +1086,7 @@ Nicky Dasmijn  	SL-10293  	SL-11061      SL-11072 +	SL-13141  Nicky Perian  	OPEN-1  	STORM-1087 diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 29f0c7da9a..984e90f376 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -242,6 +242,64 @@ void _ll_apr_assert_status(apr_status_t status, const char* file, int line)  //---------------------------------------------------------------------  // +// Scope based pool access +// +//--------------------------------------------------------------------- + +class LLAPRFilePoolScope +{ +public: +    LLAPRFilePoolScope() : pPool(NULL), mInitialized(false) {} +    LLAPRFilePoolScope(LLVolatileAPRPool* poolp) : mInitialized(false) +    {  +        setFilePool(poolp); +    } +    ~LLAPRFilePoolScope() +    { +        reset(); +    } +    apr_pool_t* getVolatileAPRPool(LLVolatileAPRPool* poolp = NULL) +    { +        if (!pPool) +        { +            setFilePool(poolp); +        } +        if (mInitialized) +        { +            // We need one clear per one get +            // At the moment no need to support multiple calls +            LL_ERRS() << "LLAPRFilePoolScope is not supposed to be initialized twice" << LL_ENDL; +        } +        mInitialized = true; +        return pPool->getVolatileAPRPool(); +    } +    void reset() +    { +        if (mInitialized) +        { +            pPool->clearVolatileAPRPool(); +        } +    } + +private: +    void setFilePool(LLVolatileAPRPool* poolp = NULL) +    { +        if (poolp) +        { +            pPool = poolp; +        } +        else +        { +            pPool = LLAPRFile::sAPRFilePoolp; +        } +    } + +    LLVolatileAPRPool *pPool; +    bool mInitialized; +}; + +//--------------------------------------------------------------------- +//  // LLAPRFile functions  //  LLAPRFile::LLAPRFile() @@ -287,9 +345,10 @@ apr_status_t LLAPRFile::open(const std::string& filename, apr_int32_t flags, LLV  	//check if already open some file  	llassert_always(!mFile) ;  	llassert_always(!mCurrentFilePoolp) ; -	 -	apr_pool_t* apr_pool = pool ? pool->getVolatileAPRPool() : NULL ; -	s = apr_file_open(&mFile, filename.c_str(), flags, APR_OS_DEFAULT, getAPRFilePool(apr_pool)); + +	mCurrentFilePoolp = pool ? pool : sAPRFilePoolp; +	apr_pool_t* apr_pool = mCurrentFilePoolp->getVolatileAPRPool(); //paired with clear in close() +	s = apr_file_open(&mFile, filename.c_str(), flags, APR_OS_DEFAULT, apr_pool);  	if (s != APR_SUCCESS || !mFile)  	{ @@ -314,14 +373,10 @@ apr_status_t LLAPRFile::open(const std::string& filename, apr_int32_t flags, LLV  		*sizep = file_size;  	} -	if(!mCurrentFilePoolp) +	if (!mFile)  	{ -		mCurrentFilePoolp = pool ; - -		if(!mFile) -		{ -			close() ; -		} +		// It will clean pool +		close() ;  	}  	return s ; @@ -348,17 +403,6 @@ apr_status_t LLAPRFile::open(const std::string& filename, apr_int32_t flags, BOO  	return s;  } -apr_pool_t* LLAPRFile::getAPRFilePool(apr_pool_t* pool) -{	 -	if(!pool) -	{ -		mCurrentFilePoolp = sAPRFilePoolp ; -		return mCurrentFilePoolp->getVolatileAPRPool() ; -	} - -	return pool ; -} -  // File I/O  S32 LLAPRFile::read(void *buf, S32 nbytes)  { @@ -415,7 +459,7 @@ S32 LLAPRFile::seek(apr_seek_where_t where, S32 offset)  //  //static -apr_status_t LLAPRFile::close(apr_file_t* file_handle, LLVolatileAPRPool* pool)  +apr_status_t LLAPRFile::close(apr_file_t* file_handle)   {  	apr_status_t ret = APR_SUCCESS ;  	if(file_handle) @@ -424,29 +468,23 @@ apr_status_t LLAPRFile::close(apr_file_t* file_handle, LLVolatileAPRPool* pool)  		file_handle = NULL ;  	} -	if(pool) -	{ -		pool->clearVolatileAPRPool() ; -	} -  	return ret ;  }  //static -apr_file_t* LLAPRFile::open(const std::string& filename, LLVolatileAPRPool* pool, apr_int32_t flags) +apr_file_t* LLAPRFile::open(const std::string& filename, apr_pool_t* apr_pool, apr_int32_t flags)  {  	apr_status_t s;  	apr_file_t* file_handle ; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_open(&file_handle, filename.c_str(), flags, APR_OS_DEFAULT, pool->getVolatileAPRPool()); +	s = apr_file_open(&file_handle, filename.c_str(), flags, APR_OS_DEFAULT, apr_pool);  	if (s != APR_SUCCESS || !file_handle)  	{  		ll_apr_warn_status(s);  		LL_WARNS("APR") << " Attempting to open filename: " << filename << LL_ENDL;  		file_handle = NULL ; -		close(file_handle, pool) ; +		close(file_handle) ;  		return NULL;  	} @@ -489,8 +527,9 @@ S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset)  S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool)  {  	//***************************************** -	apr_file_t* file_handle = open(filename, pool, APR_READ|APR_BINARY);  -	//*****************************************	 +	LLAPRFilePoolScope scope(pool); +	apr_file_t* file_handle = open(filename, scope.getVolatileAPRPool(), APR_READ|APR_BINARY);  +	//*****************************************  	if (!file_handle)  	{  		return 0; @@ -523,7 +562,7 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb  	}  	//***************************************** -	close(file_handle, pool) ;  +	close(file_handle) ;   	//*****************************************  	return (S32)bytes_read;  } @@ -537,9 +576,10 @@ S32 LLAPRFile::writeEx(const std::string& filename, void *buf, S32 offset, S32 n  		flags |= APR_APPEND;  		offset = 0;  	} -	 +  	//***************************************** -	apr_file_t* file_handle = open(filename, pool, flags); +	LLAPRFilePoolScope scope(pool); +	apr_file_t* file_handle = open(filename, scope.getVolatileAPRPool(), flags);  	//*****************************************  	if (!file_handle)  	{ @@ -573,7 +613,7 @@ S32 LLAPRFile::writeEx(const std::string& filename, void *buf, S32 offset, S32 n  	}  	//***************************************** -	LLAPRFile::close(file_handle, pool); +	LLAPRFile::close(file_handle);  	//*****************************************  	return (S32)bytes_written; @@ -584,9 +624,8 @@ bool LLAPRFile::remove(const std::string& filename, LLVolatileAPRPool* pool)  {  	apr_status_t s; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_remove(filename.c_str(), pool->getVolatileAPRPool()); -	pool->clearVolatileAPRPool() ; +	LLAPRFilePoolScope scope(pool); +	s = apr_file_remove(filename.c_str(), scope.getVolatileAPRPool());  	if (s != APR_SUCCESS)  	{ @@ -602,9 +641,8 @@ bool LLAPRFile::rename(const std::string& filename, const std::string& newname,  {  	apr_status_t s; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_rename(filename.c_str(), newname.c_str(), pool->getVolatileAPRPool()); -	pool->clearVolatileAPRPool() ; +	LLAPRFilePoolScope scope(pool); +	s = apr_file_rename(filename.c_str(), newname.c_str(), scope.getVolatileAPRPool());  	if (s != APR_SUCCESS)  	{ @@ -621,18 +659,16 @@ bool LLAPRFile::isExist(const std::string& filename, LLVolatileAPRPool* pool, ap  	apr_file_t* apr_file;  	apr_status_t s; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_open(&apr_file, filename.c_str(), flags, APR_OS_DEFAULT, pool->getVolatileAPRPool());	 +	LLAPRFilePoolScope scope(pool); +	s = apr_file_open(&apr_file, filename.c_str(), flags, APR_OS_DEFAULT, scope.getVolatileAPRPool());	  	if (s != APR_SUCCESS || !apr_file)  	{ -		pool->clearVolatileAPRPool() ;  		return false;  	}  	else  	{  		apr_file_close(apr_file) ; -		pool->clearVolatileAPRPool() ;  		return true;  	}  } @@ -643,14 +679,12 @@ S32 LLAPRFile::size(const std::string& filename, LLVolatileAPRPool* pool)  	apr_file_t* apr_file;  	apr_finfo_t info;  	apr_status_t s; -	 -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_open(&apr_file, filename.c_str(), APR_READ, APR_OS_DEFAULT, pool->getVolatileAPRPool()); + +	LLAPRFilePoolScope scope(pool); +	s = apr_file_open(&apr_file, filename.c_str(), APR_READ, APR_OS_DEFAULT, scope.getVolatileAPRPool());  	if (s != APR_SUCCESS || !apr_file) -	{		 -		pool->clearVolatileAPRPool() ; -		 +	{				  		return 0;  	}  	else @@ -658,7 +692,6 @@ S32 LLAPRFile::size(const std::string& filename, LLVolatileAPRPool* pool)  		apr_status_t s = apr_file_info_get(&info, APR_FINFO_SIZE, apr_file);		  		apr_file_close(apr_file) ; -		pool->clearVolatileAPRPool() ;  		if (s == APR_SUCCESS)  		{ @@ -676,9 +709,8 @@ bool LLAPRFile::makeDir(const std::string& dirname, LLVolatileAPRPool* pool)  {  	apr_status_t s; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_dir_make(dirname.c_str(), APR_FPROT_OS_DEFAULT, pool->getVolatileAPRPool()); -	pool->clearVolatileAPRPool() ; +	LLAPRFilePoolScope scope(pool); +	s = apr_dir_make(dirname.c_str(), APR_FPROT_OS_DEFAULT, scope.getVolatileAPRPool());  	if (s != APR_SUCCESS)  	{ @@ -694,9 +726,8 @@ bool LLAPRFile::removeDir(const std::string& dirname, LLVolatileAPRPool* pool)  {  	apr_status_t s; -	pool = pool ? pool : LLAPRFile::sAPRFilePoolp ; -	s = apr_file_remove(dirname.c_str(), pool->getVolatileAPRPool()); -	pool->clearVolatileAPRPool() ; +	LLAPRFilePoolScope scope(pool); +	s = apr_file_remove(dirname.c_str(), scope.getVolatileAPRPool());  	if (s != APR_SUCCESS)  	{ diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index da50dda103..0d6637f999 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -180,9 +180,6 @@ public:  	S32 write(const void* buf, S32 nbytes);  	apr_file_t* getFileHandle() {return mFile;}	 - -private: -	apr_pool_t* getAPRFilePool(apr_pool_t* pool) ;	  //  //******************************************************************************************************************************* @@ -192,8 +189,8 @@ public:  	static LLVolatileAPRPool *sAPRFilePoolp ; //a global apr_pool for APRFile, which is used only when local pool does not exist.  private: -	static apr_file_t* open(const std::string& filename, LLVolatileAPRPool* pool, apr_int32_t flags); -	static apr_status_t close(apr_file_t* file, LLVolatileAPRPool* pool) ; +	static apr_file_t* open(const std::string& filename, apr_pool_t* apr_pool, apr_int32_t flags); +	static apr_status_t close(apr_file_t* file) ;  	static S32 seek(apr_file_t* file, apr_seek_where_t where, S32 offset);  public:  	// returns false if failure: diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 4c56b8eace..81d9c89897 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -585,10 +585,10 @@ bool LLGLManager::initGL()  	// Extract video card strings and convert to upper case to  	// work around driver-to-driver variation in capitalization. -	mGLVendor = std::string((const char *)glGetString(GL_VENDOR)); +	mGLVendor = ll_safe_string((const char *)glGetString(GL_VENDOR));  	LLStringUtil::toUpper(mGLVendor); -	mGLRenderer = std::string((const char *)glGetString(GL_RENDERER)); +	mGLRenderer = ll_safe_string((const char *)glGetString(GL_RENDERER));  	LLStringUtil::toUpper(mGLRenderer);  	parse_gl_version( &mDriverVersionMajor,  @@ -887,9 +887,9 @@ void LLGLManager::getGLInfo(LLSD& info)  	}  	else  	{ -		info["GLInfo"]["GLVendor"] = std::string((const char *)glGetString(GL_VENDOR)); -		info["GLInfo"]["GLRenderer"] = std::string((const char *)glGetString(GL_RENDERER)); -		info["GLInfo"]["GLVersion"] = std::string((const char *)glGetString(GL_VERSION)); +		info["GLInfo"]["GLVendor"] = ll_safe_string((const char *)glGetString(GL_VENDOR)); +		info["GLInfo"]["GLRenderer"] = ll_safe_string((const char *)glGetString(GL_RENDERER)); +		info["GLInfo"]["GLVersion"] = ll_safe_string((const char *)glGetString(GL_VERSION));  	}  #if !LL_MESA_HEADLESS @@ -939,9 +939,9 @@ void LLGLManager::printGLInfoString()  	}  	else  	{ -		LL_INFOS("RenderInit") << "GL_VENDOR:     " << ((const char *)glGetString(GL_VENDOR)) << LL_ENDL; -		LL_INFOS("RenderInit") << "GL_RENDERER:   " << ((const char *)glGetString(GL_RENDERER)) << LL_ENDL; -		LL_INFOS("RenderInit") << "GL_VERSION:    " << ((const char *)glGetString(GL_VERSION)) << LL_ENDL; +		LL_INFOS("RenderInit") << "GL_VENDOR:     " << ll_safe_string((const char *)glGetString(GL_VENDOR)) << LL_ENDL; +		LL_INFOS("RenderInit") << "GL_RENDERER:   " << ll_safe_string((const char *)glGetString(GL_RENDERER)) << LL_ENDL; +		LL_INFOS("RenderInit") << "GL_VERSION:    " << ll_safe_string((const char *)glGetString(GL_VERSION)) << LL_ENDL;  	}  #if !LL_MESA_HEADLESS diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index 03d946f1b7..f740f14e4d 100644 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -160,8 +160,8 @@ public:  			LLXMLNodePtr root_node;  			if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) -				{							 -				LL_WARNS() << "Couldn't parse XUI file: " << instance().getCurFileName() << LL_ENDL; +			{ +                LL_WARNS() << "Couldn't parse XUI from path: " << instance().getCurFileName() << ", from filename: " << filename << LL_ENDL;  				goto fail;  			} diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 0b3936f8a5..d3cf1d49e4 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -714,6 +714,7 @@ LLWindowWin32::~LLWindowWin32()  void LLWindowWin32::show()  { +    LL_DEBUGS("Window") << "Setting window to show" << LL_ENDL;  	ShowWindow(mWindowHandle, SW_SHOW);  	SetForegroundWindow(mWindowHandle);  	SetFocus(mWindowHandle); @@ -1126,6 +1127,12 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO  	mPostQuit = FALSE;  	// create window +    LL_DEBUGS("Window") << "Creating window with X: " << window_rect.left +        << " Y: " << window_rect.top +        << " Width: " << (window_rect.right - window_rect.left) +        << " Height: " << (window_rect.bottom - window_rect.top) +        << " Fullscreen: " << mFullscreen +        << LL_ENDL;  	DestroyWindow(mWindowHandle);  	mWindowHandle = CreateWindowEx(dw_ex_style,  		mWindowClassName, diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 17400a203e..013a422d35 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -28,7 +28,6 @@ set(llxml_HEADER_FILES      CMakeLists.txt      llcontrol.h -    llcontrolgroupreader.h      llxmlnode.h      llxmlparser.h      llxmltree.h diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index f136918896..e2dac5a1de 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -34,8 +34,6 @@  #include "llrefcount.h"  #include "llinstancetracker.h" -#include "llcontrolgroupreader.h" -  #include <vector>  // *NOTE: boost::visit_each<> generates warning 4675 on .net 2003 diff --git a/indra/llxml/llcontrolgroupreader.h b/indra/llxml/llcontrolgroupreader.h deleted file mode 100644 index fe77d33fc4..0000000000 --- a/indra/llxml/llcontrolgroupreader.h +++ /dev/null @@ -1,81 +0,0 @@ -/**  - * @file llcontrolgroupreader.h - * @brief Interface providing readonly access to LLControlGroup (intended for unit testing) - * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - *  - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - *  - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU - * Lesser General Public License for more details. - *  - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA - *  - * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLCONTROLGROUPREADER_H -#define LL_LLCONTROLGROUPREADER_H - -#include "stdtypes.h" -#include <string> - -#include "v3math.h" -#include "v3dmath.h" -#include "v3color.h" -#include "v4color.h" -#include "llrect.h" - -class LLControlGroupReader -{ -public: -	LLControlGroupReader() {} -	virtual ~LLControlGroupReader() {} - -	virtual std::string getString(const std::string& name) { return ""; } -	virtual LLWString	getWString(const std::string& name) { return LLWString(); } -	virtual std::string	getText(const std::string& name) { return ""; } -	virtual LLVector3	getVector3(const std::string& name) { return LLVector3(); } -	virtual LLVector3d	getVector3d(const std::string& name) { return LLVector3d(); } -	virtual LLRect		getRect(const std::string& name) { return LLRect(); } -	virtual BOOL		getBOOL(const std::string& name) { return FALSE; } -	virtual S32			getS32(const std::string& name) { return 0; } -	virtual F32			getF32(const std::string& name) {return 0.0f; } -	virtual U32			getU32(const std::string& name) {return 0; } -	virtual LLSD        getLLSD(const std::string& name) { return LLSD(); } - -	virtual LLColor4	getColor(const std::string& name) { return LLColor4(); } -	virtual LLColor4	getColor4(const std::string& name) { return LLColor4(); } -	virtual LLColor3	getColor3(const std::string& name) { return LLColor3(); } -	 -	virtual void		setBOOL(const std::string& name, BOOL val) {} -	virtual void		setS32(const std::string& name, S32 val) {} -	virtual void		setF32(const std::string& name, F32 val) {} -	virtual void		setU32(const std::string& name, U32 val) {} -	virtual void		setString(const std::string&  name, const std::string& val) {} -	virtual void		setVector3(const std::string& name, const LLVector3 &val) {} -	virtual void		setVector3d(const std::string& name, const LLVector3d &val) {} -	virtual void		setQuaternion(const std::string& name, const LLQuaternion &val) {} -	virtual void		setRect(const std::string& name, const LLRect &val) {} -	virtual void		setColor4(const std::string& name, const LLColor4 &val) {} -	virtual void    	setLLSD(const std::string& name, const LLSD& val) {} -}; - -#endif /* LL_LLCONTROLGROUPREADER_H */ - - - - - - - diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f6d6f7c897..f3df79fb6b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -830,6 +830,17 @@ bool LLAgent::enableFlying()  	return !sitting;  } +// static +bool LLAgent::isSitting() +{ +    BOOL sitting = FALSE; +    if (isAgentAvatarValid()) +    { +        sitting = gAgentAvatarp->isSitting(); +    } +    return sitting; +} +  void LLAgent::standUp()  {  	setControlFlags(AGENT_CONTROL_STAND_UP); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 1a352d3397..88cce0b911 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -351,6 +351,7 @@ public:  	static void		toggleFlying();  	static bool		enableFlying();  	BOOL			canFly(); 			// Does this parcel allow you to fly? +	static bool		isSitting();  	//--------------------------------------------------------------------  	// Voice diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7c0124322c..d2b7c9d85e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1131,7 +1131,10 @@ bool LLAppViewer::init()  	gSimLastTime = gRenderStartTime.getElapsedTimeF32();  	gSimFrames = (F32)gFrameCount; -	LLViewerJoystick::getInstance()->init(false); +    if (gSavedSettings.getBOOL("JoystickEnabled")) +    { +        LLViewerJoystick::getInstance()->init(false); +    }  	try {  		initializeSecHandler(); @@ -3150,8 +3153,8 @@ LLSD LLAppViewer::getViewerInfo() const  	info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB().valueInUnits<LLUnits::Megabytes>());  	// Moved hack adjustment to Windows memory size into llsys.cpp  	info["OS_VERSION"] = LLOSInfo::instance().getOSString(); -	info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); -	info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); +	info["GRAPHICS_CARD_VENDOR"] = ll_safe_string((const char*)(glGetString(GL_VENDOR))); +	info["GRAPHICS_CARD"] = ll_safe_string((const char*)(glGetString(GL_RENDERER)));  #if LL_WINDOWS  	std::string drvinfo = gDXHardware.getDriverVersionWMI(); @@ -3170,7 +3173,7 @@ LLSD LLAppViewer::getViewerInfo() const  	}  #endif -	info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); +	info["OPENGL_VERSION"] = ll_safe_string((const char*)(glGetString(GL_VERSION)));      // Settings @@ -4539,6 +4542,7 @@ void LLAppViewer::saveFinalSnapshot()  									gViewerWindow->getWindowWidthRaw(),  									gViewerWindow->getWindowHeightRaw(),  									FALSE, +									gSavedSettings.getBOOL("RenderHUDInSnapshot"),  									TRUE,  									LLSnapshotModel::SNAPSHOT_TYPE_COLOR,  									LLSnapshotModel::SNAPSHOT_FORMAT_PNG); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 1099d4bc09..722523830b 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -1085,7 +1085,8 @@ LLView* LLChatHistory::getSeparator()  LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params, const LLSD& args)  {  	LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename); -	header->setup(chat, style_params, args); +    if (header) +        header->setup(chat, style_params, args);  	return header;  } @@ -1298,6 +1299,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL  			view = getSeparator();  			p.top_pad = mTopSeparatorPad;  			p.bottom_pad = mBottomSeparatorPad; +            if (!view) +            { +                // Might be wiser to make this LL_ERRS, getSeparator() should work in case of correct instalation. +                LL_WARNS() << "Failed to create separator from " << mMessageSeparatorFilename << ": can't append to history" << LL_ENDL; +                return; +            }  		}  		else  		{ @@ -1306,7 +1313,12 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL  				p.top_pad = 0;  			else  				p.top_pad = mTopHeaderPad; -			p.bottom_pad = mBottomHeaderPad; +            p.bottom_pad = mBottomHeaderPad; +            if (!view) +            { +                LL_WARNS() << "Failed to create header from " << mMessageHeaderFilename << ": can't append to history" << LL_ENDL; +                return; +            }  		}  		p.view = view; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 17952349dc..347997a69a 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1590,14 +1590,29 @@ void LLFavoritesOrderStorage::load()  												<< (fav_llsd.isMap() ? "" : "un") << "successfully"  												<< LL_ENDL;  				in_file.close(); -				user_llsd = fav_llsd[gAgentUsername]; +				if (fav_llsd.isMap() && fav_llsd.has(gAgentUsername)) +				{ +					user_llsd = fav_llsd[gAgentUsername]; -				S32 index = 0; -				for (LLSD::array_iterator iter = user_llsd.beginArray(); +					S32 index = 0; +					bool needs_validation = gSavedPerAccountSettings.getBOOL("ShowFavoritesOnLogin"); +					for (LLSD::array_iterator iter = user_llsd.beginArray();  						iter != user_llsd.endArray(); ++iter) -				{ -					mSortIndexes.insert(std::make_pair(iter->get("id").asUUID(), index)); -					index++; +					{ +						// Validation +						LLUUID fv_id = iter->get("id").asUUID(); +						if (needs_validation +							&& (fv_id.isNull() +								|| iter->get("asset_id").asUUID().isNull() +								|| iter->get("name").asString().empty() +								|| iter->get("slurl").asString().empty())) +						{ +							mRecreateFavoriteStorage = true; +						} + +						mSortIndexes.insert(std::make_pair(fv_id, index)); +						index++; +					}  				}  			}  			else @@ -1841,6 +1856,8 @@ void LLFavoritesOrderStorage::rearrangeFavoriteLandmarks(const LLUUID& source_it  BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed)  { +	pref_changed |= mRecreateFavoriteStorage; +	mRecreateFavoriteStorage = false;  	LLUUID favorite_folder= gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE);  	if (favorite_folder.isNull()) diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index d93161fd7a..571208aa31 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -248,6 +248,7 @@ private:  	slurls_map_t mSLURLs;  	std::set<LLUUID> mMissingSLURLs;  	bool mIsDirty; +	bool mRecreateFavoriteStorage;  	struct IsNotInFavorites  	{ @@ -278,7 +279,9 @@ private:  inline  LLFavoritesOrderStorage::LLFavoritesOrderStorage() : -	mIsDirty(false), mUpdateRequired(false) +	mIsDirty(false), +	mUpdateRequired(false), +	mRecreateFavoriteStorage(false)  { load(); }  #endif // LL_LLFAVORITESBARCTRL_H diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 56619e818a..957b2e1e8e 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -182,8 +182,11 @@ void LLFloaterAuction::onClickSnapshot(void* data)  	BOOL success = gViewerWindow->rawSnapshot(raw,  											  gViewerWindow->getWindowWidthScaled(),  											  gViewerWindow->getWindowHeightScaled(), -											  TRUE, FALSE, -											  FALSE, FALSE); +											  TRUE, +											  FALSE, +											  FALSE, //UI +											  FALSE, //HUD +											  FALSE);  	gForceRenderLandFence = FALSE;  	if (success) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 33099db1b9..ab95bc06b8 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -361,59 +361,8 @@ void LLFloaterAvatarPicker::populateFriend()  void LLFloaterAvatarPicker::drawFrustum()  { -    if(mFrustumOrigin.get()) -    { -        LLView * frustumOrigin = mFrustumOrigin.get(); -        LLRect origin_rect; -        frustumOrigin->localRectToOtherView(frustumOrigin->getLocalRect(), &origin_rect, this); -        // draw context cone connecting color picker with color swatch in parent floater -        LLRect local_rect = getLocalRect(); -        if (hasFocus() && frustumOrigin->isInVisibleChain() && mContextConeOpacity > 0.001f) -        { -            gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); -            LLGLEnable(GL_CULL_FACE); -            gGL.begin(LLRender::QUADS); -            { -                gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); -                gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop); -                gGL.vertex2i(origin_rect.mRight, origin_rect.mTop); -                gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); -                gGL.vertex2i(local_rect.mRight, local_rect.mTop); -                gGL.vertex2i(local_rect.mLeft, local_rect.mTop); - -                gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); -                gGL.vertex2i(local_rect.mLeft, local_rect.mTop); -                gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); -                gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); -                gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom); -                gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop); - -                gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); -                gGL.vertex2i(local_rect.mRight, local_rect.mBottom); -                gGL.vertex2i(local_rect.mRight, local_rect.mTop); -                gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); -                gGL.vertex2i(origin_rect.mRight, origin_rect.mTop); -                gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom); - -                gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity); -                gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); -                gGL.vertex2i(local_rect.mRight, local_rect.mBottom); -                gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity); -                gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom); -                gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom); -            } -            gGL.end(); -        } - -        if (gFocusMgr.childHasMouseCapture(getDragHandle())) -        { -            mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(mContextConeFadeTime)); -        } -        else -        { -            mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(mContextConeFadeTime)); -        } -    } +    static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f); +    drawConeToOwner(mContextConeOpacity, max_opacity, mFrustumOrigin.get(), mContextConeFadeTime, mContextConeInAlpha, mContextConeOutAlpha);  }  void LLFloaterAvatarPicker::draw() diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index ee3d633dd0..2b672bc890 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -61,6 +61,11 @@ static LLTrace::SampleStatHandle<>* sJoystickAxes[6] =  LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)  	: LLFloater(data)  { +    if (!LLViewerJoystick::getInstance()->isJoystickInitialized()) +    { +        LLViewerJoystick::getInstance()->init(false); +    } +  	initFromSettings();  } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 951d11bbe5..81f4b2234c 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1282,12 +1282,12 @@ void LLFloaterPreference::buildPopupLists()  						if (it->second.asBoolean())  						{  							row["columns"][1]["value"] = formp->getElement(it->first)["ignore"].asString(); +							row["columns"][1]["font"] = "SANSSERIF_SMALL"; +							row["columns"][1]["width"] = 360;  							break;  						}  					}  				} -				row["columns"][1]["font"] = "SANSSERIF_SMALL"; -				row["columns"][1]["width"] = 360;  			}  			item = disabled_popups.addElement(row);  		} diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 4cc43254a5..e038faecc9 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -930,7 +930,7 @@ void LLFloaterReporter::takeNewSnapshot()  	// Take a screenshot, but don't draw this floater.  	setVisible(FALSE); -	if( !gViewerWindow->rawSnapshot(mImageRaw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE, FALSE)) +    if (!gViewerWindow->rawSnapshot(mImageRaw, IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, gSavedSettings.getBOOL("RenderHUDInSnapshot"), TRUE, FALSE))  	{  		LL_WARNS() << "Unable to take screenshot" << LL_ENDL;  		setVisible(TRUE); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 520c9adcd1..852ba846ff 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -1364,6 +1364,7 @@ void LLOutfitGallery::onSelectPhoto(LLUUID selected_outfit_id)                  texture_floaterp->setOnFloaterCommitCallback(boost::bind(&LLOutfitGallery::onTexturePickerCommit, this, _1, _2));                  texture_floaterp->setOnUpdateImageStatsCallback(boost::bind(&LLOutfitGallery::onTexturePickerUpdateImageStats, this, _1));                  texture_floaterp->setLocalTextureEnabled(FALSE); +                texture_floaterp->setCanApply(false, true);              }              floaterp->openFloater(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 224cec9650..602654971a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -41,7 +41,6 @@  #include "llcommandhandler.h"		// for secondlife:///app/login/  #include "llcombobox.h"  #include "llviewercontrol.h" -#include "llfloaterpreference.h"  #include "llfocusmgr.h"  #include "lllineeditor.h"  #include "llnotificationsutil.h" @@ -456,6 +455,10 @@ void LLPanelLogin::addFavoritesToStartLocation()  		}  		break;  	} +	if (combo->getValue().asString().empty()) +	{ +		combo->selectFirstItem(); +	}  }  LLPanelLogin::~LLPanelLogin() @@ -1330,13 +1333,13 @@ void LLPanelLogin::onSelectServer()  		{  			std::string location = location_combo->getValue().asString();  			LLSLURL slurl(location); // generata a slurl from the location combo contents -			if (   slurl.getType() == LLSLURL::LOCATION -				&& slurl.getGrid() != LLGridManager::getInstance()->getGrid() -				) +			if (location.empty() +				|| (slurl.getType() == LLSLURL::LOCATION +				    && slurl.getGrid() != LLGridManager::getInstance()->getGrid()) +				   )  			{  				// the grid specified by the location is not this one, so clear the combo  				location_combo->setCurrentByIndex(0); // last location on the new grid -				location_combo->setTextEntry(LLStringUtil::null);  			}  		}			  		break; diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index aa5ba3f210..d52ad8056f 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -33,8 +33,8 @@  #include "llbutton.h"  #include "lltabcontainer.h" +#include "llfloater.h"  #include "llfloaterreg.h" -#include "llfloaterpreference.h"  #include "llpresetsmanager.h"  #include "llsliderctrl.h"  #include "llscrolllistctrl.h" diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 356f2e81ce..f3439daee9 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -558,6 +558,7 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)          if(!gViewerWindow->thumbnailSnapshot(raw,                                           mThumbnailWidth, mThumbnailHeight,                                           mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), +                                         gSavedSettings.getBOOL("RenderHUDInSnapshot"),                                           FALSE,                                           mSnapshotBufferType) )          { @@ -716,6 +717,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )                  previewp->mKeepAspectRatio,//gSavedSettings.getBOOL("KeepAspectForSnapshot"),                  previewp->getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE,                  previewp->mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), +                gSavedSettings.getBOOL("RenderHUDInSnapshot"),                  FALSE,                  previewp->mSnapshotBufferType,                  previewp->getMaxImageSize())) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1be1c4ba96..4c54d44ac5 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -108,7 +108,6 @@  //#include "llfirstuse.h"  #include "llfloaterhud.h"  #include "llfloaterland.h" -#include "llfloaterpreference.h"  #include "llfloatertopobjects.h"  #include "llfloaterworldmap.h"  #include "llgesturemgr.h" @@ -812,6 +811,7 @@ bool idle_startup()  		show_debug_menus();  		// Hide the splash screen +		LL_DEBUGS("AppInit") << "Hide the splash screen and show window" << LL_ENDL;  		LLSplashScreen::hide();  		// Push our window frontmost  		gViewerWindow->getWindow()->show(); @@ -819,9 +819,12 @@ bool idle_startup()  		// DEV-16927.  The following code removes errant keystrokes that happen while the window is being   		// first made visible.  #ifdef _WIN32 +        LL_DEBUGS("AppInit") << "Processing PeekMessage" << LL_ENDL;  		MSG msg;  		while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) ) -		{ } +        { +        } +        LL_DEBUGS("AppInit") << "PeekMessage processed" << LL_ENDL;  #endif          display_startup();          timeout.reset(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 2b1f4b138f..4c7eb41418 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -253,6 +253,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)  	if (gWindowResized)  	{ //skip render on frames where window has been resized +		LL_DEBUGS("Window") << "Resizing window" << LL_ENDL;  		LL_RECORD_BLOCK_TIME(FTM_RESIZE_WINDOW);  		gGL.flush();  		glClear(GL_COLOR_BUFFER_BIT); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ed5dff1600..79081f3e02 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1026,7 +1026,7 @@ void LLViewerMedia::setAllMediaPaused(bool val)      {          if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia())          { -            LLViewerParcelMedia::getInstance()->play(LLViewerParcelMgr::getInstance()->getAgentParcel()); +            LLViewerParcelMedia::getInstance()->play(agent_parcel);          }          static LLCachedControl<bool> audio_streaming_music(gSavedSettings, "AudioStreamingMusic", true); diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 512c5a8279..8bf1ad2441 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -79,7 +79,7 @@ class LLViewerMedia: public LLSingleton<LLViewerMedia>  public:  	// String to get/set media autoplay in gSavedSettings -    static const char* AUTO_PLAY_MEDIA_SETTING; +	static const char* AUTO_PLAY_MEDIA_SETTING;  	static const char* SHOW_MEDIA_ON_OTHERS_SETTING;  	static const char* SHOW_MEDIA_WITHIN_PARCEL_SETTING;  	static const char* SHOW_MEDIA_OUTSIDE_PARCEL_SETTING; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index d1d3a7fc12..cd48b1e8e7 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -683,10 +683,16 @@ class LLFileTakeSnapshotToDisk : public view_listener_t  		S32 width = gViewerWindow->getWindowWidthRaw();  		S32 height = gViewerWindow->getWindowHeightRaw(); +		bool render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot"); +		bool render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot"); +  		if (gSavedSettings.getBOOL("HighResSnapshot"))  		{  			width *= 2;  			height *= 2; +			// not compatible wirh UI/HUD +			render_ui = false; +			render_hud = false;  		}  		if (gViewerWindow->rawSnapshot(raw, @@ -694,7 +700,8 @@ class LLFileTakeSnapshotToDisk : public view_listener_t  									   height,  									   TRUE,  									   FALSE, -									   gSavedSettings.getBOOL("RenderUIInSnapshot"), +									   render_ui, +									   render_hud,  									   FALSE))  		{  			LLPointer<LLImageFormatted> formatted; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e077626461..06a8ebbe89 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5102,7 +5102,14 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)  			std::string snap_filename = gDirUtilp->getLindenUserDir();  			snap_filename += gDirUtilp->getDirDelimiter();  			snap_filename += LLStartUp::getScreenHomeFilename(); -			gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); +            gViewerWindow->saveSnapshot(snap_filename, +                                        gViewerWindow->getWindowWidthRaw(), +                                        gViewerWindow->getWindowHeightRaw(), +                                        FALSE, //UI +                                        gSavedSettings.getBOOL("RenderHUDInSnapshot"), +                                        FALSE, +                                        LLSnapshotModel::SNAPSHOT_TYPE_COLOR, +                                        LLSnapshotModel::SNAPSHOT_FORMAT_PNG);  		}  		if (notificationID == "RegionRestartMinutes" || @@ -5200,7 +5207,14 @@ static void process_special_alert_messages(const std::string & message)  		std::string snap_filename = gDirUtilp->getLindenUserDir();  		snap_filename += gDirUtilp->getDirDelimiter();  		snap_filename += LLStartUp::getScreenHomeFilename(); -		gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); +		gViewerWindow->saveSnapshot(snap_filename, +                                    gViewerWindow->getWindowWidthRaw(), +                                    gViewerWindow->getWindowHeightRaw(), +                                    FALSE, +                                    gSavedSettings.getBOOL("RenderHUDInSnapshot"), +                                    FALSE, +                                    LLSnapshotModel::SNAPSHOT_TYPE_COLOR, +                                    LLSnapshotModel::SNAPSHOT_FORMAT_PNG);  	}  } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fe3e4cdd61..9c91cde09a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4800,7 +4800,9 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id)  	}  	LLVOAvatar* avatar = getAvatar(); -	if (avatar) +	if (avatar && !isHUDAttachment() +		&& isMesh() +		&& getVolume() && getVolume()->getParams().getSculptID().notNull()) // checking for the rigged mesh by params instead of using isRiggedMesh() to avoid false negatives when skin info isn't ready  	{  		LLAvatarAppearanceDefines::EBakedTextureIndex texIndex = LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::assetIdToBakedTextureIndex(id);  		LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 85d87a43af..04172adde9 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -55,7 +55,6 @@  #include "llviewerregion.h"  #include "llvoavatar.h"  #include "llvoavatarself.h" -#include "llviewerwindow.h"		// *TODO: remove, only used for width/height  #include "llworld.h"  #include "llfeaturemanager.h"  #include "llviewernetwork.h" @@ -582,21 +581,38 @@ void send_stats()  	// If the current revision is recent, ping the previous author before overriding  	LLSD &misc = body["stats"]["misc"]; -	// Screen size so the UI team can figure out how big the widgets -	// appear and use a "typical" size for end user tests. - -	S32 window_width = gViewerWindow->getWindowWidthRaw(); -	S32 window_height = gViewerWindow->getWindowHeightRaw(); -	S32 window_size = (window_width * window_height) / 1024; -	misc["string_1"] = llformat("%d", window_size); -	misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value()); - -	F32 unbaked_time = LLVOAvatar::sUnbakedTime * 1000.f / gFrameTimeSeconds; -	misc["int_1"] = LLSD::Integer(unbaked_time); // Steve: 1.22 -	F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds; -	misc["int_2"] = LLSD::Integer(grey_time); // Steve: 1.22 - -	LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL; +#ifdef LL_WINDOWS +    // Probe for Vulkan capability (Dave Houlton 05/2020) +    // +    // Check for presense of a Vulkan loader dll, as a proxy for a Vulkan-capable gpu. +    // False-positives and false-negatives are possible, but unlikely. We'll get a good +    // approximation of Vulkan capability within current user systems from this. More +    // detailed information on versions and extensions can come later. +    static bool vulkan_oneshot = false; +    static bool vulkan_detected = false; + +    if (!vulkan_oneshot) +    { +        HMODULE vulkan_loader = LoadLibraryExA("vulkan-1.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); +        if (NULL != vulkan_loader) +        { +            vulkan_detected = true; +            FreeLibrary(vulkan_loader); +        } +        vulkan_oneshot = true; +    } + +    misc["string_1"] = vulkan_detected ? llformat("Vulkan driver is detected") : llformat("No Vulkan driver detected"); + +#else +    misc["string_1"] = llformat("Unused"); +#endif // LL_WINDOWS + +    misc["string_2"] = llformat("Unused"); +    misc["int_1"] = LLSD::Integer(0); +    misc["int_2"] = LLSD::Integer(0); + +    LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL;  	LL_INFOS() << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << LL_ENDL;  	body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 44d02b4224..1fbb32ac5e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4592,12 +4592,12 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height)  	}  } -BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) +BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format)  {      LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL;      LLPointer<LLImageRaw> raw = new LLImageRaw; -    BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, do_rebuild); +    BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, show_hud, do_rebuild);      if (success)      { @@ -4656,16 +4656,16 @@ void LLViewerWindow::resetSnapshotLoc() const  	gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string());  } -BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type) +BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type)  { -	return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, do_rebuild, type); +	return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, type);  }  // Saves the image from the screen to a raw image  // Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy  // the results over to the final raw image.  BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height,  -	BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) +    BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, S32 max_size)  {  	if (!raw)  	{ @@ -4699,7 +4699,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  		LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);  	} -	BOOL hide_hud = !gSavedSettings.getBOOL("RenderHUDInSnapshot") && LLPipeline::sShowHUDAttachments; +    BOOL hide_hud = !show_hud && LLPipeline::sShowHUDAttachments;  	if (hide_hud)  	{  		LLPipeline::sShowHUDAttachments = FALSE; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 44c1fbd066..e901245f92 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -353,10 +353,10 @@ public:  	// snapshot functionality.  	// perhaps some of this should move to llfloatershapshot?  -MG -	BOOL			saveSnapshot(const std::string&  filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP); +	BOOL			saveSnapshot(const std::string&  filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP);  	BOOL			rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE, -		BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE); -	BOOL			thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type); +		BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE); +	BOOL			thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type);  	BOOL			isSnapshotLocSet() const;  	void			resetSnapshotLoc() const; diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp index 97b405c1d0..acf25b9792 100644 --- a/indra/newview/llviewerwindowlistener.cpp +++ b/indra/newview/llviewerwindowlistener.cpp @@ -50,10 +50,11 @@ LLViewerWindowListener::LLViewerWindowListener(LLViewerWindow* llviewerwindow):  //  saveSnapshotArgs["width"] = LLSD::Integer();  //  saveSnapshotArgs["height"] = LLSD::Integer();  //  saveSnapshotArgs["showui"] = LLSD::Boolean(); +//  saveSnapshotArgs["showhud"] = LLSD::Boolean();  //  saveSnapshotArgs["rebuild"] = LLSD::Boolean();  //  saveSnapshotArgs["type"] = LLSD::String();      add("saveSnapshot", -        "Save screenshot: [\"filename\"], [\"width\"], [\"height\"], [\"showui\"], [\"rebuild\"], [\"type\"]\n" +        "Save screenshot: [\"filename\"], [\"width\"], [\"height\"], [\"showui\"], [\"showhud\"], [\"rebuild\"], [\"type\"]\n"          "type: \"COLOR\", \"DEPTH\"\n"          "Post on [\"reply\"] an event containing [\"ok\"]",          &LLViewerWindowListener::saveSnapshot, @@ -83,6 +84,9 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const      bool showui = true;      if (event.has("showui"))          showui = event["showui"].asBoolean(); +    bool showhud = true; +    if (event.has("showhud")) +        showhud = event["showhud"].asBoolean();      bool rebuild(event["rebuild"]); // defaults to false      LLSnapshotModel::ESnapshotLayerType type(LLSnapshotModel::SNAPSHOT_TYPE_COLOR);      if (event.has("type")) @@ -96,7 +100,7 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const          }          type = found->second;      } -    bool ok = mViewerWindow->saveSnapshot(event["filename"], width, height, showui, rebuild, type); +    bool ok = mViewerWindow->saveSnapshot(event["filename"], width, height, showui, showhud, rebuild, type);      sendReply(LLSDMap("ok", ok), event);  } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 2ffd462ac3..a6500d1399 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -261,7 +261,10 @@ void LLVOVolume::markDead()  {  	if (!mDead)  	{ -		LLSculptIDSize::instance().rem(getVolume()->getParams().getSculptID()); +        if (getVolume()) +        { +            LLSculptIDSize::instance().rem(getVolume()->getParams().getSculptID()); +        }  		if(getMDCImplCount() > 0)  		{ diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo.png b/indra/newview/skins/default/textures/windows/login_sl_logo.pngBinary files differ index 9810d00237..1eede80c83 100644 --- a/indra/newview/skins/default/textures/windows/login_sl_logo.png +++ b/indra/newview/skins/default/textures/windows/login_sl_logo.png diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png b/indra/newview/skins/default/textures/windows/login_sl_logo_small.pngBinary files differ index 0a245442d5..c5933001f0 100644 --- a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png +++ b/indra/newview/skins/default/textures/windows/login_sl_logo_small.png diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8a91a1f721..32ae56e3af 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7204,12 +7204,14 @@ You can only claim public land in the Region you're in.    </notification>    <notification -   icon="notify.tga" +   icon="alertmodal.tga"     name="RegionTPAccessBlocked" -   persist="false" -   type="notify"> +   type="alertmodal">     <tag>fail</tag>      The region you're trying to visit contains content exceeding your current preferences.  You can change your preferences using Me > Preferences > General. +   <usetemplate +      name="okbutton" +      yestext="OK"/>    </notification>    <notification | 
