Merge Firestorm LGPL

master
Ansariel 2018-05-18 10:32:56 +02:00
commit 3f331bb24c
180 changed files with 1476 additions and 6732 deletions

View File

@ -573,3 +573,4 @@ ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release
26d9e9bb166a9a417f35b1863223a597af8185fd 5.1.1-release
2eb917875efdfe920680b9049302d0f03721245d 5.1.2-release
7c00e5b6cb3d95712e9d8e29277c805bca2bda90 5.1.3-release
7b6b020fd5ad9a8dc3670c5c92d1ca92e55fc485 5.1.4-release

View File

@ -220,6 +220,7 @@ Ansariel Hiller
MAINT-7899
STORM-2151
MAINT-6917
MAINT-8085
Aralara Rajal
Arare Chantilly
CHUIBUG-191

View File

@ -1577,16 +1577,21 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
alpha_data = new U8[width * height];
mAlphaCache[cache_index] = alpha_data;
// <FS:Ansariel> Format GL_ALPHA is invalid for glReadPixels
//glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
U8* alpha_buffer = new U8[width * height * 4];
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
for (S32 i = 0; i < width * height; ++i)
// nSight doesn't support use of glReadPixels
if (!LLRender::sNsightDebugSupport)
{
alpha_data[i] = alpha_buffer[i * 4 + 3];
// <FS:Ansariel> Format GL_ALPHA is invalid for glReadPixels
//glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
U8* alpha_buffer = new U8[width * height * 4];
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
for (S32 i = 0; i < width * height; ++i)
{
alpha_data[i] = alpha_buffer[i * 4 + 3];
}
delete[] alpha_buffer;
// </FS:Ansariel>
}
delete[] alpha_buffer;
// </FS:Ansariel>
}
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();

File diff suppressed because it is too large Load Diff

View File

@ -368,327 +368,6 @@ private:
static BOOL sEnableMemoryFailurePrevention;
};
//
//class LLPrivateMemoryPool defines a private memory pool for an application to use, so the application does not
//need to access the heap directly fro each memory allocation. Throught this, the allocation speed is faster,
//and reduces virtaul address space gragmentation problem.
//Note: this class is thread-safe by passing true to the constructor function. However, you do not need to do this unless
//you are sure the memory allocation and de-allocation will happen in different threads. To make the pool thread safe
//increases allocation and deallocation cost.
//
class LL_COMMON_API LLPrivateMemoryPool
{
friend class LLPrivateMemoryPoolManager ;
public:
class LL_COMMON_API LLMemoryBlock //each block is devided into slots uniformly
{
public:
LLMemoryBlock() ;
~LLMemoryBlock() ;
void init(char* buffer, U32 buffer_size, U32 slot_size) ;
void setBuffer(char* buffer, U32 buffer_size) ;
char* allocate() ;
void freeMem(void* addr) ;
bool empty() {return !mAllocatedSlots;}
bool isFull() {return mAllocatedSlots == mTotalSlots;}
bool isFree() {return !mTotalSlots;}
U32 getSlotSize()const {return mSlotSize;}
U32 getTotalSlots()const {return mTotalSlots;}
U32 getBufferSize()const {return mBufferSize;}
char* getBuffer() const {return mBuffer;}
//debug use
void resetBitMap() ;
private:
char* mBuffer;
U32 mSlotSize ; //when the block is not initialized, it is the buffer size.
U32 mBufferSize ;
U32 mUsageBits ;
U8 mTotalSlots ;
U8 mAllocatedSlots ;
U8 mDummySize ; //size of extra bytes reserved for mUsageBits.
public:
LLMemoryBlock* mPrev ;
LLMemoryBlock* mNext ;
LLMemoryBlock* mSelf ;
struct CompareAddress
{
bool operator()(const LLMemoryBlock* const& lhs, const LLMemoryBlock* const& rhs)
{
return (uintptr_t)lhs->getBuffer() < (uintptr_t)rhs->getBuffer();
}
};
};
class LL_COMMON_API LLMemoryChunk //is divided into memory blocks.
{
public:
LLMemoryChunk() ;
~LLMemoryChunk() ;
void init(char* buffer, U32 buffer_size, U32 min_slot_size, U32 max_slot_size, U32 min_block_size, U32 max_block_size) ;
void setBuffer(char* buffer, U32 buffer_size) ;
bool empty() ;
char* allocate(U32 size) ;
void freeMem(void* addr) ;
char* getBuffer() const {return mBuffer;}
U32 getBufferSize() const {return mBufferSize;}
U32 getAllocatedSize() const {return mAlloatedSize;}
bool containsAddress(const char* addr) const;
static U32 getMaxOverhead(U32 data_buffer_size, U32 min_slot_size,
U32 max_slot_size, U32 min_block_size, U32 max_block_size) ;
void dump() ;
private:
U32 getPageIndex(uintptr_t addr) ;
U32 getBlockLevel(U32 size) ;
U16 getPageLevel(U32 size) ;
LLMemoryBlock* addBlock(U32 blk_idx) ;
void popAvailBlockList(U32 blk_idx) ;
void addToFreeSpace(LLMemoryBlock* blk) ;
void removeFromFreeSpace(LLMemoryBlock* blk) ;
void removeBlock(LLMemoryBlock* blk) ;
void addToAvailBlockList(LLMemoryBlock* blk) ;
U32 calcBlockSize(U32 slot_size);
LLMemoryBlock* createNewBlock(LLMemoryBlock* blk, U32 buffer_size, U32 slot_size, U32 blk_idx) ;
private:
LLMemoryBlock** mAvailBlockList ;//256 by mMinSlotSize
LLMemoryBlock** mFreeSpaceList;
LLMemoryBlock* mBlocks ; //index of blocks by address.
char* mBuffer ;
U32 mBufferSize ;
char* mDataBuffer ;
char* mMetaBuffer ;
U32 mMinBlockSize ;
U32 mMinSlotSize ;
U32 mMaxSlotSize ;
U32 mAlloatedSize ;
U16 mBlockLevels;
U16 mPartitionLevels;
public:
//form a linked list
LLMemoryChunk* mNext ;
LLMemoryChunk* mPrev ;
} ;
private:
LLPrivateMemoryPool(S32 type, U32 max_pool_size) ;
~LLPrivateMemoryPool() ;
char *allocate(U32 size) ;
void freeMem(void* addr) ;
void dump() ;
U32 getTotalAllocatedSize() ;
U32 getTotalReservedSize() {return mReservedPoolSize;}
S32 getType() const {return mType; }
bool isEmpty() const {return !mNumOfChunks; }
private:
void lock() ;
void unlock() ;
S32 getChunkIndex(U32 size) ;
LLMemoryChunk* addChunk(S32 chunk_index) ;
bool checkSize(U32 asked_size) ;
void removeChunk(LLMemoryChunk* chunk) ;
U16 findHashKey(const char* addr);
void addToHashTable(LLMemoryChunk* chunk) ;
void removeFromHashTable(LLMemoryChunk* chunk) ;
void rehash() ;
bool fillHashTable(U16 start, U16 end, LLMemoryChunk* chunk) ;
LLMemoryChunk* findChunk(const char* addr) ;
void destroyPool() ;
public:
enum
{
SMALL_ALLOCATION = 0, //from 8 bytes to 2KB(exclusive), page size 2KB, max chunk size is 4MB.
MEDIUM_ALLOCATION, //from 2KB to 512KB(exclusive), page size 32KB, max chunk size 4MB
LARGE_ALLOCATION, //from 512KB to 4MB(inclusive), page size 64KB, max chunk size 16MB
SUPER_ALLOCATION //allocation larger than 4MB.
};
enum
{
STATIC = 0 , //static pool(each alllocation stays for a long time) without threading support
VOLATILE, //Volatile pool(each allocation stays for a very short time) without threading support
STATIC_THREADED, //static pool with threading support
VOLATILE_THREADED, //volatile pool with threading support
MAX_TYPES
}; //pool types
private:
LLMutex* mMutexp ;
U32 mMaxPoolSize;
U32 mReservedPoolSize ;
LLMemoryChunk* mChunkList[SUPER_ALLOCATION] ; //all memory chunks reserved by this pool, sorted by address
U16 mNumOfChunks ;
U16 mHashFactor ;
S32 mType ;
class LLChunkHashElement
{
public:
LLChunkHashElement() {mFirst = NULL ; mSecond = NULL ;}
bool add(LLMemoryChunk* chunk) ;
void remove(LLMemoryChunk* chunk) ;
LLMemoryChunk* findChunk(const char* addr) ;
bool empty() {return !mFirst && !mSecond; }
bool full() {return mFirst && mSecond; }
bool hasElement(LLMemoryChunk* chunk) {return mFirst == chunk || mSecond == chunk;}
private:
LLMemoryChunk* mFirst ;
LLMemoryChunk* mSecond ;
};
std::vector<LLChunkHashElement> mChunkHashList ;
};
class LL_COMMON_API LLPrivateMemoryPoolManager
{
private:
LLPrivateMemoryPoolManager(BOOL enabled, U32 max_pool_size) ;
~LLPrivateMemoryPoolManager() ;
public:
static LLPrivateMemoryPoolManager* getInstance() ;
static void initClass(BOOL enabled, U32 pool_size) ;
static void destroyClass() ;
LLPrivateMemoryPool* newPool(S32 type) ;
void deletePool(LLPrivateMemoryPool* pool) ;
private:
std::vector<LLPrivateMemoryPool*> mPoolList ;
U32 mMaxPrivatePoolSize;
static LLPrivateMemoryPoolManager* sInstance ;
static BOOL sPrivatePoolEnabled;
static std::vector<LLPrivateMemoryPool*> sDanglingPoolList ;
public:
//debug and statistics info.
void updateStatistics() ;
U32 mTotalReservedSize ;
U32 mTotalAllocatedSize ;
public:
#if __DEBUG_PRIVATE_MEM__
static char* allocate(LLPrivateMemoryPool* poolp, U32 size, const char* function, const int line) ;
typedef std::map<char*, std::string> mem_allocation_info_t ;
static mem_allocation_info_t sMemAllocationTracker;
#else
static char* allocate(LLPrivateMemoryPool* poolp, U32 size) ;
#endif
static void freeMem(LLPrivateMemoryPool* poolp, void* addr) ;
};
//-------------------------------------------------------------------------------------
#if __DEBUG_PRIVATE_MEM__
#define ALLOCATE_MEM(poolp, size) LLPrivateMemoryPoolManager::allocate((poolp), (size), __FUNCTION__, __LINE__)
#else
#define ALLOCATE_MEM(poolp, size) LLPrivateMemoryPoolManager::allocate((poolp), (size))
#endif
#define FREE_MEM(poolp, addr) LLPrivateMemoryPoolManager::freeMem((poolp), (addr))
//-------------------------------------------------------------------------------------
//
//the below singleton is used to test the private memory pool.
//
#if 0
class LL_COMMON_API LLPrivateMemoryPoolTester
{
private:
LLPrivateMemoryPoolTester() ;
~LLPrivateMemoryPoolTester() ;
public:
static LLPrivateMemoryPoolTester* getInstance() ;
static void destroy() ;
void run(S32 type) ;
private:
void correctnessTest() ;
void performanceTest() ;
void fragmentationtest() ;
void test(U32 min_size, U32 max_size, U32 stride, U32 times, bool random_deletion, bool output_statistics) ;
void testAndTime(U32 size, U32 times) ;
#if 0
public:
void* operator new(size_t size)
{
return (void*)sPool->allocate(size) ;
}
void operator delete(void* addr)
{
sPool->freeMem(addr) ;
}
void* operator new[](size_t size)
{
return (void*)sPool->allocate(size) ;
}
void operator delete[](void* addr)
{
sPool->freeMem(addr) ;
}
#endif
private:
static LLPrivateMemoryPoolTester* sInstance;
static LLPrivateMemoryPool* sPool ;
static LLPrivateMemoryPool* sThreadedPool ;
};
#if 0
//static
void* LLPrivateMemoryPoolTester::operator new(size_t size)
{
return (void*)sPool->allocate(size) ;
}
//static
void LLPrivateMemoryPoolTester::operator delete(void* addr)
{
sPool->free(addr) ;
}
//static
void* LLPrivateMemoryPoolTester::operator new[](size_t size)
{
return (void*)sPool->allocate(size) ;
}
//static
void LLPrivateMemoryPoolTester::operator delete[](void* addr)
{
sPool->free(addr) ;
}
#endif
#endif
// LLRefCount moved to llrefcount.h
// LLPointer moved to llpointer.h

View File

@ -51,6 +51,7 @@
// File constants
static const int MAX_HDR_LEN = 20;
static const S32 UNZIP_LLSD_MAX_DEPTH = 96;
static const char LEGACY_NON_HEADER[] = "<llsd>";
const std::string LLSD_BINARY_HEADER("LLSD/Binary");
const std::string LLSD_XML_HEADER("LLSD/XML");
@ -317,11 +318,11 @@ LLSDParser::LLSDParser()
LLSDParser::~LLSDParser()
{ }
S32 LLSDParser::parse(std::istream& istr, LLSD& data, S32 max_bytes)
S32 LLSDParser::parse(std::istream& istr, LLSD& data, S32 max_bytes, S32 max_depth)
{
mCheckLimits = (LLSDSerialize::SIZE_UNLIMITED == max_bytes) ? false : true;
mMaxBytesLeft = max_bytes;
return doParse(istr, data);
return doParse(istr, data, max_depth);
}
@ -403,7 +404,7 @@ LLSDNotationParser::~LLSDNotationParser()
{ }
// virtual
S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) const
{
// map: { string:object, string:object }
// array: [ object, object, object ]
@ -418,6 +419,10 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
// binary: b##"ff3120ab1" | b(size)"raw data"
char c;
c = istr.peek();
if (max_depth == 0)
{
return PARSE_FAILURE;
}
while(isspace(c))
{
// pop the whitespace.
@ -434,7 +439,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
{
case '{':
{
S32 child_count = parseMap(istr, data);
S32 child_count = parseMap(istr, data, max_depth - 1);
if((child_count == PARSE_FAILURE) || data.isUndefined())
{
parse_count = PARSE_FAILURE;
@ -453,7 +458,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
case '[':
{
S32 child_count = parseArray(istr, data);
S32 child_count = parseArray(istr, data, max_depth - 1);
if((child_count == PARSE_FAILURE) || data.isUndefined())
{
parse_count = PARSE_FAILURE;
@ -658,7 +663,7 @@ S32 LLSDNotationParser::doParse(std::istream& istr, LLSD& data) const
return parse_count;
}
S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map) const
S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) const
{
// map: { string:object, string:object }
map = LLSD::emptyMap();
@ -693,7 +698,7 @@ S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map) const
}
putback(istr, c);
LLSD child;
S32 count = doParse(istr, child);
S32 count = doParse(istr, child, max_depth);
if(count > 0)
{
// There must be a value for every key, thus
@ -718,7 +723,7 @@ S32 LLSDNotationParser::parseMap(std::istream& istr, LLSD& map) const
return parse_count;
}
S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array) const
S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array, S32 max_depth) const
{
// array: [ object, object, object ]
array = LLSD::emptyArray();
@ -737,7 +742,7 @@ S32 LLSDNotationParser::parseArray(std::istream& istr, LLSD& array) const
continue;
}
putback(istr, c);
S32 count = doParse(istr, child);
S32 count = doParse(istr, child, max_depth);
if(PARSE_FAILURE == count)
{
return PARSE_FAILURE;
@ -869,7 +874,7 @@ LLSDBinaryParser::~LLSDBinaryParser()
}
// virtual
S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data, S32 max_depth) const
{
/**
* Undefined: '!'<br>
@ -893,12 +898,16 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
{
return 0;
}
if (max_depth == 0)
{
return PARSE_FAILURE;
}
S32 parse_count = 1;
switch(c)
{
case '{':
{
S32 child_count = parseMap(istr, data);
S32 child_count = parseMap(istr, data, max_depth - 1);
if((child_count == PARSE_FAILURE) || data.isUndefined())
{
parse_count = PARSE_FAILURE;
@ -917,7 +926,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
case '[':
{
S32 child_count = parseArray(istr, data);
S32 child_count = parseArray(istr, data, max_depth - 1);
if((child_count == PARSE_FAILURE) || data.isUndefined())
{
parse_count = PARSE_FAILURE;
@ -1098,7 +1107,7 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
return parse_count;
}
S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const
S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map, S32 max_depth) const
{
map = LLSD::emptyMap();
U32 value_nbo = 0;
@ -1128,7 +1137,7 @@ S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const
}
}
LLSD child;
S32 child_count = doParse(istr, child);
S32 child_count = doParse(istr, child, max_depth);
if(child_count > 0)
{
// There must be a value for every key, thus child_count
@ -1152,7 +1161,7 @@ S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const
return parse_count;
}
S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array, S32 max_depth) const
{
array = LLSD::emptyArray();
U32 value_nbo = 0;
@ -1168,7 +1177,7 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
while((c != ']') && (count < size) && istr.good())
{
LLSD child;
S32 child_count = doParse(istr, child);
S32 child_count = doParse(istr, child, max_depth);
if(PARSE_FAILURE == child_count)
{
return PARSE_FAILURE;
@ -2257,7 +2266,7 @@ LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, std::istream& is,
return ZR_MEM_ERROR;
}
if (!LLSDSerialize::fromBinary(data, istr, cur_size))
if (!LLSDSerialize::fromBinary(data, istr, cur_size, UNZIP_LLSD_MAX_DEPTH))
{
// free(result);
if( result )
@ -2276,13 +2285,24 @@ LLUZipHelper::EZipRresult LLUZipHelper::unzip_llsd(LLSD& data, std::istream& is,
//and trailers are different for the formats.
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
{
if (size == 0)
{
LL_WARNS() << "No data to unzip." << LL_ENDL;
return NULL;
}
U8* result = NULL;
U32 cur_size = 0;
z_stream strm;
const U32 CHUNK = 0x4000;
U8 *in = new U8[size];
U8 *in = new(std::nothrow) U8[size];
if (in == NULL)
{
LL_WARNS() << "Memory allocation failure." << LL_ENDL;
return NULL;
}
is.read((char*) in, size);
U8 out[CHUNK];
@ -2334,7 +2354,10 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
U8* new_result = (U8*) realloc(result, cur_size + have);
if (new_result == NULL)
{
LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size
<< " bytes; requested " << cur_size + have
<< " bytes; total syze: ." << size << " bytes."
<< LL_ENDL;
inflateEnd(&strm);
if (result)
{

View File

@ -77,7 +77,7 @@ public:
* @return Returns the number of LLSD objects parsed into
* data. Returns PARSE_FAILURE (-1) on parse failure.
*/
S32 parse(std::istream& istr, LLSD& data, S32 max_bytes);
S32 parse(std::istream& istr, LLSD& data, S32 max_bytes, S32 max_depth = -1);
/** Like parse(), but uses a different call (istream.getline()) to read by lines
* This API is better suited for XML, where the parse cannot tell
@ -103,10 +103,12 @@ protected:
* caller.
* @param istr The input stream.
* @param data[out] The newly parse structured data.
* @param max_depth Max depth parser will check before exiting
* with parse error, -1 - unlimited.
* @return Returns the number of LLSD objects parsed into
* data. Returns PARSE_FAILURE (-1) on parse failure.
*/
virtual S32 doParse(std::istream& istr, LLSD& data) const = 0;
virtual S32 doParse(std::istream& istr, LLSD& data, S32 max_depth = -1) const = 0;
/**
* @brief Virtual default function for resetting the parser
@ -241,10 +243,12 @@ protected:
* caller.
* @param istr The input stream.
* @param data[out] The newly parse structured data. Undefined on failure.
* @param max_depth Max depth parser will check before exiting
* with parse error, -1 - unlimited.
* @return Returns the number of LLSD objects parsed into
* data. Returns PARSE_FAILURE (-1) on parse failure.
*/
virtual S32 doParse(std::istream& istr, LLSD& data) const;
virtual S32 doParse(std::istream& istr, LLSD& data, S32 max_depth = -1) const;
private:
/**
@ -252,18 +256,20 @@ private:
*
* @param istr The input stream.
* @param map The map to add the parsed data.
* @param max_depth Allowed parsing depth.
* @return Returns The number of LLSD objects parsed into data.
*/
S32 parseMap(std::istream& istr, LLSD& map) const;
S32 parseMap(std::istream& istr, LLSD& map, S32 max_depth) const;
/**
* @brief Parse an array from the istream.
*
* @param istr The input stream.
* @param array The array to append the parsed data.
* @param max_depth Allowed parsing depth.
* @return Returns The number of LLSD objects parsed into data.
*/
S32 parseArray(std::istream& istr, LLSD& array) const;
S32 parseArray(std::istream& istr, LLSD& array, S32 max_depth) const;
/**
* @brief Parse a string from the istream and assign it to data.
@ -314,10 +320,12 @@ protected:
* caller.
* @param istr The input stream.
* @param data[out] The newly parse structured data.
* @param max_depth Max depth parser will check before exiting
* with parse error, -1 - unlimited.
* @return Returns the number of LLSD objects parsed into
* data. Returns PARSE_FAILURE (-1) on parse failure.
*/
virtual S32 doParse(std::istream& istr, LLSD& data) const;
virtual S32 doParse(std::istream& istr, LLSD& data, S32 max_depth = -1) const;
/**
* @brief Virtual default function for resetting the parser
@ -362,10 +370,12 @@ protected:
* caller.
* @param istr The input stream.
* @param data[out] The newly parse structured data.
* @param max_depth Max depth parser will check before exiting
* with parse error, -1 - unlimited.
* @return Returns the number of LLSD objects parsed into
* data. Returns -1 on parse failure.
*/
virtual S32 doParse(std::istream& istr, LLSD& data) const;
virtual S32 doParse(std::istream& istr, LLSD& data, S32 max_depth = -1) const;
private:
/**
@ -373,18 +383,20 @@ private:
*
* @param istr The input stream.
* @param map The map to add the parsed data.
* @param max_depth Allowed parsing depth.
* @return Returns The number of LLSD objects parsed into data.
*/
S32 parseMap(std::istream& istr, LLSD& map) const;
S32 parseMap(std::istream& istr, LLSD& map, S32 max_depth) const;
/**
* @brief Parse an array from the istream.
*
* @param istr The input stream.
* @param array The array to append the parsed data.
* @param max_depth Allowed parsing depth.
* @return Returns The number of LLSD objects parsed into data.
*/
S32 parseArray(std::istream& istr, LLSD& array) const;
S32 parseArray(std::istream& istr, LLSD& array, S32 max_depth) const;
/**
* @brief Parse a string from the istream and assign it to data.
@ -800,16 +812,16 @@ public:
LLPointer<LLSDBinaryFormatter> f = new LLSDBinaryFormatter;
return f->format(sd, str, LLSDFormatter::OPTIONS_NONE);
}
static S32 fromBinary(LLSD& sd, std::istream& str, S32 max_bytes)
static S32 fromBinary(LLSD& sd, std::istream& str, S32 max_bytes, S32 max_depth = -1)
{
LLPointer<LLSDBinaryParser> p = new LLSDBinaryParser;
return p->parse(str, sd, max_bytes);
return p->parse(str, sd, max_bytes, max_depth);
}
static LLSD fromBinary(std::istream& str, S32 max_bytes)
static LLSD fromBinary(std::istream& str, S32 max_bytes, S32 max_depth = -1)
{
LLPointer<LLSDBinaryParser> p = new LLSDBinaryParser;
LLSD sd;
(void)p->parse(str, sd, max_bytes);
(void)p->parse(str, sd, max_bytes, max_depth);
return sd;
}
};

View File

@ -952,7 +952,7 @@ void LLSDXMLParser::parsePart(const char *buf, int len)
}
// virtual
S32 LLSDXMLParser::doParse(std::istream& input, LLSD& data) const
S32 LLSDXMLParser::doParse(std::istream& input, LLSD& data, S32 max_depth) const
{
#ifdef XML_PARSER_PERFORMANCE_TESTS
XML_Timer timer( &parseTime );

View File

@ -150,12 +150,15 @@ void LLThread::threadRun()
//LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL;
delete mRecorder;
mRecorder = nullptr;
// We're done with the run function, this thread is done executing now.
//NB: we are using this flag to sync across threads...we really need memory barriers here
mStatus = STOPPED;
delete mRecorder;
mRecorder = nullptr;
// Todo: add LLMutex per thread instead of flag?
// We are using "while (mStatus != STOPPED) {ms_sleep();}" everywhere.
mStatus = STOPPED;
return;
}

View File

@ -588,7 +588,6 @@ std::string LLImage::sLastErrorMessage;
LLMutex* LLImage::sMutex = NULL;
bool LLImage::sUseNewByteRange = false;
S32 LLImage::sMinimalReverseByteRangePercent = 75;
LLPrivateMemoryPool* LLImageBase::sPrivatePoolp = NULL ;
// <FS:ND> Report amount of failed buffer allocations
@ -611,8 +610,6 @@ void LLImage::initClass(bool use_new_byte_range, S32 minimal_reverse_byte_range_
sUseNewByteRange = use_new_byte_range;
sMinimalReverseByteRangePercent = minimal_reverse_byte_range_percent;
sMutex = new LLMutex();
LLImageBase::createPrivatePool() ;
}
//static
@ -620,8 +617,6 @@ void LLImage::cleanupClass()
{
delete sMutex;
sMutex = NULL;
LLImageBase::destroyPrivatePool() ;
}
//static
@ -659,25 +654,6 @@ LLImageBase::~LLImageBase()
deleteData(); // virtual
}
//static
void LLImageBase::createPrivatePool()
{
if(!sPrivatePoolp)
{
sPrivatePoolp = LLPrivateMemoryPoolManager::getInstance()->newPool(LLPrivateMemoryPool::STATIC_THREADED) ;
}
}
//static
void LLImageBase::destroyPrivatePool()
{
if(sPrivatePoolp)
{
LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp) ;
sPrivatePoolp = NULL ;
}
}
// virtual
void LLImageBase::dump()
{
@ -712,7 +688,7 @@ void LLImageBase::sanityCheck()
// virtual
void LLImageBase::deleteData()
{
FREE_MEM(sPrivatePoolp, mData) ;
ll_aligned_free_16(mData);
disclaimMem(mDataSize);
mDataSize = 0;
mData = NULL;
@ -752,7 +728,7 @@ U8* LLImageBase::allocateData(S32 size)
if (!mBadBufferAllocation && (!mData || size != mDataSize))
{
deleteData(); // virtual
mData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
mData = (U8*)ll_aligned_malloc_16(size);
if (!mData)
{
LL_WARNS() << "Failed to allocate image data size [" << size << "]" << LL_ENDL;
@ -780,7 +756,7 @@ U8* LLImageBase::allocateData(S32 size)
// virtual
U8* LLImageBase::reallocateData(S32 size)
{
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
U8 *new_datap = (U8*)ll_aligned_malloc_16(size);
if (!new_datap)
{
LL_WARNS() << "Out of memory in LLImageBase::reallocateData, size: " << size << LL_ENDL;
@ -790,7 +766,7 @@ U8* LLImageBase::reallocateData(S32 size)
{
S32 bytes = llmin(mDataSize, size);
memcpy(new_datap, mData, bytes); /* Flawfinder: ignore */
FREE_MEM(sPrivatePoolp, mData) ;
ll_aligned_free_16(mData) ;
}
mData = new_datap;
disclaimMem(mDataSize);
@ -1487,7 +1463,7 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
if (new_data_size > 0)
{
U8 *new_data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), new_data_size);
U8 *new_data = (U8*)ll_aligned_malloc_16(new_data_size);
if(NULL == new_data)
{
return false;
@ -2189,7 +2165,7 @@ void LLImageFormatted::appendData(U8 *data, S32 size)
S32 newsize = cursize + size;
reallocateData(newsize);
memcpy(getData() + cursize, data, size);
FREE_MEM(LLImageBase::getPrivatePool(), data);
ll_aligned_free_16(data);
}
}
}

View File

@ -71,7 +71,6 @@ const S32 HTTP_PACKET_SIZE = 1496;
class LLImageFormatted;
class LLImageRaw;
class LLColor4U;
class LLPrivateMemoryPool;
typedef enum e_image_codec
{
@ -160,10 +159,6 @@ public:
static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent);
static EImageCodec getCodecFromExtension(const std::string& exten);
static void createPrivatePool() ;
static void destroyPrivatePool() ;
static LLPrivateMemoryPool* getPrivatePool() {return sPrivatePoolp;}
//static LLTrace::MemStatHandle sMemStat;
@ -178,8 +173,6 @@ private:
bool mBadBufferAllocation ;
bool mAllowOverSize ;
static LLPrivateMemoryPool* sPrivatePoolp ;
public:
// <FS:ND> Report amount of failed buffer allocations
static void addAllocationError();

View File

@ -430,7 +430,7 @@ bool LLImageDXT::convertToDXR()
S32 nmips = calcNumMips(width,height);
S32 total_bytes = getDataSize();
U8* olddata = getData();
U8* newdata = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_bytes);
U8* newdata = (U8*)ll_aligned_malloc_16(total_bytes);
if (!newdata)
{
LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;

View File

@ -373,7 +373,7 @@ bool LLImageJ2C::loadAndValidate(const std::string &filename)
}
else
{
U8 *data = (U8*)ALLOCATE_MEM(LLImageBase::getPrivatePool(), file_size);
U8 *data = (U8*)ll_aligned_malloc_16(file_size);
if (!data)
{
infile.close();
@ -388,7 +388,7 @@ bool LLImageJ2C::loadAndValidate(const std::string &filename)
if (s != APR_SUCCESS || (S32)bytes_read != file_size)
{
FREE_MEM(LLImageBase::getPrivatePool(), data);
ll_aligned_free_16(data);
setLastError("Unable to read entire file");
res = false;
}

View File

@ -2952,15 +2952,41 @@ F32 LLVolume::sculptGetSurfaceArea()
return area;
}
// create placeholder shape
void LLVolume::sculptGeneratePlaceholder()
// create empty placeholder shape
void LLVolume::sculptGenerateEmptyPlaceholder()
{
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
S32 line = 0;
for (S32 s = 0; s < sizeS; s++)
{
for (S32 t = 0; t < sizeT; t++)
{
S32 i = t + line;
LLVector4a& pt = mMesh[i];
F32* p = pt.getF32ptr();
p[0] = 0;
p[1] = 0;
p[2] = 0;
llassert(pt.isFinite3());
}
line += sizeT;
}
}
// create sphere placeholder shape
void LLVolume::sculptGenerateSpherePlaceholder()
{
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
S32 line = 0;
// for now, this is a sphere.
for (S32 s = 0; s < sizeS; s++)
{
for (S32 t = 0; t < sizeT; t++)
@ -2968,12 +2994,12 @@ void LLVolume::sculptGeneratePlaceholder()
S32 i = t + line;
LLVector4a& pt = mMesh[i];
F32 u = (F32)s/(sizeS-1);
F32 v = (F32)t/(sizeT-1);
F32 u = (F32)s / (sizeS - 1);
F32 v = (F32)t / (sizeT - 1);
const F32 RADIUS = (F32) 0.3;
F32* p = pt.getF32ptr();
p[0] = (F32)(sin(F_PI * v) * cos(2.0 * F_PI * u) * RADIUS);
@ -2981,7 +3007,6 @@ void LLVolume::sculptGeneratePlaceholder()
p[2] = (F32)(cos(F_PI * v) * RADIUS);
llassert(pt.isFinite3());
}
line += sizeT;
}
@ -3144,9 +3169,9 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
}
// sculpt replaces generate() for sculpted surfaces
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level, bool visible_placeholder)
{
U8 sculpt_type = mParams.getSculptType();
U8 sculpt_type = mParams.getSculptType();
BOOL data_is_empty = FALSE;
@ -3194,13 +3219,22 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
if (area < SCULPT_MIN_AREA || area > SCULPT_MAX_AREA)
{
data_is_empty = TRUE;
visible_placeholder = true;
}
}
}
if (data_is_empty)
{
sculptGeneratePlaceholder();
if (visible_placeholder)
{
// Object should be visible since there will be nothing else to display
sculptGenerateSpherePlaceholder();
}
else
{
sculptGenerateEmptyPlaceholder();
}
}

View File

@ -1066,7 +1066,7 @@ public:
U32 mFaceMask; // bit array of which faces exist in this volume
LLVector3 mLODScaleBias; // vector for biasing LOD based on scale
void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level);
void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level, bool visible_placeholder);
// NaCl - Graphics crasher protection
void calcSurfaceArea(); // ZK LBG
@ -1080,7 +1080,8 @@ public:
private:
void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type);
F32 sculptGetSurfaceArea();
void sculptGeneratePlaceholder();
void sculptGenerateEmptyPlaceholder();
void sculptGenerateSpherePlaceholder();
void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t);

View File

@ -199,13 +199,21 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
LL_DEBUGS("AvNameCache") << "Entering coroutine " << LLCoros::instance().getName()
<< " with url '" << url << "', requesting " << agentIds.size() << " Agent Ids" << LL_ENDL;
// Check pointer that can be cleaned up by cleanupClass()
if (!sHttpRequest || !sHttpOptions || !sHttpHeaders)
{
LL_WARNS("AvNameCache") << " Trying to request name cache when http pointers are not initialized." << LL_ENDL;
return;
}
LLSD httpResults;
try
{
bool success = true;
LLCoreHttpUtil::HttpCoroutineAdapter httpAdapter("NameCache", LLAvatarNameCache::sHttpPolicy);
LLSD results = httpAdapter.getAndSuspend(sHttpRequest, url);
LLSD httpResults;
LL_DEBUGS() << results << LL_ENDL;
@ -244,6 +252,7 @@ void LLAvatarNameCache::requestAvatarNameCache_(std::string url, std::vector<LLU
{
LOG_UNHANDLED_EXCEPTION(STRINGIZE("coroutine " << LLCoros::instance().getName()
<< "('" << url << "', " << agentIds.size()
<< " http result: " << httpResults.asString()
<< " Agent Ids)"));
throw;
}
@ -354,6 +363,11 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id)
void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName& av_name)
{
if (agent_id.isNull())
{
return;
}
// Add to the cache
sCache[agent_id] = av_name;

View File

@ -1111,6 +1111,8 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
}
else if(message_name == "name_text")
{
mHistoryBackAvailable = message.getValueBoolean("history_back_available");
mHistoryForwardAvailable = message.getValueBoolean("history_forward_available");
mMediaName = message.getValue("name");
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_NAME_CHANGED);
}

View File

@ -31,6 +31,9 @@
// Freetype stuff
#include <ft2build.h>
#ifdef LL_WINDOWS
#include <freetype2\freetype\ftsystem.h>
#endif
// For some reason, this won't work if it's not wrapped in the ifdef
#ifdef FT_FREETYPE_H
@ -107,6 +110,10 @@ LLFontFreetype::LLFontFreetype()
mAscender(0.f),
mDescender(0.f),
mLineHeight(0.f),
#ifdef LL_WINDOWS
pFileStream(NULL),
pFtStream(NULL),
#endif
mIsFallback(FALSE),
mFTFace(NULL),
mRenderGlyphCount(0),
@ -134,6 +141,10 @@ LLFontFreetype::~LLFontFreetype()
std::for_each(mCharGlyphInfoMap.begin(), mCharGlyphInfoMap.end(), DeletePairedPointer());
mCharGlyphInfoMap.clear();
#ifdef LL_WINDOWS
delete pFileStream; // closed by FT_Done_Face
delete pFtStream;
#endif
delete mFontBitmapCachep;
// mFallbackFonts cleaned up by LLPointer destructor
@ -145,6 +156,21 @@ LLFontFreetype::~LLFontFreetype()
// </FS:ND>
}
#ifdef LL_WINDOWS
unsigned long ft_read_cb(FT_Stream stream, unsigned long offset, unsigned char *buffer, unsigned long count) {
if (count <= 0) return count;
llifstream *file_stream = static_cast<llifstream *>(stream->descriptor.pointer);
file_stream->seekg(offset, std::ios::beg);
file_stream->read((char*)buffer, count);
return file_stream->gcount();
}
void ft_close_cb(FT_Stream stream) {
llifstream *file_stream = static_cast<llifstream *>(stream->descriptor.pointer);
file_stream->close();
}
#endif
BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 vert_dpi, F32 horz_dpi, S32 components, BOOL is_fallback)
{
// Don't leak face objects. This is also needed to deal with
@ -157,13 +183,46 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
int error;
// <FS:ND> FIRE-7570. Only load/mmap fonts once. loadFont will either load a font into memory, or reuse an already loaded font.
// error = FT_New_Face( gFTLibrary,
// filename.c_str(),
// 0,
// &mFTFace );
// <FS:ND> FIRE-7570. Only load/mmap fonts once. loadFont will either load a font into memory, or reuse an already loaded font.
//#ifdef LL_WINDOWS
// pFileStream = new llifstream(filename, std::ios::binary);
// if (pFileStream->is_open())
// {
// std::streampos beg = pFileStream->tellg();
// pFileStream->seekg(0, std::ios::end);
// std::streampos end = pFileStream->tellg();
// std::size_t file_size = end - beg;
// pFileStream->seekg(0, std::ios::beg);
//
// pFtStream = new LLFT_Stream();
// pFtStream->base = 0;
// pFtStream->pos = 0;
// pFtStream->size = file_size;
// pFtStream->descriptor.pointer = pFileStream;
// pFtStream->read = ft_read_cb;
// pFtStream->close = ft_close_cb;
//
// FT_Open_Args args;
// args.flags = FT_OPEN_STREAM;
// args.stream = (FT_StreamRec*)pFtStream;
//
// error = FT_Open_Face(gFTLibrary,
// &args,
// 0,
// &mFTFace);
// }
// else
// {
// delete pFileStream;
// pFileStream = NULL;
// return FALSE;
// }
//#else
// error = FT_New_Face( gFTLibrary,
// filename.c_str(),
// 0,
// &mFTFace);
//#endif
FT_Open_Args openArgs;
memset( &openArgs, 0, sizeof( openArgs ) );
openArgs.memory_base = gFontManagerp->loadFont( filename, openArgs.memory_size );
@ -174,11 +233,19 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
openArgs.flags = FT_OPEN_MEMORY;
error = FT_Open_Face( gFTLibrary, &openArgs, 0, &mFTFace );
// </FS:ND>
// </FS:ND>
if (error)
if (error)
{
// <FS:ND> FIRE-7570. Only load/mmap fonts once. loadFont will either load a font into memory, or reuse an already loaded font.
//#ifdef LL_WINDOWS
// pFileStream->close();
// delete pFileStream;
// delete pFtStream;
// pFileStream = NULL;
// pFtStream = NULL;
//#endif
// </FS:ND>
return FALSE;
}
@ -195,6 +262,15 @@ BOOL LLFontFreetype::loadFace(const std::string& filename, F32 point_size, F32 v
{
// Clean up freetype libs.
FT_Done_Face(mFTFace);
// <FS:ND> FIRE-7570. Only load/mmap fonts once. loadFont will either load a font into memory, or reuse an already loaded font.
//#ifdef LL_WINDOWS
// pFileStream->close();
// delete pFileStream;
// delete pFtStream;
// pFileStream = NULL;
// pFtStream = NULL;
//#endif
// </FS:ND>
mFTFace = NULL;
return FALSE;
}

View File

@ -40,6 +40,8 @@
// We'll forward declare the struct here. JC
struct FT_FaceRec_;
typedef struct FT_FaceRec_* LLFT_Face;
struct FT_StreamRec_;
typedef struct FT_StreamRec_ LLFT_Stream;
// <FS:ND> FIRE-7570. Only load/mmap fonts once.
namespace nd
@ -179,6 +181,11 @@ private:
LLFT_Face mFTFace;
#ifdef LL_WINDOWS
llifstream *pFileStream;
LLFT_Stream *pFtStream;
#endif
BOOL mIsFallback;
font_vector_t mFallbackFonts; // A list of fallback fonts to look for glyphs in (for Unicode chars)

View File

@ -495,7 +495,7 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
if (!fontp->loadFace(font_path, extra_scale * point_size,
LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback))
{
LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << LL_ENDL;
LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << " from path " << local_path << LL_ENDL;
delete fontp;
fontp = NULL;
}

View File

@ -1359,8 +1359,19 @@ void LLGLManager::initExtensions()
if (mHasVertexShader)
{
LL_INFOS() << "initExtensions() VertexShader-related procs..." << LL_ENDL;
// nSight doesn't support use of ARB funcs that have been normalized in the API
if (!LLRender::sNsightDebugSupport)
{
glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocationARB");
glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocationARB");
}
else
{
glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glGetAttribLocation");
glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC)GLH_EXT_GET_PROC_ADDRESS("glBindAttribLocation");
}
glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) GLH_EXT_GET_PROC_ADDRESS("glGetActiveAttribARB");
glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dARB");
glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) GLH_EXT_GET_PROC_ADDRESS("glVertexAttrib1dvARB");

View File

@ -49,6 +49,7 @@ public:
enum EBoostLevel
{
BOOST_NONE = 0,
BOOST_ALM , //acts like NONE when ALM is on, max discard when ALM is off
BOOST_AVATAR_BAKED ,
BOOST_AVATAR ,
BOOST_CLOUDS ,

View File

@ -49,6 +49,7 @@ U32 LLRender::sUICalls = 0;
U32 LLRender::sUIVerts = 0;
U32 LLTexUnit::sWhiteTexture = 0;
bool LLRender::sGLCoreProfile = false;
bool LLRender::sNsightDebugSupport = false;
static const U32 LL_NUM_TEXTURE_LAYERS = 32;
static const U32 LL_NUM_LIGHT_UNITS = 8;

View File

@ -279,6 +279,13 @@ public:
SPECULAR_MAP,
NUM_TEXTURE_CHANNELS,
};
enum eVolumeTexIndex
{
LIGHT_TEX = 0,
SCULPT_TEX,
NUM_VOLUME_TEXTURE_CHANNELS,
};
typedef enum {
TRIANGLES = 0,
@ -453,7 +460,8 @@ public:
static U32 sUICalls;
static U32 sUIVerts;
static bool sGLCoreProfile;
static bool sNsightDebugSupport;
private:
friend class LLLightState;

View File

@ -98,7 +98,6 @@ U32 LLVertexBuffer::sCurVAOName = 1;
U32 LLVertexBuffer::sAllocatedIndexBytes = 0;
U32 LLVertexBuffer::sIndexCount = 0;
LLPrivateMemoryPool* LLVertexBuffer::sPrivatePoolp = NULL;
U32 LLVertexBuffer::sBindCount = 0;
U32 LLVertexBuffer::sSetCount = 0;
S32 LLVertexBuffer::sCount = 0;
@ -192,6 +191,10 @@ volatile U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
if (mUsage != GL_DYNAMIC_COPY_ARB)
{ //data will be provided by application
ret = (U8*) ll_aligned_malloc<64>(size);
if (!ret)
{
LL_ERRS() << "Failed to allocate for LLVBOPool buffer" << LL_ENDL;
}
}
}
else
@ -1020,11 +1023,6 @@ void LLVertexBuffer::initClass(bool use_vbo, bool no_vbo_mapping)
{
sEnableVBOs = use_vbo && gGLManager.mHasVertexBufferObject;
sDisableVBOMapping = sEnableVBOs && no_vbo_mapping;
if (!sPrivatePoolp)
{
sPrivatePoolp = LLPrivateMemoryPoolManager::getInstance()->newPool(LLPrivateMemoryPool::STATIC);
}
}
//static
@ -1067,17 +1065,11 @@ void LLVertexBuffer::cleanupClass()
sStreamVBOPool.cleanup();
sDynamicVBOPool.cleanup();
sDynamicCopyVBOPool.cleanup();
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
delete sUtilityBuffer;
sUtilityBuffer = NULL;
// </FS:Ansariel>
if(sPrivatePoolp)
{
LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp);
sPrivatePoolp = NULL;
}
}
//----------------------------------------------------------------------------
@ -1368,7 +1360,7 @@ bool LLVertexBuffer::createGLBuffer(U32 size)
{
static int gl_buffer_idx = 0;
mGLBuffer = ++gl_buffer_idx;
mMappedData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
mMappedData = (U8*)ll_aligned_malloc_16(size);
disclaimMem(mSize);
mSize = size;
claimMem(mSize);
@ -1410,7 +1402,7 @@ bool LLVertexBuffer::createGLIndices(U32 size)
}
else
{
mMappedIndexData = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
mMappedIndexData = (U8*)ll_aligned_malloc_16(size);
static int gl_buffer_idx = 0;
mGLIndices = ++gl_buffer_idx;
mIndicesSize = size;
@ -1433,7 +1425,7 @@ void LLVertexBuffer::destroyGLBuffer()
}
else
{
FREE_MEM(sPrivatePoolp, (void*) mMappedData);
ll_aligned_free_16((void*)mMappedData);
mMappedData = NULL;
mEmpty = true;
}
@ -1453,7 +1445,7 @@ void LLVertexBuffer::destroyGLIndices()
}
else
{
FREE_MEM(sPrivatePoolp, (void*) mMappedIndexData);
ll_aligned_free_16((void*)mMappedIndexData);
mMappedIndexData = NULL;
mEmpty = true;
}

View File

@ -102,6 +102,7 @@ LLBadge::LLBadge(const LLBadge::Params& p)
, mPaddingHoriz(p.padding_horiz)
, mPaddingVert(p.padding_vert)
, mParentScroller(NULL)
, mDrawAtParentTop(false)
{
if (mImage.isNull())
{
@ -319,7 +320,14 @@ void LLBadge::draw()
// Compute y position
if (mLocationOffsetVCenter == BADGE_OFFSET_NOT_SPECIFIED)
{
badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
if(mDrawAtParentTop)
{
badge_center_y = owner_rect.mTop - badge_height * 0.5f - 1;
}
else
{
badge_center_y = owner_rect.mBottom + owner_rect.getHeight() * mLocationPercentVCenter;
}
}
else
{

View File

@ -137,6 +137,8 @@ public:
const std::string getLabel() const { return wstring_to_utf8str(mLabel); }
void setLabel( const LLStringExplicit& label);
void setDrawAtParentTop(bool draw_at_top) { mDrawAtParentTop = draw_at_top;}
private:
LLPointer< LLUIImage > mBorderImage;
LLUIColor mBorderColor;
@ -164,6 +166,7 @@ private:
F32 mPaddingVert;
LLScrollContainer* mParentScroller;
bool mDrawAtParentTop;
};
// Build time optimization, generate once in .cpp file

View File

@ -92,6 +92,14 @@ void LLBadgeOwner::setBadgeVisibility(bool visible)
}
}
void LLBadgeOwner::setDrawBadgeAtTop(bool draw_at_top)
{
if (mBadge)
{
mBadge->setDrawAtParentTop(draw_at_top);
}
}
void LLBadgeOwner::addBadgeToParentHolder()
{
LLView * owner_view = mBadgeOwnerView.get();

View File

@ -48,6 +48,7 @@ public:
void setBadgeLabel(const LLStringExplicit& label);
// </FS:Ansariel>
void setBadgeVisibility(bool visible);
void setDrawBadgeAtTop(bool draw_at_top);
private:

View File

@ -36,6 +36,7 @@
#include <map>
LLTrans::template_map_t LLTrans::sStringTemplates;
LLTrans::template_map_t LLTrans::sDefaultStringTemplates;
LLStringUtil::format_map_t LLTrans::sDefaultArgs;
struct StringDef : public LLInitParam::Block<StringDef>
@ -76,7 +77,7 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa
LL_ERRS() << "Problem reading strings: " << xml_filename << LL_ENDL;
return false;
}
static bool default_strings_init = false;
sStringTemplates.clear();
sDefaultArgs.clear();
@ -86,7 +87,10 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa
{
LLTransTemplate xml_template(it->name, it->value);
sStringTemplates[xml_template.mName] = xml_template;
if (!default_strings_init)
{
sDefaultStringTemplates[xml_template.mName] = xml_template;
}
std::set<std::string>::const_iterator iter = default_args.find(xml_template.mName);
if (iter != default_args.end())
{
@ -96,6 +100,7 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa
sDefaultArgs[name] = xml_template.mText;
}
}
default_strings_init = true;
return true;
}
@ -138,12 +143,17 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root)
static LLTrace::BlockTimerStatHandle FTM_GET_TRANS("Translate string");
//static
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args, bool def_string)
{
// Don't care about time as much as call count. Make sure we're not
// calling LLTrans::getString() in an inner loop. JC
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
if (def_string)
{
return getDefString(xml_desc, msg_args);
}
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
if (iter != sStringTemplates.end())
{
@ -161,13 +171,38 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLStringUtil::
}
}
//static
std::string LLTrans::getDefString(const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
{
template_map_t::iterator iter = sDefaultStringTemplates.find(xml_desc);
if (iter != sDefaultStringTemplates.end())
{
std::string text = iter->second.mText;
LLStringUtil::format_map_t args = sDefaultArgs;
args.insert(msg_args.begin(), msg_args.end());
LLStringUtil::format(text, args);
return text;
}
else
{
LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
return "MissingString(" + xml_desc + ")";
}
}
//static
std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args)
std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args, bool def_string)
{
// Don't care about time as much as call count. Make sure we're not
// calling LLTrans::getString() in an inner loop. JC
LL_RECORD_BLOCK_TIME(FTM_GET_TRANS);
if (def_string)
{
return getDefString(xml_desc, msg_args);
}
template_map_t::iterator iter = sStringTemplates.find(xml_desc);
if (iter != sStringTemplates.end())
{
@ -182,6 +217,23 @@ std::string LLTrans::getString(const std::string &xml_desc, const LLSD& msg_args
}
}
//static
std::string LLTrans::getDefString(const std::string &xml_desc, const LLSD& msg_args)
{
template_map_t::iterator iter = sDefaultStringTemplates.find(xml_desc);
if (iter != sDefaultStringTemplates.end())
{
std::string text = iter->second.mText;
LLStringUtil::format(text, msg_args);
return text;
}
else
{
LL_WARNS_ONCE("configuration") << "Missing String in strings.xml: [" << xml_desc << "]" << LL_ENDL;
return "MissingString(" + xml_desc + ")";
}
}
//static
bool LLTrans::findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& msg_args)
{

View File

@ -76,8 +76,10 @@ public:
* @param args A list of substrings to replace in the string
* @returns Translated string
*/
static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args);
static std::string getString(const std::string &xml_desc, const LLSD& args);
static std::string getString(const std::string &xml_desc, const LLStringUtil::format_map_t& args, bool def_string = false);
static std::string getDefString(const std::string &xml_desc, const LLStringUtil::format_map_t& args);
static std::string getString(const std::string &xml_desc, const LLSD& args, bool def_string = false);
static std::string getDefString(const std::string &xml_desc, const LLSD& args);
static bool findString(std::string &result, const std::string &xml_desc, const LLStringUtil::format_map_t& args);
static bool findString(std::string &result, const std::string &xml_desc, const LLSD& args);
@ -92,7 +94,7 @@ public:
* @param xml_desc String's description
* @returns Translated string
*/
static std::string getString(const std::string &xml_desc)
static std::string getString(const std::string &xml_desc, bool def_string = false)
{
LLStringUtil::format_map_t empty;
return getString(xml_desc, empty);
@ -128,6 +130,7 @@ public:
private:
typedef std::map<std::string, LLTransTemplate > template_map_t;
static template_map_t sStringTemplates;
static template_map_t sDefaultStringTemplates;
static LLStringUtil::format_map_t sDefaultArgs;
};

View File

@ -208,7 +208,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name,
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "ca-bundle.crt");
}
U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &mask)

View File

@ -189,7 +189,7 @@ void LLDir_Mac::initAppDirs(const std::string &app_name,
mAppRODataDir = app_read_only_data_dir;
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "../Resources", "ca-bundle.crt");
}
//<FS:TS> Used by LGG's selection beams

View File

@ -226,7 +226,7 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name,
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
mCAFile = getExpandedFilename(LL_PATH_EXECUTABLE, "ca-bundle.crt");
}
U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string &mask)

View File

@ -285,7 +285,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name,
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
mCAFile = getExpandedFilename( LL_PATH_EXECUTABLE, "ca-bundle.crt" );
}
U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &mask)

View File

@ -52,13 +52,14 @@ S32 LLLFSThread::updateClass(U32 ms_elapsed)
//static
void LLLFSThread::cleanupClass()
{
llassert(sLocal != NULL);
sLocal->setQuitting();
while (sLocal->getPending())
{
sLocal->update(0);
}
delete sLocal;
sLocal = 0;
sLocal = NULL;
}
//----------------------------------------------------------------------------
@ -75,6 +76,7 @@ LLLFSThread::LLLFSThread(bool threaded) :
LLLFSThread::~LLLFSThread()
{
// mLocalAPRFilePoolp cleanup in LLThread
// ~LLQueuedThread() will be called here
}

View File

@ -2140,7 +2140,11 @@ time_t LLVFS::creationTime()
int errors = LLFile::stat(mDataFilename, &data_file_stat);
if (0 == errors)
{
return data_file_stat.st_ctime;
time_t creation_time = data_file_stat.st_ctime;
#if LL_DARWIN
creation_time = data_file_stat.st_birthtime;
#endif
return creation_time;
}
return 0;
}

View File

@ -69,6 +69,10 @@ const F32 ICON_FLASH_TIME = 0.5f;
#define WM_DPICHANGED 0x02E0
#endif
#ifndef USER_DEFAULT_SCREEN_DPI
#define USER_DEFAULT_SCREEN_DPI 96 // Win7
#endif
extern BOOL gDebugWindowProc;
LPWSTR gIconResource = IDI_APPLICATION;
@ -1551,7 +1555,10 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
(LLRender::sGLCoreProfile ? " core" : " compatibility") << " context." << LL_ENDL;
done = true;
if (LLRender::sGLCoreProfile)
// force sNoFixedFunction iff we're trying to use nsight debugging which does not support many legacy API uses
// nSight doesn't support use of legacy API funcs in the fixed function pipe
if (LLRender::sGLCoreProfile || LLRender::sNsightDebugSupport)
{
LLGLSLShader::sNoFixedFunction = true;
}

View File

@ -206,6 +206,8 @@ void MediaPluginCEF::onTitleChangeCallback(std::string title)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "name_text");
message.setValue("name", title);
message.setValueBoolean("history_back_available", mCEFLib->canGoBack());
message.setValueBoolean("history_forward_available", mCEFLib->canGoForward());
sendMessage(message);
}

View File

@ -1985,7 +1985,6 @@ set(viewer_APPSETTINGS_FILES
app_settings/viewerart.xml
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
packages-info.txt
)

View File

@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>

View File

@ -1 +1 @@
5.1.4
5.1.5

View File

@ -3958,7 +3958,7 @@
<key>Backup</key>
<integer>0</integer>
</map>
<key>DebugShowPrivateMem</key>
<key>DEPRECATED: DebugShowPrivateMem</key> <!-- deprecated (see MAINT-8091) -->
<map>
<key>Comment</key>
<string>Show Private Mem Info</string>
@ -8707,10 +8707,10 @@
<key>Value</key>
<real>600.0</real>
</map>
<key>MemoryPrivatePoolEnabled</key>
<key>MemoryPrivatePoolEnabled</key> <!-- deprecated (see MAINT-8091) -->
<map>
<key>Comment</key>
<string>Enable the private memory pool management</string>
<string>DEPRECATED: Enable the private memory pool management</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -8720,10 +8720,10 @@
<key>Backup</key>
<integer>0</integer>
</map>
<key>MemoryPrivatePoolSize</key>
<key>MemoryPrivatePoolSize</key> <!-- deprecated (see MAINT-8091) -->
<map>
<key>Comment</key>
<string>Size of the private memory pool in MB (min. value is 256)</string>
<string>DEPRECATED: Size of the private memory pool in MB (min. value is 256)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@ -11092,6 +11092,19 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderNsightDebugSupport</key>
<map>
<key>Comment</key>
<string>
Disable features which prevent nVidia nSight from being usable with SL. Requires restart.
</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>RenderLocalLights</key>
<map>
<key>Comment</key>

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DejaVuSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>CelestiaMediumRedux1.55.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DejaVuSansAllCaps.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DroidSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>MobiSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>LiberationSans-Regular.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>MobiSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>NotoSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>DroidSans.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -4,6 +4,7 @@
<font name="default" comment="default font files (global fallbacks)">
<file>Ubuntu-R.ttf</file>
<os name="Windows">
<file>meiryo.TTC</file>
<file>YuGothR.ttc</file>
<file>MSGOTHIC.TTC</file>
<file>gulim.ttc</file>

View File

@ -223,7 +223,7 @@ default
{
if (i & PERMISSION_TAKE_CONTROLS)
{
// This also cause the script to work in no-script sims
// This also cause the script to work in no-script parcels
llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT | CONTROL_UP | CONTROL_DOWN, TRUE, TRUE);
}
else if (i & PERMISSION_ATTACH)

View File

@ -103,34 +103,16 @@ class FSViewerManifest:
self.run_command_shell( "cd %s && objcopy --add-gnu-debuglink=%s %s" % (debugDir, debugName, fileBin) )
if( os.path.exists( "%s/firestorm-symbols-linux-%d.tar.bz2" % (self.args['configuration'].lower(), self.address_size)) ):
symName = "%s/Phoenix_%s_%s_%s_symbols-linux-%d.tar.bz2" % ( self.args['configuration'].lower(), self.fs_channel_legacy_oneword(),
'-'.join( self.args['version'] ), self.args['viewer_flavor'], self.address_size )
print( "Saving symbols %s" % symName )
os.rename("%s/firestorm-symbols-linux-%d.tar.bz2" % (self.args['configuration'].lower(), self.address_size), symName )
self.fs_save_symbols("linux")
def fs_linux_tar_excludes(self):
installer_name_components = ['Phoenix',self.app_name(),self.args.get('arch'),'.'.join(self.args['version'])]
installer_name = "_".join(installer_name_components)
return "--exclude=%s/bin/.debug" % installer_name
def fs_save_windows_symbols(self, substitution_strings):
#AO: Try to package up symbols
# New Method, for reading cross platform stack traces on a linux/mac host
if (os.path.exists("%s/firestorm-symbols-windows-%d.tar.bz2" % (self.args['configuration'].lower(),
self.address_size))):
# Rename to add version numbers
sName = "%s/Phoenix_%s_%s_%s_symbols-windows-%d.tar.bz2" % (self.args['configuration'].lower(),
self.fs_channel_legacy_oneword(),
substitution_strings['version_dashes'],
self.args['viewer_flavor'],
self.address_size)
def fs_save_windows_symbols(self):
self.fs_save_symbols("windows")
if os.path.exists( sName ):
os.unlink( sName )
os.rename("%s/firestorm-symbols-windows-%d.tar.bz2" % (self.args['configuration'].lower(), self.address_size), sName )
pdbName = "firestorm-bin.pdb"
try:
subprocess.check_call( [ "pdbcopy.exe" ,
@ -147,7 +129,7 @@ class FSViewerManifest:
# Python3 natively supports tar+xz via mode 'w:xz'. But we're stuck with Python2 for now.
symbolTar = tarfile.TarFile("%s/Phoenix_%s_%s_%s_pdbsymbols-windows-%d.tar" % (self.args['configuration'].lower(),
self.fs_channel_legacy_oneword(),
substitution_strings['version_dashes'],
'-'.join(self.args['version']),
self.args['viewer_flavor'],
self.address_size),
'w')
@ -183,3 +165,22 @@ class FSViewerManifest:
self.run_command_shell( "sudo -n chown root:root %s || exit 0" % ( filename) )
self.run_command_shell( "sudo -n chmod 4755 %s || exit 0" % ( filename) )
def fs_save_osx_symbols( self ):
self.fs_save_symbols("darwin")
def fs_save_symbols(self, osname):
if (os.path.exists("%s/firestorm-symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(),
osname,
self.address_size))):
# Rename to add version numbers
sName = "%s/Phoenix_%s_%s_%s_symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(),
self.fs_channel_legacy_oneword(),
'-'.join( self.args['version'] ),
self.args['viewer_flavor'],
osname,
self.address_size)
if os.path.exists( sName ):
os.unlink( sName )
os.rename("%s/firestorm-symbols-%s-%d.tar.bz2" % (self.args['configuration'].lower(), osname, self.address_size), sName)

View File

@ -4688,8 +4688,7 @@ void LLAgent::teleportRequest(const U64& region_handle, const LLVector3& pos_loc
// [/RLVa:KB]
{
LLViewerRegion* regionp = getRegion();
bool is_local = (region_handle == regionp->getHandle());
if(regionp && teleportCore(is_local))
if (regionp && teleportCore(region_handle == regionp->getHandle()))
{
LL_INFOS("") << "TeleportLocationRequest: '" << region_handle << "':"
<< pos_local << LL_ENDL;

View File

@ -2046,10 +2046,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
// [/RLVa:KB]
// Check whether it's the base outfit.
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1)
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
// [/SL:KB]
if (outfit_cat_id.isNull())
{
return false;
}

View File

@ -629,6 +629,7 @@ static void settings_to_globals()
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
LLRender::sNsightDebugSupport = gSavedSettings.getBOOL("RenderNsightDebugSupport");
// <FS:Ansariel> Vertex Array Objects are required in OpenGL core profile
//LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sUseVAO = LLRender::sGLCoreProfile ? TRUE : gSavedSettings.getBOOL("RenderUseVAO");
@ -957,7 +958,6 @@ bool LLAppViewer::init()
initMaxHeapSize() ;
LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));
LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
// write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues.
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
mDumpPath = logdir;
@ -1533,6 +1533,10 @@ bool LLAppViewer::frame()
{
ret = doFrame();
}
catch (const LLContinueError&)
{
LOG_UNHANDLED_EXCEPTION("");
}
catch (std::bad_alloc)
{
LLMemory::logMemoryInfo(TRUE);
@ -1546,7 +1550,14 @@ bool LLAppViewer::frame()
}
else
{
ret = doFrame();
try
{
ret = doFrame();
}
catch (const LLContinueError&)
{
LOG_UNHANDLED_EXCEPTION("");
}
}
return ret;
@ -1564,10 +1575,6 @@ bool LLAppViewer::doFrame()
// <FS:Ansariel> FIRE-22297: FPS limiter not working properly on Mac/Linux
LLTimer frameTimer;
//LLPrivateMemoryPoolTester::getInstance()->run(false) ;
//LLPrivateMemoryPoolTester::getInstance()->run(true) ;
//LLPrivateMemoryPoolTester::destroy() ;
nd::etw::logFrame(); // <FS:ND> Write the start of each frame. Even if our Provider (Firestorm) would be enabled, this has only light impact. Does nothing on OSX and Linux.
LL_RECORD_BLOCK_TIME(FTM_FRAME);
@ -1583,7 +1590,6 @@ bool LLAppViewer::doFrame()
//check memory availability information
checkMemory() ;
try // <FS:Ansariel> Don't crash on LLContinueError
{
// <FS:Ansariel> MaxFPS Viewer-Chui merge error
// Check if we need to restore rendering masks.
@ -1843,12 +1849,6 @@ bool LLAppViewer::doFrame()
pingMainloopTimeout("Main:End");
}
}
// <FS:Ansariel> Don't crash on LLContinueError
catch (const LLContinueError&)
{
LOG_UNHANDLED_EXCEPTION("");
}
// </FS:Ansariel>
if (LLApp::isExiting())
{
@ -1859,7 +1859,11 @@ bool LLAppViewer::doFrame()
}
// <FS:Ansariel> Cut down wait on logout; Need to terminate voice here because we need gServicePump!
LLVoiceClient::getInstance()->terminate();
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->terminate();
}
// </FS:Ansariel>
delete gServicePump;
@ -1919,7 +1923,10 @@ bool LLAppViewer::cleanup()
#endif
//dump scene loading monitor results
LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
if (LLSceneMonitor::instanceExists())
{
LLSceneMonitor::instance().dumpToFile(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "scene_monitor_results.csv"));
}
// There used to be an 'if (LLFastTimerView::sAnalyzePerformance)' block
// here, completely redundant with the one that occurs later in this same
@ -1962,8 +1969,12 @@ bool LLAppViewer::cleanup()
LLPluginProcessParent::shutdown();
// <FS:Ansariel> Cut down wait on logout; Need to terminate voice earlier because we need gServicePump!
//LLVoiceClient::getInstance()->terminate();
//if (LLVoiceClient::instanceExists())
//{
// LLVoiceClient::getInstance()->terminate();
//}
// </FS:Ansariel>
disconnectViewer();
LL_INFOS() << "Viewer disconnected" << LL_ENDL;
@ -2062,7 +2073,10 @@ bool LLAppViewer::cleanup()
// Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be deleted.
LLWorldMap::getInstance()->reset(); // release any images
if (LLWorldMap::instanceExists())
{
LLWorldMap::getInstance()->reset(); // release any images
}
LLCalc::cleanUp();
@ -2279,10 +2293,16 @@ bool LLAppViewer::cleanup()
LLURLHistory::saveFile("url_history.xml");
// save mute list. gMuteList used to also be deleted here too.
LLMuteList::getInstance()->cache(gAgent.getID());
if (gAgent.isInitialized() && LLMuteList::instanceExists())
{
LLMuteList::getInstance()->cache(gAgent.getID());
}
//save call log list
LLConversationLog::instance().cache();
if (LLConversationLog::instanceExists())
{
LLConversationLog::instance().cache();
}
if (mPurgeOnExit)
{
@ -2434,9 +2454,6 @@ bool LLAppViewer::cleanup()
LLMainLoopRepeater::instance().stop();
//release all private memory pools.
LLPrivateMemoryPoolManager::destroyClass() ;
ll_close_fail_log();
LLError::LLCallStacks::cleanup();
@ -3933,7 +3950,7 @@ LLSD LLAppViewer::getViewerInfo() const
return info;
}
std::string LLAppViewer::getViewerInfoString() const
std::string LLAppViewer::getViewerInfoString(bool default_string) const
{
std::ostringstream support;
@ -3943,7 +3960,7 @@ std::string LLAppViewer::getViewerInfoString() const
LLStringUtil::format_map_t args;
// allow the "Release Notes" URL label to be localized
args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes");
args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes", default_string);
for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap());
ii != iend; ++ii)
@ -3953,7 +3970,7 @@ std::string LLAppViewer::getViewerInfoString() const
// Scalar value
if (ii->second.isUndefined())
{
args[ii->first] = LLTrans::getString("none_text");
args[ii->first] = LLTrans::getString("none_text", default_string);
}
else
{
@ -3972,110 +3989,46 @@ std::string LLAppViewer::getViewerInfoString() const
}
// Now build the various pieces
support << LLTrans::getString("AboutHeader", args);
support << LLTrans::getString("AboutHeader", args, default_string);
//if (info.has("BUILD_CONFIG"))
//{
// support << "\n" << LLTrans::getString("BuildConfig", args);
// support << "\n" << LLTrans::getString("BuildConfig", args, default_string);
//}
if (info.has("REGION"))
{
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
support << "\n\n" << LLTrans::getString( (RlvActions::canShowLocation()) ? "AboutPosition" : "AboutPositionRLVShowLoc", args);
support << "\n\n" << LLTrans::getString( (RlvActions::canShowLocation()) ? "AboutPosition" : "AboutPositionRLVShowLoc", args, default_string);
// [/RLVa:KB]
// support << "\n\n" << LLTrans::getString("AboutPosition", args);
// support << "\n\n" << LLTrans::getString("AboutPosition", args, default_string);
}
support << "\n\n" << LLTrans::getString("AboutSystem", args);
support << "\n\n" << LLTrans::getString("AboutSystem", args, default_string);
support << "\n";
if (info.has("GRAPHICS_DRIVER_VERSION"))
{
support << "\n" << LLTrans::getString("AboutDriver", args);
support << "\n" << LLTrans::getString("AboutDriver", args, default_string);
}
support << "\n" << LLTrans::getString("AboutOGL", args);
//support << "\n\n" << LLTrans::getString("AboutSettings", args); // <FS> Custom sysinfo
support << "\n\n" << LLTrans::getString("AboutLibs", args);
support << "\n" << LLTrans::getString("AboutOGL", args, default_string);
//support << "\n\n" << LLTrans::getString("AboutSettings", args, default_string); // <FS> Custom sysinfo
support << "\n\n" << LLTrans::getString("AboutLibs", args, default_string);
// <FS> Custom sysinfo
if (info.has("BANDWIDTH")) //For added info in help floater
{
support << "\n" << LLTrans::getString("AboutSettings", args);
support << "\n" << LLTrans::getString("AboutSettings", args, default_string);
}
// </FS>
if (info.has("COMPILER"))
{
support << "\n" << LLTrans::getString("AboutCompiler", args);
support << "\n" << LLTrans::getString("AboutCompiler", args, default_string);
}
if (info.has("PACKETS_IN"))
{
support << '\n' << LLTrans::getString("AboutTraffic", args);
support << '\n' << LLTrans::getString("AboutTraffic", args, default_string);
}
// SLT timestamp
LLSD substitution;
substitution["datetime"] = (S32)time(NULL);//(S32)time_corrected();
support << "\n" << LLTrans::getString("AboutTime", substitution);
return support.str();
}
std::string LLAppViewer::getShortViewerInfoString() const
{
std::ostringstream support;
LLSD info(getViewerInfo());
support << LLTrans::getString("APP_NAME") << " " << info["VIEWER_VERSION_STR"].asString();
support << " (" << info["CHANNEL"].asString() << ")";
if (info.has("BUILD_CONFIG"))
{
support << "\n" << "Build Configuration " << info["BUILD_CONFIG"].asString();
}
if (info.has("REGION"))
{
support << "\n\n" << "You are at " << ll_vector3_from_sd(info["POSITION_LOCAL"]) << " in " << info["REGION"].asString();
support << " located at " << info["HOSTNAME"].asString() << " (" << info["HOSTIP"].asString() << ")";
support << "\n" << "SLURL: " << info["SLURL"].asString();
support << "\n" << "(Global coordinates " << ll_vector3_from_sd(info["POSITION"]) << ")";
support << "\n" << info["SERVER_VERSION"].asString();
}
support << "\n\n" << "CPU: " << info["CPU"].asString();
support << "\n" << "Memory: " << info["MEMORY_MB"].asString() << " MB";
support << "\n" << "OS: " << info["OS_VERSION"].asString();
support << "\n" << "Graphics Card: " << info["GRAPHICS_CARD"].asString() << " (" << info["GRAPHICS_CARD_VENDOR"].asString() << ")";
if (info.has("GRAPHICS_DRIVER_VERSION"))
{
support << "\n" << "Windows Graphics Driver Version: " << info["GRAPHICS_DRIVER_VERSION"].asString();
}
support << "\n" << "OpenGL Version: " << info["OPENGL_VERSION"].asString();
support << "\n\n" << "Window size:" << info["WINDOW_WIDTH"].asString() << "x" << info["WINDOW_HEIGHT"].asString();
support << "\n" << "Language: " << LLUI::getLanguage();
support << "\n" << "Font Size Adjustment: " << info["FONT_SIZE_ADJUSTMENT"].asString() << "pt";
support << "\n" << "UI Scaling: " << info["UI_SCALE"].asString();
support << "\n" << "Draw distance: " << info["DRAW_DISTANCE"].asString();
support << "\n" << "Bandwidth: " << info["NET_BANDWITH"].asString() << "kbit/s";
support << "\n" << "LOD factor: " << info["LOD_FACTOR"].asString();
support << "\n" << "Render quality: " << info["RENDER_QUALITY"].asString() << " / 7";
support << "\n" << "ALM: " << info["GPU_SHADERS"].asString();
support << "\n" << "Texture memory: " << info["TEXTURE_MEMORY"].asString() << "MB";
support << "\n" << "VFS (cache) creation time: " << info["VFS_TIME"].asString();
support << "\n\n" << "J2C Decoder: " << info["J2C_VERSION"].asString();
support << "\n" << "Audio Driver: " << info["AUDIO_DRIVER_VERSION"].asString();
support << "\n" << "LLCEFLib/CEF: " << info["LLCEFLIB_VERSION"].asString();
support << "\n" << "LibVLC: " << info["LIBVLC_VERSION"].asString();
support << "\n" << "Voice Server: " << info["VOICE_VERSION"].asString();
if (info.has("PACKETS_IN"))
{
support << "\n" << "Packets Lost: " << info["PACKETS_LOST"].asInteger() << "/" << info["PACKETS_IN"].asInteger();
F32 packets_pct = info["PACKETS_PCT"].asReal();
support << " (" << ll_round(packets_pct, 0.001f) << "%)";
}
LLSD substitution;
substitution["datetime"] = (S32)time(NULL);
support << "\n" << LLTrans::getString("AboutTime", substitution);
support << "\n" << LLTrans::getString("AboutTime", substitution, default_string);
return support.str();
}

View File

@ -99,8 +99,7 @@ public:
void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; }
LLSD getViewerInfo() const;
std::string getViewerInfoString() const;
std::string getShortViewerInfoString() const;
std::string getViewerInfoString(bool default_string = false) const;
// Report true if under the control of a debugger. A null-op default.
virtual bool beingDebugged() { return false; }

View File

@ -503,13 +503,10 @@ LLFacebookConnect::LLFacebookConnect()
void LLFacebookConnect::openFacebookWeb(std::string url)
{
// Open the URL in an internal browser window without navigation UI
LLFloaterWebContent::Params p;
p.url(url);
p.show_chrome(true);
p.allow_address_entry(false);
p.allow_back_forward_navigation(false);
p.trusted_content(true);
p.clean_browser(true);
LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p);
//the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).

View File

@ -491,18 +491,22 @@ void LLFastTimerView::onClose(bool app_quitting)
void saveChart(const std::string& label, const char* suffix, LLImageRaw* scratch)
{
//read result back into raw image
glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
// disable use of glReadPixels which messes up nVidia nSight graphics debugging
if (!LLRender::sNsightDebugSupport)
{
//read result back into raw image
glReadPixels(0, 0, 1024, 512, GL_RGB, GL_UNSIGNED_BYTE, scratch->getData());
//write results to disk
LLPointer<LLImagePNG> result = new LLImagePNG();
result->encode(scratch, 0.f);
//write results to disk
LLPointer<LLImagePNG> result = new LLImagePNG();
result->encode(scratch, 0.f);
std::string ext = result->getExtension();
std::string filename = llformat("%s_%s.%s", label.c_str(), suffix, ext.c_str());
std::string ext = result->getExtension();
std::string filename = llformat("%s_%s.%s", label.c_str(), suffix, ext.c_str());
std::string out_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
result->save(out_file);
std::string out_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
result->save(out_file);
}
}
//static
@ -960,8 +964,7 @@ void LLFastTimerView::doAnalysisDefault(std::string baseline, std::string target
base[label]["Samples"].asInteger());
}
// This currently crashes, possibly due to a race condition in shutdown:
// exportCharts(baseline, target);
exportCharts(baseline, target);
os.flush();
os.close();

View File

@ -32,6 +32,7 @@
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
#include "llviewerinventory.h"
#include "lltrans.h"
LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)
@ -118,6 +119,11 @@ void LLFilteredWearableListManager::populateList()
// Probably will also need to get items from Library (waiting for reply in EXT-6724).
if (item_array.empty() && gInventory.isCategoryComplete(gInventory.getRootFolderID()))
{
mWearableList->setNoItemsCommentText(LLTrans::getString("NoneFound"));
}
mWearableList->refreshList(item_array);
}

View File

@ -401,13 +401,10 @@ LLFlickrConnect::LLFlickrConnect()
void LLFlickrConnect::openFlickrWeb(std::string url)
{
// Open the URL in an internal browser window without navigation UI
LLFloaterWebContent::Params p;
p.url(url);
p.show_chrome(true);
p.allow_address_entry(false);
p.allow_back_forward_navigation(false);
p.trusted_content(true);
p.clean_browser(true);
LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p);
//the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems).

View File

@ -43,7 +43,7 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key)
{
}
void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data)
void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool update_offset)
{
F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
@ -52,7 +52,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data)
sldrCtrl->setValue(value,FALSE);
// <FS:Ansariel> Legacy baking avatar z-offset
//if (isAgentAvatarValid())
//if (isAgentAvatarValid() && update_offset)
//{
// LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
// LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
@ -77,7 +77,7 @@ BOOL LLFloaterHoverHeight::postBuild()
// Update slider on future pref changes.
if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
{
gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this));
gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, this, false));
}
else
{
@ -140,12 +140,6 @@ void LLFloaterHoverHeight::onFinalCommit()
// <FS:Ansariel> Legacy baking avatar z-offset
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ",value);
// <FS:Ansariel> Legacy baking avatar z-offset
//LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
// <FS:Ansariel> Legacy baking avatar z-offset
//gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
}
void LLFloaterHoverHeight::onRegionChanged()

View File

@ -39,7 +39,7 @@ public:
void onFinalCommit();
static void syncFromPreferenceSetting(void *user_data);
static void syncFromPreferenceSetting(void *user_data, bool update_offset = true);
void onRegionChanged();
void onSimulatorFeaturesReceived(const LLUUID &region_id);

View File

@ -845,7 +845,7 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
if (imagep)
{
mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0);
mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0, false);
}
const LLVolumeFace &vf = mVolume->getVolumeFace(0);

View File

@ -2277,6 +2277,7 @@ BOOL LLFloaterIMContainer::isFrontmost()
// This is intentional so it doesn't confuse the user. onClickCloseBtn() closes the whole floater.
void LLFloaterIMContainer::onClickCloseBtn(bool app_quitting/* = false*/)
{
gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", mConversationsPane->getRect().getWidth());
LLMultiFloater::closeFloater(app_quitting);
}

View File

@ -3026,6 +3026,9 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
// <FS:Ansariel> FIRE-18250: Option to disable default eye movement
getChildView("FSStaticEyes")->setEnabled(TRUE);
// <FS:Ansariel> FIRE-22564: Route llOwnerSay to scipt debug window
getChildView("FSllOwnerSayToScriptDebugWindow_checkbox")->setEnabled(TRUE);
}

View File

@ -314,19 +314,23 @@ void LLFloaterRegionInfo::requestRegionInfo()
void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
{
static LLDispatcher dispatch;
LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance<LLFloaterRegionInfo>("region_info");
if(!floater)
{
return;
}
// <FS:Ansariel> FIRE-22573: Always refresh windlight even if floater not open
//LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance<LLFloaterRegionInfo>("region_info");
//if(!floater)
//{
// return;
//}
// </FS:Ansariel>
if (!estate_dispatch_initialized)
{
LLPanelEstateInfo::initDispatch(dispatch);
}
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
// <FS:Ansariel> FIRE-22573: Always refresh windlight even if floater not open
//LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
//LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
// </FS:Ansariel>
// unpack the message
std::string request;
@ -342,6 +346,17 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
//dispatch the message
dispatch.dispatch(request, invoice, strings);
// <FS:Ansariel> FIRE-22573: Always refresh windlight even if floater not open
LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance<LLFloaterRegionInfo>("region_info");
if(!floater)
{
return;
}
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
// </FS:Ansariel>
panel->updateControls(gAgent.getRegion());
}
@ -349,6 +364,9 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
// static
void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
{
// <FS:Ansariel> FIRE-22573: Always refresh windlight even if floater not open
LLEnvManagerNew::instance().requestRegionSettings();
LLPanel* panel;
LLFloaterRegionInfo* floater = LLFloaterReg::findTypedInstance<LLFloaterRegionInfo>("region_info");
if(!floater)
@ -360,7 +378,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
// otherwise after we apply (send) updated region settings we won't get them back,
// so our environment won't be updated.
// This is also the way to know about externally changed region environment.
LLEnvManagerNew::instance().requestRegionSettings();
//LLEnvManagerNew::instance().requestRegionSettings(); // <FS:Ansariel> FIRE-22573: Always refresh windlight even if floater not open
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");

View File

@ -164,6 +164,7 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
mResourceDatap(new LLResourceData()),
mAvatarNameCacheConnection()
{
gIdleCallbacks.addFunction(onIdle, this);
}
// virtual
@ -227,6 +228,7 @@ LLFloaterReporter::~LLFloaterReporter()
{
mAvatarNameCacheConnection.disconnect();
}
gIdleCallbacks.deleteFunction(onIdle, this);
// child views automatically deleted
mObjectID = LLUUID::null;
@ -244,10 +246,21 @@ LLFloaterReporter::~LLFloaterReporter()
delete mResourceDatap;
}
// virtual
void LLFloaterReporter::draw()
void LLFloaterReporter::onIdle(void* user_data)
{
LLFloater::draw();
LLFloaterReporter* floater_reporter = (LLFloaterReporter*)user_data;
if (floater_reporter)
{
static LLCachedControl<F32> screenshot_delay(gSavedSettings, "AbuseReportScreenshotDelay");
if (floater_reporter->mSnapshotTimer.getStarted() && floater_reporter->mSnapshotTimer.getElapsedTimeF32() > screenshot_delay)
{
floater_reporter->mSnapshotTimer.stop();
// <FS:Ansariel> Refresh screenshot button
//floater_reporter->takeNewSnapshot();
floater_reporter->takeNewSnapshot(false);
// </FS:Ansariel>
}
}
}
void LLFloaterReporter::enableControls(BOOL enable)
@ -895,10 +908,7 @@ void LLFloaterReporter::onOpen(const LLSD& key)
{
childSetEnabled("send_btn", false);
//Time delay to avoid UI artifacts. MAINT-7067
// <FS:Ansariel> Refresh screenshot button
//doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
doAfterInterval(boost::bind(&LLFloaterReporter::takeNewSnapshot,this, false), gSavedSettings.getF32("AbuseReportScreenshotDelay"));
// </FS:Ansariel>
mSnapshotTimer.start();
}
void LLFloaterReporter::onLoadScreenshotDialog(const LLSD& notification, const LLSD& response)
@ -970,6 +980,7 @@ void LLFloaterReporter::setPosBox(const LLVector3d &pos)
void LLFloaterReporter::onClose(bool app_quitting)
{
mSnapshotTimer.stop();
gSavedPerAccountSettings.setBOOL("PreviousScreenshotForReport", app_quitting);
}

View File

@ -83,7 +83,8 @@ public:
/*virtual*/ BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
virtual void draw();
static void onIdle(void* user_data);
void setReportType(EReportType type) { mReportType = type; }
@ -154,6 +155,7 @@ private:
LLPointer<LLImageRaw> mImageRaw;
LLPointer<LLImageRaw> mPrevImageRaw;
LLFrameTimer mSnapshotTimer;
};
#endif

View File

@ -60,7 +60,7 @@ LLSnapshotFloaterView* gSnapshotFloaterView = NULL;
const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const S32 MAX_POSTCARD_DATASIZE = 1572864; // 1.5 megabyte, similar to simulator limit
const S32 MAX_TEXTURE_SIZE = 512 ; //max upload texture size 512 * 512
static LLDefaultChildRegistry::Register<LLSnapshotFloaterView> r("snapshot_floater_view");
@ -1418,6 +1418,11 @@ S32 LLFloaterSnapshot::notify(const LLSD& info)
return 0;
}
BOOL LLFloaterSnapshot::isWaitingState()
{
return (impl->getStatus() == ImplBase::STATUS_WORKING);
}
BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized)
{
LLFloaterFacebook* floater_facebook = LLFloaterReg::findTypedInstance<LLFloaterFacebook>("facebook");

View File

@ -165,6 +165,8 @@ public:
// </FS:Ansariel>
static void setAgentEmail(const std::string& email);
BOOL isWaitingState();
class Impl;
friend class Impl;

View File

@ -250,7 +250,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
&& have_extended_data)
{
columns[column_num]["column"] = "memory";
columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f));
columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1024.f));
columns[column_num++]["font"] = "SANSSERIF";
columns[column_num]["column"] = "URLs";

View File

@ -412,6 +412,9 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
}
else if(event == MEDIA_EVENT_NAME_CHANGED )
{
// flags are sent with this event
mBtnBack->setEnabled(self->getHistoryBackAvailable());
mBtnForward->setEnabled(self->getHistoryForwardAvailable());
std::string page_title = self->getMediaName();
// simulate browser behavior - title is empty, use the current URL
if (mShowPageTitle)

View File

@ -38,8 +38,10 @@ LLFloaterWebProfile::LLFloaterWebProfile(const Params& key) :
void LLFloaterWebProfile::onOpen(const LLSD& key)
{
Params p(key);
p.show_chrome(false).
window_class("profile");
p.show_chrome(true);
p.window_class("profile");
p.allow_address_entry(false);
p.trusted_content(true);
LLFloaterWebContent::onOpen(p);
applyPreferredRect();
}

View File

@ -752,10 +752,10 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
getChild<LLUICtrl>("teleport_coordinate_z")->setValue(LLSD(200.f));
}
// Don't re-request info if we already have it or we won't have it in time to teleport
if (mTrackedStatus != LLTracker::TRACKING_AVATAR || name != mTrackedAvatarName)
if (mTrackedStatus != LLTracker::TRACKING_AVATAR || avatar_id != mTrackedAvatarID)
{
mTrackedStatus = LLTracker::TRACKING_AVATAR;
mTrackedAvatarName = name;
mTrackedAvatarID = avatar_id;
LLTracker::trackAvatar(avatar_id, name);
centerOnTarget(TRUE);
}

View File

@ -222,7 +222,7 @@ private:
LLVector3d mTrackedLocation;
LLTracker::ETrackingStatus mTrackedStatus;
std::string mTrackedSimName;
std::string mTrackedAvatarName;
LLUUID mTrackedAvatarID;
LLSLURL mSLURL;
LLCtrlListInterface * mListFriendCombo;

View File

@ -1060,7 +1060,7 @@ public:
// unbind
if (texUnit)
{
texUnit->unbind(LLTexUnit::TT_TEXTURE);
texUnit->unbind(LLTexUnit::TT_TEXTURE);
}
// ensure that we delete these textures regardless of how we exit
LLImageGL::deleteTextures(source.size(), &source[0]);

View File

@ -7280,11 +7280,9 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
items.push_back(std::string("Wearable And Object Separator"));
items.push_back(std::string("Wearable Edit"));
bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID());
if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable)
if (((flags & FIRST_SELECTED_ITEM) == 0) || (item && !gAgentWearables.isWearableModifiable(item->getUUID())))
{
disabled_items.push_back(std::string("Wearable Edit"));
}

View File

@ -216,7 +216,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
// we're showing all folders, overriding filter
if (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)
{
return true;
return !gInventory.isCategoryHidden(folder_id);
}
// when applying a filter, matching folders get their contents downloaded first

View File

@ -362,6 +362,34 @@ LLViewerInventoryCategory* LLInventoryModel::getCategory(const LLUUID& id) const
return category;
}
bool LLInventoryModel::isCategoryHidden(const LLUUID& id) const
{
// <FS:Ansariel> Show inbox folder depending on FSShowInboxFolder setting
static LLCachedControl<bool> fsShowInboxFolder(gSavedSettings, "FSShowInboxFolder");
bool res = false;
const LLViewerInventoryCategory* category = getCategory(id);
if (category)
{
LLFolderType::EType cat_type = category->getPreferredType();
switch (cat_type)
{
case LLFolderType::FT_INBOX:
// <FS:Ansariel> Show inbox folder depending on FSShowInboxFolder setting
res = !fsShowInboxFolder;
break;
// </FS:Ansariel>
case LLFolderType::FT_OUTBOX:
case LLFolderType::FT_MARKETPLACE_LISTINGS:
res = true;
break;
default:
break;
}
}
return res;
}
S32 LLInventoryModel::getItemCount() const
{
return mItemMap.size();

View File

@ -341,7 +341,8 @@ public:
// Copy content of all folders of type "type" into folder "id" and delete/purge the empty folders
// Note : This method has been designed for FT_OUTBOX (aka Merchant Outbox) but can be used for other categories
void consolidateForType(const LLUUID& id, LLFolderType::EType type);
bool isCategoryHidden(const LLUUID& id) const;
// <FS:TT> ReplaceWornItemsOnly
void wearItemsOnAvatar(LLInventoryCategory* category);

View File

@ -1449,6 +1449,8 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
void LLInventoryPanel::purgeSelectedItems()
{
if (!mFolderRoot.get()) return;
const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList();
if (inventory_selected.empty()) return;
LLSD args;
@ -1469,6 +1471,8 @@ void LLInventoryPanel::purgeSelectedItems()
void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response)
{
if (!mFolderRoot.get()) return;
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{

View File

@ -361,8 +361,9 @@ void LLLocalBitmap::replaceIDs(LLUUID old_id, LLUUID new_id)
updateUserPrims(old_id, new_id, LLRender::DIFFUSE_MAP);
updateUserPrims(old_id, new_id, LLRender::NORMAL_MAP);
updateUserPrims(old_id, new_id, LLRender::SPECULAR_MAP);
updateUserSculpts(old_id, new_id); // isn't there supposed to be an IMG_DEFAULT_SCULPT or something?
updateUserVolumes(old_id, new_id, LLRender::LIGHT_TEX);
updateUserVolumes(old_id, new_id, LLRender::SCULPT_TEX); // isn't there supposed to be an IMG_DEFAULT_SCULPT or something?
// default safeguard image for layers
if( new_id == IMG_DEFAULT )
@ -505,26 +506,39 @@ void LLLocalBitmap::updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel)
}
}
}
}
void LLLocalBitmap::updateUserSculpts(LLUUID old_id, LLUUID new_id)
void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel)
{
LLViewerFetchedTexture* old_texture = gTextureList.findImage(old_id, TEX_LIST_STANDARD);
for(U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(); volume_iter++)
for (U32 volume_iter = 0; volume_iter < old_texture->getNumVolumes(channel); volume_iter++)
{
LLVOVolume* volume_to_object = (*old_texture->getVolumeList())[volume_iter];
LLViewerObject* object = (LLViewerObject*)volume_to_object;
if(object)
LLVOVolume* volobjp = (*old_texture->getVolumeList(channel))[volume_iter];
switch (channel)
{
if (object->isSculpted() && object->getVolume() &&
object->getVolume()->getParams().getSculptID() == old_id)
case LLRender::LIGHT_TEX:
{
LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLSculptParams new_params(*old_params);
new_params.setSculptTexture(new_id, (*old_params).getSculptType());
object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
if (volobjp->getLightTextureID() == old_id)
{
volobjp->setLightTextureID(new_id);
}
break;
}
case LLRender::SCULPT_TEX:
{
LLViewerObject* object = (LLViewerObject*)volobjp;
if (object)
{
if (object->isSculpted() && object->getVolume() &&
object->getVolume()->getParams().getSculptID() == old_id)
{
LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLSculptParams new_params(*old_params);
new_params.setSculptTexture(new_id, (*old_params).getSculptType());
object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE);
}
}
}
}
}

View File

@ -64,7 +64,7 @@ class LLLocalBitmap
void replaceIDs(LLUUID old_id, LLUUID new_id);
std::vector<LLViewerObject*> prepUpdateObjects(LLUUID old_id, U32 channel);
void updateUserPrims(LLUUID old_id, LLUUID new_id, U32 channel);
void updateUserSculpts(LLUUID old_id, LLUUID new_id);
void updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel);
void updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableType::EType type);
LLAvatarAppearanceDefines::ETextureIndex getTexIndex(LLWearableType::EType type, LLAvatarAppearanceDefines::EBakedTextureIndex baked_texind);

View File

@ -284,6 +284,10 @@ bool LLLoginInstance::handleLoginEvent(const LLSD& event)
void LLLoginInstance::handleLoginFailure(const LLSD& event)
{
// TODO: we are handling failure in two separate places -
// here and in STATE_LOGIN_PROCESS_RESPONSE processing
// consider uniting them.
// Login has failed.
// Figure out why and respond...
LLSD response = event["data"];
@ -353,6 +357,8 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
else if( reason_response == "key"
|| reason_response == "presence"
|| reason_response == "connect"
|| !message_response.empty() // will be handled in STATE_LOGIN_PROCESS_RESPONSE
|| !response["message_id"].asString().empty()
)
{
// these are events that have already been communicated elsewhere

View File

@ -851,6 +851,12 @@ LLMeshRepoThread::~LLMeshRepoThread()
mHttpRequestSet.clear();
mHttpHeaders.reset();
while (!mDecompositionQ.empty())
{
delete mDecompositionQ.front();
mDecompositionQ.pop_front();
}
delete mHttpRequest;
mHttpRequest = NULL;
delete mMutex;
@ -1141,38 +1147,46 @@ void LLMeshRepoThread::constructUrl(LLUUID mesh_id, std::string * url, int * leg
if (gAgent.getRegion())
{
LLMutexLock lock(mMutex);
// <FS:Ansariel> [UDP Assets]
//res_url = mGetMeshCapability;
if (!mGetMeshCapability.empty() && mLegacyGetMeshVersion == 0)
{
res_url = mGetMeshCapability;
LLMutexLock lock(mMutex);
// <FS:Ansariel> [UDP Assets]
//res_url = mGetMeshCapability;
if (!mGetMeshCapability.empty() && mLegacyGetMeshVersion == 0)
{
res_url = mGetMeshCapability;
}
else if (!mLegacyGetMesh2Capability.empty() && mLegacyGetMeshVersion > 1)
{
res_url = mLegacyGetMesh2Capability;
res_version = 2;
}
else
{
res_url = mLegacyGetMeshCapability;
res_version = 1;
}
// </FS:Ansariel> [UDP Assets]
}
else if (!mLegacyGetMesh2Capability.empty() && mLegacyGetMeshVersion > 1)
if (!res_url.empty())
{
res_url = mLegacyGetMesh2Capability;
res_version = 2;
res_url += "/?mesh_id=";
res_url += mesh_id.asString().c_str();
}
else
{
res_url = mLegacyGetMeshCapability;
res_version = 1;
// <FS:Ansariel> [UDP Assets]
//LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability! Cannot load meshes. Region id: "
LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset or GetMesh capability! Cannot load "
// </FS:Ansariel> [UDP Assets
<< gAgent.getRegion()->getRegionID() << LL_ENDL;
LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
}
// </FS:Ansariel> [UDP Assets]
}
if (! res_url.empty())
{
res_url += "/?mesh_id=";
res_url += mesh_id.asString().c_str();
}
else
{
// <FS:Ansariel> [UDP Assets]
//LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability! Cannot load "
LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset or GetMesh capability! Cannot load "
// </FS:Ansariel> [UDP Assets]
<< mesh_id << ".mesh" << LL_ENDL;
LL_WARNS_ONCE(LOG_MESH) << "Current region is not loaded so there is no capability to load from! Cannot load meshes." << LL_ENDL;
LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
}
*url = res_url;
@ -1701,7 +1715,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
if (!zero)
{ //attempt to parse
if (lodReceived(mesh_params, lod, buffer, size))
if (lodReceived(mesh_params, lod, buffer, size) == MESH_OK)
{
delete[] buffer;
return true;
@ -1824,11 +1838,11 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat
return true;
}
bool LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size)
EMeshProcessingResult LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size)
{
if (data == NULL || data_size == 0)
{
return false;
return MESH_NO_DATA;
}
LLPointer<LLVolume> volume = new LLVolume(mesh_params, LLVolumeLODGroup::getVolumeScaleFromDetail(lod));
@ -1841,7 +1855,7 @@ bool LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U
catch (std::bad_alloc)
{
// out of memory, we won't be able to process this mesh
return false;
return MESH_OUT_OF_MEMORY;
}
if (volume->unpackVolumeFaces(stream, data_size))
@ -1853,11 +1867,11 @@ bool LLMeshRepoThread::lodReceived(const LLVolumeParams& mesh_params, S32 lod, U
LLMutexLock lock(mMutex);
mLoadedQ.push(mesh);
}
return true;
return MESH_OK;
}
}
return false;
return MESH_UNKNOWN;
}
bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size)
@ -2031,6 +2045,9 @@ LLMeshUploadThread::~LLMeshUploadThread()
{
delete mHttpRequest;
mHttpRequest = NULL;
delete mMutex;
mMutex = NULL;
}
LLMeshUploadThread::DecompRequest::DecompRequest(LLModel* mdl, LLModel* base_model, LLMeshUploadThread* thread)
@ -3045,6 +3062,11 @@ void LLMeshHandlerBase::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespo
body->read(body_offset, (char *) data, data_size - body_offset);
LLMeshRepository::sBytesReceived += data_size;
}
else
{
LL_WARNS(LOG_MESH) << "Failed to allocate " << data_size - body_offset << " memory for mesh response" << LL_ENDL;
processFailure(LLCore::HttpStatus(LLCore::HttpStatus::LLCORE, LLCore::HE_BAD_ALLOC));
}
}
processData(body, body_offset, data, data_size - body_offset);
@ -3223,27 +3245,43 @@ void LLMeshLODHandler::processData(LLCore::BufferArray * /* body */, S32 /* body
U8 * data, S32 data_size)
{
if ((!MESH_LOD_PROCESS_FAILED)
&& ((data != NULL) == (data_size > 0)) // if we have data but no size or have size but no data, something is wrong
&& gMeshRepo.mThread->lodReceived(mMeshParams, mLOD, data, data_size))
&& ((data != NULL) == (data_size > 0))) // if we have data but no size or have size but no data, something is wrong
{
// good fetch from sim, write to VFS for caching
LLVFile file(gVFS, mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLVFile::WRITE);
S32 offset = mOffset;
S32 size = mRequestedBytes;
if (file.getSize() >= offset+size)
EMeshProcessingResult result = gMeshRepo.mThread->lodReceived(mMeshParams, mLOD, data, data_size);
if (result == MESH_OK)
{
file.seek(offset);
file.write(data, size);
LLMeshRepository::sCacheBytesWritten += size;
++LLMeshRepository::sCacheWrites;
// good fetch from sim, write to VFS for caching
LLVFile file(gVFS, mMeshParams.getSculptID(), LLAssetType::AT_MESH, LLVFile::WRITE);
S32 offset = mOffset;
S32 size = mRequestedBytes;
if (file.getSize() >= offset+size)
{
file.seek(offset);
file.write(data, size);
LLMeshRepository::sCacheBytesWritten += size;
++LLMeshRepository::sCacheWrites;
}
}
else
{
LL_WARNS(LOG_MESH) << "Error during mesh LOD processing. ID: " << mMeshParams.getSculptID()
<< ", Reason: " << result
<< " LOD: " << mLOD
<< " Data size: " << data_size
<< " Not retrying."
<< LL_ENDL;
LLMutexLock lock(gMeshRepo.mThread->mMutex);
gMeshRepo.mThread->mUnavailableQ.push(LLMeshRepoThread::LODRequest(mMeshParams, mLOD));
}
}
else
{
LL_WARNS(LOG_MESH) << "Error during mesh LOD processing. ID: " << mMeshParams.getSculptID()
<< ", Unknown reason. Not retrying."
<< " LOD: " << mLOD
<< " Data size: " << data_size
<< LL_ENDL;
LLMutexLock lock(gMeshRepo.mThread->mMutex);
gMeshRepo.mThread->mUnavailableQ.push(LLMeshRepoThread::LODRequest(mMeshParams, mLOD));
@ -3396,6 +3434,7 @@ void LLMeshPhysicsShapeHandler::processData(LLCore::BufferArray * /* body */, S3
LLMeshRepository::LLMeshRepository()
: mMeshMutex(NULL),
mDecompThread(NULL),
mMeshThreadCount(0),
mLegacyGetMeshVersion(0), // <FS:Ansariel> [UDP Assets]
mThread(NULL)
@ -3426,6 +3465,8 @@ void LLMeshRepository::init()
void LLMeshRepository::shutdown()
{
LL_INFOS(LOG_MESH) << "Shutting down mesh repository." << LL_ENDL;
llassert(mThread != NULL);
llassert(mThread->mSignal != NULL);
metrics_teleport_started_signal.disconnect();

View File

@ -53,6 +53,15 @@ class LLCondition;
class LLVFS;
class LLMeshRepository;
typedef enum e_mesh_processing_result_enum
{
MESH_OK = 0,
MESH_NO_DATA = 1,
MESH_OUT_OF_MEMORY,
MESH_HTTP_REQUEST_FAILED,
MESH_UNKNOWN
} EMeshProcessingResult;
class LLMeshUploadData
{
public:
@ -306,7 +315,7 @@ public:
bool fetchMeshHeader(const LLVolumeParams& mesh_params);
bool fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
bool headerReceived(const LLVolumeParams& mesh_params, U8* data, S32 data_size);
bool lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size);
EMeshProcessingResult lodReceived(const LLVolumeParams& mesh_params, S32 lod, U8* data, S32 data_size);
bool skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
bool decompositionReceived(const LLUUID& mesh_id, U8* data, S32 data_size);
bool physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 data_size);

View File

@ -415,12 +415,12 @@ void LLFloaterMove::initMovementMode()
{
initMovementMode = MM_FLY;
}
setMovementMode(initMovementMode);
mCurrentMode = initMovementMode;
bool hide_mode_buttons = (MM_FLY == mCurrentMode) || (isAgentAvatarValid() && gAgentAvatarp->isSitting());
if (isAgentAvatarValid())
{
showModeButtons(!gAgentAvatarp->isSitting());
}
updateButtonsWithMovementMode(mCurrentMode);
showModeButtons(!hide_mode_buttons);
}
void LLFloaterMove::setModeTooltip(const EMovementMode mode)

View File

@ -1279,6 +1279,13 @@ LLUUID LLOutfitGallery::getDefaultPhoto()
void LLOutfitGallery::onTexturePickerCommit(LLTextureCtrl::ETexturePickOp op, LLUUID id)
{
LLUUID selected_outfit_id = getSelectedOutfitUUID();
if (selected_outfit_id.isNull())
{
return;
}
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (floaterp && op == LLTextureCtrl::TEXTURE_SELECT)
@ -1328,8 +1335,8 @@ void LLOutfitGallery::onTexturePickerCommit(LLTextureCtrl::ETexturePickOp op, LL
return;
}
checkRemovePhoto(getSelectedOutfitUUID());
linkPhotoToOutfit(image_item_id, getSelectedOutfitUUID());
checkRemovePhoto(selected_outfit_id);
linkPhotoToOutfit(image_item_id, selected_outfit_id);
}
}

View File

@ -1193,15 +1193,15 @@ bool LLOutfitContextMenu::onEnable(LLSD::String param)
bool LLOutfitContextMenu::onVisible(LLSD::String param)
{
LLUUID outfit_cat_id = mUUIDs.back();
bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id;
if ("edit" == param)
{
bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == outfit_cat_id;
return is_worn;
}
else if ("wear_replace" == param)
{
return !is_worn;
return true;
}
else if ("delete" == param)
{

View File

@ -1770,7 +1770,7 @@ void LLPanelEditWearable::initPreviousAlphaTextures()
initPreviousAlphaTextureEntry(TEX_UPPER_ALPHA);
initPreviousAlphaTextureEntry(TEX_HEAD_ALPHA);
initPreviousAlphaTextureEntry(TEX_EYES_ALPHA);
initPreviousAlphaTextureEntry(TEX_LOWER_ALPHA);
initPreviousAlphaTextureEntry(TEX_HAIR_ALPHA);
}
void LLPanelEditWearable::initPreviousAlphaTextureEntry(LLAvatarAppearanceDefines::ETextureIndex te)

View File

@ -161,6 +161,7 @@ void LLInboxFolderViewFolder::draw()
if (!hasBadgeHolderParent())
{
addBadgeToParentHolder();
setDrawBadgeAtTop(true);
}
setBadgeVisibility(mFresh);

View File

@ -539,6 +539,7 @@ void LLPanelNearByMedia::removeListItem(const LLUUID &id)
if (NULL == mMediaList) return;
mMediaList->deleteSingleItem(mMediaList->getItemIndex(id));
mMediaList->updateLayout();
}
void LLPanelNearByMedia::refreshParcelItems()
@ -1107,7 +1108,7 @@ void LLPanelNearByMedia::updateControls()
else {
showBasicControls(!impl->isMediaDisabled(),
! impl->isParcelMedia(), // include_zoom
LLViewerMediaFocus::getInstance()->isZoomed(),
LLViewerMediaFocus::getInstance()->isZoomedOnMedia(impl->getMediaTextureID()),
impl->getVolume() == 0.0,
impl->getVolume());
}

View File

@ -2177,9 +2177,14 @@ void LLPanelObject::sendRotation(BOOL btn_down)
rotation = rotation * ~mRootObject->getRotationRegion();
// ## Zi: Building spin controls for attachments
}
// To include avatars into movements and rotation
// If false, all children are selected anyway - move avatar
// If true, not all children are selected - save positions
bool individual_selection = gSavedSettings.getBOOL("EditLinkedParts");
std::vector<LLVector3>& child_positions = mObject->mUnselectedChildrenPositions ;
std::vector<LLQuaternion> child_rotations;
if (mObject->isRootEdit())
if (mObject->isRootEdit() && individual_selection)
{
mObject->saveUnselectedChildrenRotation(child_rotations) ;
mObject->saveUnselectedChildrenPosition(child_positions) ;
@ -2189,8 +2194,8 @@ void LLPanelObject::sendRotation(BOOL btn_down)
LLManip::rebuild(mObject) ;
// for individually selected roots, we need to counterrotate all the children
if (mObject->isRootEdit())
{
if (mObject->isRootEdit() && individual_selection)
{
mObject->resetChildrenRotationAndPosition(child_rotations, child_positions) ;
}

View File

@ -776,6 +776,13 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// [/RLVa:KB]
}
items.push_back(std::string("Task Properties"));
// <FS:Ansariel> Legacy object properties
//if ((flags & FIRST_SELECTED_ITEM) == 0)
if (!gSavedSettings.getBOOL("FSUseLegacyObjectProperties") && (flags & FIRST_SELECTED_ITEM) == 0)
// </FS:Ansariel>
{
disabled_items.push_back(std::string("Task Properties"));
}
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
items.push_back(std::string("Task Rename"));
if ( (!isItemRenameable()) || ((flags & FIRST_SELECTED_ITEM) == 0) )
@ -1136,6 +1143,13 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
items.push_back(std::string("Task Properties"));
// <FS:Ansariel> Legacy object properties
//if ((flags & FIRST_SELECTED_ITEM) == 0)
if (!gSavedSettings.getBOOL("FSUseLegacyObjectProperties") && (flags & FIRST_SELECTED_ITEM) == 0)
// </FS:Ansariel>
{
disabled_items.push_back(std::string("Task Properties"));
}
if(isItemRenameable())
{
items.push_back(std::string("Task Rename"));
@ -1525,6 +1539,13 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
}
items.push_back(std::string("Task Properties"));
// <FS:Ansariel> Legacy object properties
//if ((flags & FIRST_SELECTED_ITEM) == 0)
if (!gSavedSettings.getBOOL("FSUseLegacyObjectProperties") && (flags & FIRST_SELECTED_ITEM) == 0)
// </FS:Ansariel>
{
disabled_items.push_back(std::string("Task Properties"));
}
if(isItemRenameable())
{
items.push_back(std::string("Task Rename"));

View File

@ -95,7 +95,7 @@ public:
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
registrar.add("Gear.Edit", boost::bind(&edit_outfit));
registrar.add("Gear.TakeOff", boost::bind(&LLWearingGearMenu::onTakeOff, this));
registrar.add("Gear.TakeOff", boost::bind(&LLPanelWearing::onRemoveItem, mPanelWearing));
registrar.add("Gear.Copy", boost::bind(&LLPanelWearing::copyToClipboard, mPanelWearing));
enable_registrar.add("Gear.OnEnable", boost::bind(&LLPanelWearing::isActionEnabled, mPanelWearing, _2));
@ -109,13 +109,6 @@ public:
private:
void onTakeOff()
{
uuid_vec_t selected_uuids;
mPanelWearing->getSelectedItemsUUIDs(selected_uuids);
LLAppearanceMgr::instance().removeItemsFromAvatar(selected_uuids);
}
LLToggleableMenu* mMenu;
LLPanelWearing* mPanelWearing;
};
@ -412,7 +405,18 @@ bool LLPanelWearing::isActionEnabled(const LLSD& userdata)
if (command_name == "take_off")
{
return hasItemSelected() && canTakeOffSelected();
if (mWearablesTab->isExpanded())
{
return hasItemSelected() && canTakeOffSelected();
}
else
{
LLScrollListItem* item = mTempItemsList->getFirstSelected();
if (item && item->getUUID().notNull())
{
return true;
}
}
}
return false;
@ -604,7 +608,7 @@ void LLPanelWearing::onEditAttachment()
void LLPanelWearing::onRemoveAttachment()
{
LLScrollListItem* item = mTempItemsList->getFirstSelected();
if (item)
if (item && item->getUUID().notNull())
{
LLSelectMgr::getInstance()->deselectAll();
LLSelectMgr::getInstance()->selectObjectAndFamily(mAttachmentsMap[item->getUUID()]);
@ -612,6 +616,21 @@ void LLPanelWearing::onRemoveAttachment()
}
}
void LLPanelWearing::onRemoveItem()
{
if (mWearablesTab->isExpanded())
{
uuid_vec_t selected_uuids;
getSelectedItemsUUIDs(selected_uuids);
LLAppearanceMgr::instance().removeItemsFromAvatar(selected_uuids);
}
else
{
onRemoveAttachment();
}
}
void LLPanelWearing::copyToClipboard()
{
std::string text;

View File

@ -81,6 +81,7 @@ public:
void onAccordionTabStateChanged();
void setAttachmentDetails(LLSD content);
void requestAttachmentDetails();
void onRemoveItem();
void onEditAttachment();
void onRemoveAttachment();

Some files were not shown because too many files have changed in this diff Show More