EFFECTIVE MERGE: svn merge -r 66133:68118 svn+ssh://svn/svn/linden/branches/maintenance into release

Actual action: branched maintenance-r68118, merged in release, then copied result into release
master
Christian Goetze 2007-08-21 22:17:53 +00:00
parent b699ae454d
commit ce0a5fe145
182 changed files with 2297 additions and 1222 deletions

View File

@ -4,49 +4,214 @@ along with the issue identifier corresponding to the patches we've
received from them. To see more about these contributions, visit
http://jira.secondlife.com/ and enter the issue identifier.
Able Whitman - VWR-650, VWR-1460
Alissa Sabre - VWR-81, VWR-83, VWR-171, VWR-251, VWR-414, VWR-415, VWR-459, VWR-606, VWR-652, VWR-1351, VWR-1410
Argent Stonecutter - VWR-68
Benja Kepler - VWR-746
Blakar Ogre - VWR-881
blino Nakamura - VWR-17
bushing Spatula - VWR-424, VWR-119
Catherine Pfeffer - VWR-1282
Dale Glass - VWR-120, VWR-560
Drewan Keats - VWR-28, VWR-248, VWR-412
Dylan Haskell - VWR-72
Dzonatas Sol - VWR-198, VWR-878, VWR-1704, VWR-1705, VWR-1729, VWR-975
Eddy Stryker - VWR-15, VWR-23, VWR-1468
EponymousDylan Ra - VWR-1465
Feep Larsson - VWR-1314
Fremont Cunningham - VWR-1147
Gigs Taggart - VWR-71, VWR-326, VWR-1217, VWR-1434
Ginko Bayliss - VWR-4
Grazer Kline - VWR-1092
Gudmund Shepherd - VWR-1594
Hikkoshi Sakai - VWR-429
Hiro Sommambulist - VWR-66, VWR-97, VWR-100, VWR-105, VWR-108, VWR-118, VWR-132, VWR-136, VWR-143
Iskar Ariantho - VWR-1223
Jacek Antonelli - VWR-165, VWR-188, VWR-427, VWR-597
Joghert LeSabre - VWR-64
Kage Pixel - VWR-11
Kunnis Basiat - VWR-82
McCabe Maxsted - VWR-1318
Nicholaz Beresford - VWR-132, VWR-176, VWR-364, VWR-691, VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-856, VWR-869, VWR-870, VWR-871, VWR-873, VWR-908, VWR-966, VWR-1221, VWR-1270, VWR-1296, VWR-1410, VWR-1418, VWR-1453, VWR-1455, VWR-1470, VWR-1578, VWR-1626, VWR-1655, VWR-1698, VWR-1706, VWR-1723, VWR-1732, VWR-1861
Paul Churchill - VWR-20
Paula Innis - VWR-30, VWR-1049
Peekay Semyorka - VWR-7, VWR-19, VWR-49, VWR-79
Ryozu Kojima - VWR-287
SignpostMarv Martin - VWR-154, VWR-155
Simon Nolan - VWR-409
SpacedOut Frye - VWR-57, VWR-94, VWR-121, VWR-123, VWR-1823
Stevex Janus - VWR-1182
Still Defiant - VWR-207, VWR-446
Strife Onizuka - SVC-9, VWR-74, VWR-85, VWR-148
tenebrous pau - VWR-247
TBBle Kurosawa - VWR-938, VWR-941, VWR-944, VWR-945
Tharax Ferraris - VWR-605
Thraxis Epsilon - VWR-383, SVC-371
Whoops Babii - VWR-1640
Zi Ree - VWR-671, VWR-682, VWR-1140
Zipherius Turas - VWR-76, VWR-77
Able Whitman
VWR-650
VWR-1460
Alissa Sabre
VWR-81
VWR-83
VWR-171
VWR-251
VWR-414
VWR-415
VWR-459
VWR-606
VWR-652
VWR-1351
VWR-1410
Argent Stonecutter
VWR-68
Benja Kepler
VWR-746
Blakar Ogre
VWR-881
blino Nakamura
VWR-17
bushing Spatula
VWR-119
VWR-424
Catherine Pfeffer
VWR-1282
Dale Glass
VWR-120
VWR-560
Drewan Keats
VWR-28
VWR-248
VWR-412
Dylan Haskell
VWR-72
Dzonatas Sol
VWR-198
VWR-878
VWR-975
VWR-1704
VWR-1705
VWR-1729
Eddy Stryker
VWR-15
VWR-23
VWR-1468
EponymousDylan Ra
VWR-1465
Feep Larsson
VWR-1314
Fremont Cunningham
VWR-1147
Gigs Taggart
VWR-71
VWR-326
VWR-493
VWR-1217
VWR-1434
VWR-1987
Ginko Bayliss
VWR-4
Grazer Kline
VWR-1092
Gudmund Shepherd
VWR-1594
Hikkoshi Sakai
VWR-429
Hiro Sommambulist
VWR-66
VWR-97
VWR-100
VWR-105
VWR-108
VWR-118
VWR-132
VWR-136
VWR-143
Iskar Ariantho
VWR-1223
Jacek Antonelli
VWR-165
VWR-188
VWR-427
VWR-597
Joghert LeSabre
VWR-64
Kage Pixel
VWR-11
Kunnis Basiat
VWR-82
Matthew Dowd
VWR-1344
VWR-1736
VWR-1761
McCabe Maxsted
VWR-1318
Mr Greggan
VWR-445
Nicholaz Beresford
VWR-132
VWR-176
VWR-364
VWR-546
VWR-691
VWR-793
VWR-794
VWR-802
VWR-803
VWR-804
VWR-805
VWR-808
VWR-809
VWR-810
VWR-823
VWR-856
VWR-869
VWR-870
VWR-871
VWR-873
VWR-908
VWR-966
VWR-1221
VWR-1230
VWR-1270
VWR-1296
VWR-1410
VWR-1418
VWR-1453
VWR-1455
VWR-1470
VWR-1566
VWR-1578
VWR-1626
VWR-1655
VWR-1698
VWR-1706
VWR-1721
VWR-1723
VWR-1732
VWR-1769
VWR-1808
VWR-1826
VWR-1861
VWR-1872
VWR-1968
VWR-2152
Paul Churchill
VWR-20
VWR-493
VWR-749
VWR-1567
VWR-1647
VWR-1880
Paula Innis
VWR-30
VWR-1049
Peekay Semyorka
VWR-7
VWR-19
VWR-49
VWR-79
Renault Clio
VWR-1976
Ryozu Kojima
VWR-287
SignpostMarv Martin
VWR-154
VWR-155
Simon Nolan
VWR-409
SpacedOut Frye
VWR-57
VWR-94
VWR-121
VWR-123
VWR-1823
Stevex Janus
VWR-1182
Still Defiant
VWR-207
VWR-446
Strife Onizuka
SVC-9
VWR-74
VWR-85
VWR-148
tenebrous pau
VWR-247
TBBle Kurosawa
VWR-938
VWR-941
VWR-942
VWR-944
VWR-945
VWR-1892
Tharax Ferraris
VWR-605
Thraxis Epsilon
SVC-371
VWR-383
Whoops Babii
VWR-1640
Zi Ree
VWR-671
VWR-682
VWR-1140
Zipherius Turas
VWR-76
VWR-77

View File

@ -405,15 +405,17 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time,
// LLKeyframeMotion()
// Class Constructor
//-----------------------------------------------------------------------------
LLKeyframeMotion::LLKeyframeMotion( const LLUUID &id) : LLMotion(id)
LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id)
: LLMotion(id),
mJointMotionList(NULL),
mJointStates(NULL),
mPelvisp(NULL),
mLastSkeletonSerialNum(0),
mLastUpdateTime(0.f),
mLastLoopedTime(0.f),
mAssetStatus(ASSET_UNDEFINED)
{
mJointMotionList = NULL;
mJointStates = NULL;
mLastSkeletonSerialNum = 0;
mLastLoopedTime = 0.f;
mLastUpdateTime = 0.f;
mAssetStatus = ASSET_UNDEFINED;
mPelvisp = NULL;
}
@ -1718,7 +1720,7 @@ BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const
}
success &= dp.packS32(mJointMotionList->mConstraints.size(), "num_constraints");
for (JointMotionList::constraint_list_t::iterator iter = mJointMotionList->mConstraints.begin();
for (JointMotionList::constraint_list_t::const_iterator iter = mJointMotionList->mConstraints.begin();
iter != mJointMotionList->mConstraints.end(); ++iter)
{
JointConstraintSharedData* shared_constraintp = *iter;
@ -1836,8 +1838,7 @@ void LLKeyframeMotion::setEaseOut(F32 ease_in)
//-----------------------------------------------------------------------------
void LLKeyframeMotion::flushKeyframeCache()
{
// TODO: Make this safe to do
// LLKeyframeDataCache::clear();
LLKeyframeDataCache::clear();
}
//-----------------------------------------------------------------------------
@ -1913,7 +1914,7 @@ void LLKeyframeMotion::setLoopOut(F32 out_point)
void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status)
void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* id = (LLUUID*)user_data;
@ -2091,7 +2092,6 @@ void LLKeyframeDataCache::removeKeyframeData(const LLUUID& id)
keyframe_data_map_t::iterator found_data = sKeyframeDataMap.find(id);
if (found_data != sKeyframeDataMap.end())
{
delete found_data->second;
sKeyframeDataMap.erase(found_data);
}
}
@ -2122,7 +2122,6 @@ LLKeyframeDataCache::~LLKeyframeDataCache()
//-----------------------------------------------------------------------------
void LLKeyframeDataCache::clear()
{
for_each(sKeyframeDataMap.begin(), sKeyframeDataMap.end(), DeletePairedPointer());
sKeyframeDataMap.clear();
}

View File

@ -20,6 +20,7 @@
#include "llhandmotion.h"
#include "lljointstate.h"
#include "llmotion.h"
#include "llmemory.h"
#include "llptrskipmap.h"
#include "llquaternion.h"
#include "v3dmath.h"
@ -124,14 +125,14 @@ public:
static void onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status);
void* user_data, S32 status, LLExtStat ext_status);
public:
U32 getFileSize();
BOOL serialize(LLDataPacker& dp) const;
BOOL deserialize(LLDataPacker& dp);
void writeCAL3D(apr_file_t* fp);
BOOL isLoaded() { return mJointMotionList != NULL; }
BOOL isLoaded() { return mJointMotionList.notNull(); }
// setters for modifying a keyframe animation
@ -371,8 +372,11 @@ public:
//-------------------------------------------------------------------------
// JointMotionList
//-------------------------------------------------------------------------
class JointMotionList
class JointMotionList : public LLRefCount
{
protected:
~JointMotionList();
public:
U32 mNumJointMotions;
JointMotion* mJointMotionArray;
@ -390,7 +394,6 @@ public:
LLBBoxLocal mPelvisBBox;
public:
JointMotionList();
~JointMotionList();
U32 dumpDiagInfo();
};
@ -401,7 +404,7 @@ protected:
//-------------------------------------------------------------------------
// Member Data
//-------------------------------------------------------------------------
JointMotionList* mJointMotionList;
LLPointer<JointMotionList> mJointMotionList;
LLJointState* mJointStates;
LLJoint* mPelvisp;
LLCharacter* mCharacter;
@ -421,7 +424,7 @@ public:
LLKeyframeDataCache(){};
~LLKeyframeDataCache();
typedef std::map<LLUUID, class LLKeyframeMotion::JointMotionList*> keyframe_data_map_t;
typedef std::map<LLUUID, LLPointer<class LLKeyframeMotion::JointMotionList> > keyframe_data_map_t;
static keyframe_data_map_t sKeyframeDataMap;
static void addKeyframeData(const LLUUID& id, LLKeyframeMotion::JointMotionList*);
@ -436,3 +439,4 @@ public:
#endif // LL_LLKEYFRAMEMOTION_H

View File

@ -258,7 +258,7 @@ BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
// Apparently an earlier version of the gesture code added \r to the end
// of the animation names. Get rid of it. JC
if (mAnimName[mAnimName.length() - 1] == '\r')
if (!mAnimName.empty() && mAnimName[mAnimName.length() - 1] == '\r')
{
// chop the last character
mAnimName.resize(mAnimName.length() - 1);

View File

@ -116,6 +116,7 @@ const MASK MASK_ALT = 0x0002;
const MASK MASK_SHIFT = 0x0004;
const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys
const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows
const MASK MASK_MODIFIERS = MASK_CONTROL|MASK_ALT|MASK_SHIFT|MASK_MAC_CONTROL;
// Special keys go into >128
const KEY KEY_SPECIAL = 0x80; // special keys start here

View File

@ -30,6 +30,7 @@
#include "stdtypes.h"
#include "lldefs.h"
#include "llerror.h"
#include "llextendedstatus.h"
#include "llformat.h"
#include "llstring.h"
#include "lltimer.h"

View File

@ -218,6 +218,7 @@ LLEventDispatcher::~LLEventDispatcher()
if (impl)
{
delete impl;
impl = NULL;
}
}

View File

@ -0,0 +1,49 @@
/**
* @file llextendedstatus.h
* @date August 2007
* @brief extended status codes for curl/vfs/resident asset storage and delivery
*
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#ifndef LL_LLEXTENDEDSTATUS_H
#define LL_LLEXTENDEDSTATUS_H
typedef S32 LLExtStat;
// Status provider groups - Top bits indicate which status type it is
// Zero is common status code (next section)
const LLExtStat LL_EXSTAT_CURL_RESULT = 1L<<30; // serviced by curl - use 1L if we really implement the below
const LLExtStat LL_EXSTAT_RES_RESULT = 2L<<30; // serviced by resident copy
const LLExtStat LL_EXSTAT_VFS_RESULT = 3L<<30; // serviced by vfs
// Common Status Codes
//
const LLExtStat LL_EXSTAT_NONE = 0x00000; // No extra info here - sorry!
const LLExtStat LL_EXSTAT_NULL_UUID = 0x10001; // null asset ID
const LLExtStat LL_EXSTAT_NO_UPSTREAM = 0x10002; // attempt to upload without a valid upstream method/provider
const LLExtStat LL_EXSTAT_REQUEST_DROPPED = 0x10003; // request was dropped unserviced
const LLExtStat LL_EXSTAT_NONEXISTENT_FILE = 0x10004; // trying to upload a file that doesn't exist
const LLExtStat LL_EXSTAT_BLOCKED_FILE = 0x10005; // trying to upload a file that we can't open
// curl status codes:
//
// Mask off LL_EXSTAT_CURL_RESULT for original result and
// see: libraries/include/curl/curl.h
// Memory-Resident status codes:
// None at present
// VFS status codes:
const LLExtStat LL_EXSTAT_VFS_CACHED = LL_EXSTAT_VFS_RESULT | 0x0001;
const LLExtStat LL_EXSTAT_VFS_CORRUPT = LL_EXSTAT_VFS_RESULT | 0x0002;
#endif // LL_LLEXTENDEDSTATUS_H

View File

@ -126,8 +126,11 @@ namespace
: LLEventTimer(refresh), mLiveFile(f)
{ }
void tick()
{ mLiveFile.checkAndReload(); }
BOOL tick()
{
mLiveFile.checkAndReload();
return FALSE;
}
private:
LLLiveFile& mLiveFile;

View File

@ -47,7 +47,7 @@ void LLMetricsImpl::recordEventDetails(const std::string& location,
metrics["location"] = location;
metrics["stats"] = stats;
llinfos << "LLMETRICS: " << LLSDOStreamer<LLSDNotationFormatter>(metrics) << llendl;
llinfos << "LLMETRICS: " << LLSDNotationStreamer(metrics) << llendl;
}
// Store this:

View File

@ -26,6 +26,7 @@
#elif LL_DARWIN
# include <sys/sysctl.h>
# include <sys/utsname.h>
# include <stdint.h>
#elif LL_LINUX
# include <sys/utsname.h>
# include <unistd.h>
@ -462,57 +463,97 @@ LLMemoryInfo::LLMemoryInfo()
{
}
U32 LLMemoryInfo::getPhysicalMemory() const
#if LL_WINDOWS
static U32 LLMemoryAdjustKBResult(U32 inKB)
{
// Moved this here from llfloaterabout.cpp
//! \bug
// For some reason, the reported amount of memory is always wrong.
// The original adjustment assumes it's always off by one meg, however
// errors of as much as 2520 KB have been observed in the value
// returned from the GetMemoryStatusEx function. Here we keep the
// original adjustment from llfoaterabout.cpp until this can be
// fixed somehow.
inKB += 1024;
return inKB;
}
#endif
U32 LLMemoryInfo::getPhysicalMemoryKB() const
{
#if LL_WINDOWS
MEMORYSTATUS state;
MEMORYSTATUSEX state;
state.dwLength = sizeof(state);
GlobalMemoryStatus(&state);
GlobalMemoryStatusEx(&state);
return (U32)state.dwTotalPhys;
return LLMemoryAdjustKBResult((U32)(state.ullTotalPhys >> 10));
#elif LL_DARWIN
// This might work on Linux as well. Someone check...
unsigned int phys = 0;
int mib[2] = { CTL_HW, HW_PHYSMEM };
uint64_t phys = 0;
int mib[2] = { CTL_HW, HW_MEMSIZE };
size_t len = sizeof(phys);
sysctl(mib, 2, &phys, &len, NULL, 0);
return phys;
#elif LL_LINUX
return (U32)(phys >> 10);
#elif LL_LINUX
U64 phys = 0;
phys = (U64)(getpagesize()) * (U64)(get_phys_pages());
return (U32)(phys >> 10);
return getpagesize() * get_phys_pages();
#elif LL_SOLARIS
return getpagesize() * sysconf(_SC_PHYS_PAGES);
U64 phys = 0;
phys = (U64)(getpagesize()) * (U64)(sysconf(_SC_PHYS_PAGES));
return (U32)(phys >> 10);
#else
return 0;
#endif
}
U32 LLMemoryInfo::getPhysicalMemoryClamped() const
{
// Return the total physical memory in bytes, but clamp it
// to no more than U32_MAX
U32 phys_kb = getPhysicalMemoryKB();
if (phys_kb >= 4194304 /* 4GB in KB */)
{
return U32_MAX;
}
else
{
return phys_kb << 10;
}
}
void LLMemoryInfo::stream(std::ostream& s) const
{
#if LL_WINDOWS
MEMORYSTATUS state;
MEMORYSTATUSEX state;
state.dwLength = sizeof(state);
GlobalMemoryStatus(&state);
GlobalMemoryStatusEx(&state);
s << "Percent Memory use: " << (U32)state.dwMemoryLoad << '%' << std::endl;
s << "Total Physical Kb: " << (U32)state.dwTotalPhys/1024 << std::endl;
s << "Avail Physical Kb: " << (U32)state.dwAvailPhys/1024 << std::endl;
s << "Total page Kb: " << (U32)state.dwTotalPageFile/1024 << std::endl;
s << "Avail page Kb: " << (U32)state.dwAvailPageFile/1024 << std::endl;
s << "Total Virtual Kb: " << (U32)state.dwTotalVirtual/1024 << std::endl;
s << "Avail Virtual Kb: " << (U32)state.dwAvailVirtual/1024 << std::endl;
s << "Total Physical KB: " << (U32)(state.ullTotalPhys/1024) << std::endl;
s << "Avail Physical KB: " << (U32)(state.ullAvailPhys/1024) << std::endl;
s << "Total page KB: " << (U32)(state.ullTotalPageFile/1024) << std::endl;
s << "Avail page KB: " << (U32)(state.ullAvailPageFile/1024) << std::endl;
s << "Total Virtual KB: " << (U32)(state.ullTotalVirtual/1024) << std::endl;
s << "Avail Virtual KB: " << (U32)(state.ullAvailVirtual/1024) << std::endl;
#elif LL_DARWIN
U64 phys = 0;
uint64_t phys = 0;
size_t len = sizeof(phys);
if(sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0)
{
s << "Total Physical Kb: " << phys/1024 << std::endl;
s << "Total Physical KB: " << phys/1024 << std::endl;
}
else
{
@ -523,7 +564,7 @@ void LLMemoryInfo::stream(std::ostream& s) const
phys = (U64)(sysconf(_SC_PHYS_PAGES)) * (U64)(sysconf(_SC_PAGESIZE)/1024);
s << "Total Physical Kb: " << phys << std::endl;
s << "Total Physical KB: " << phys << std::endl;
#else
// *NOTE: This works on linux. What will it do on other systems?
FILE* meminfo = LLFile::fopen(MEMINFO_FILE,"rb");

View File

@ -69,13 +69,31 @@ private:
std::string mCPUString;
};
//=============================================================================
//
// CLASS LLMemoryInfo
class LLMemoryInfo
/*! @brief Class to query the memory subsystem
@details
Here's how you use an LLMemoryInfo:
LLMemoryInfo info;
<br> llinfos << info << llendl;
*/
{
public:
LLMemoryInfo();
void stream(std::ostream& s) const;
LLMemoryInfo(); ///< Default constructor
void stream(std::ostream& s) const; ///< output text info to s
U32 getPhysicalMemory() const;
U32 getPhysicalMemoryKB() const; ///< Memory size in KiloBytes
/*! Memory size in bytes, if total memory is >= 4GB then U32_MAX will
** be returned.
*/
U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes
};

View File

@ -200,7 +200,7 @@ public:
if (0 == res)
{
delete this;
res = 0;
return 0;
}
return res;
}

View File

@ -505,13 +505,27 @@ LLEventTimer::~LLEventTimer()
void LLEventTimer::updateClass()
{
std::list<LLEventTimer*> completed_timers;
for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); )
{
LLEventTimer* timer = *iter++;
F32 et = timer->mEventTimer.getElapsedTimeF32();
if (et > timer->mPeriod) {
timer->mEventTimer.reset();
timer->tick();
if ( timer->tick() )
{
completed_timers.push_back( timer );
}
}
}
if ( completed_timers.size() > 0 )
{
for (std::list<LLEventTimer*>::iterator completed_iter = completed_timers.begin();
completed_iter != completed_timers.end();
completed_iter++ )
{
delete *completed_iter;
}
}
}

View File

@ -122,11 +122,12 @@ void secondsToTimecodeString(F32 current_time, char *tcstring);
class LLEventTimer
{
public:
LLEventTimer(F32 period); // period is the amount of time between each call to tick()
LLEventTimer(F32 period); // period is the amount of time between each call to tick() in seconds
virtual ~LLEventTimer();
//function to be called at the supplied frequency
virtual void tick() = 0;
// Normally return FALSE; TRUE will delete the timer after the function returns.
virtual BOOL tick() = 0;
static void updateClass();

View File

@ -290,42 +290,15 @@ BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
// Should do some simple bounds checking
U32 i;
U32 to_offset;
U32 from_offset;
if (!reverse_y)
for (i = 0; i < height; i++)
{
for (i = 0; i < height; i++)
{
to_offset = (y_pos + i)*getWidth() + x_pos;
if (stride != 0)
{
from_offset = i*stride;
}
else
{
from_offset = i*width*getComponents();
}
memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
data + from_offset, getComponents()*width);
}
}
else
{
for (i = 0; i < height; i++)
{
to_offset = (y_pos + i)*getWidth() + x_pos;
if (stride != 0)
{
from_offset = (height - 1 - i)*stride;
}
else
{
from_offset = (height - 1 - i)*width*getComponents();
}
memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
data + from_offset, getComponents()*width);
}
const U32 row = reverse_y ? height - 1 - i : i;
const U32 from_offset = row * ((stride == 0) ? width*getComponents() : stride);
const U32 to_offset = (y_pos + i)*getWidth() + x_pos;
memcpy(getData() + to_offset*getComponents(), /* Flawfinder: ignore */
data + from_offset, getComponents()*width);
}
return TRUE;
}

View File

@ -96,7 +96,7 @@ public:
static void generateMip(const U8 *indata, U8* mipdata, int width, int height, S32 nchannels);
// Function for calculating the download priority for textes
// Function for calculating the download priority for textures
// <= 0 priority means that there's no need for more data.
static F32 calc_download_priority(F32 virtual_size, F32 visible_area, S32 bytes_sent);

View File

@ -132,7 +132,9 @@ void LLImageJ2C::closeDSO()
LLImageJ2C::LLImageJ2C() : LLImageFormatted(IMG_CODEC_J2C),
mMaxBytes(0),
mRawDiscardLevel(-1),
mRate(0.0f)
mRate(0.0f),
mReversible(FALSE)
{
//We assume here that if we wanted to destory via
//a dynamic library that the approriate open calls were made
@ -252,7 +254,7 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
LLMemType mt1((LLMemType::EMemType)mMemType);
return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time);
return mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
}
//static
@ -321,11 +323,11 @@ void LLImageJ2C::setMaxBytes(S32 max_bytes)
{
mMaxBytes = max_bytes;
}
// NOT USED
// void LLImageJ2C::setReversible(const BOOL reversible)
// {
// mReversible = reversible;
// }
void LLImageJ2C::setReversible(const BOOL reversible)
{
mReversible = reversible;
}
BOOL LLImageJ2C::loadAndValidate(const LLString &filename)

View File

@ -59,6 +59,7 @@ protected:
S32 mMaxBytes; // Maximum number of bytes of data to use...
S8 mRawDiscardLevel;
F32 mRate;
BOOL mReversible;
LLImageJ2CImpl *mImpl;
};
@ -80,7 +81,8 @@ protected:
// true: decoding complete (even if it failed)
// false: time expired while decoding
virtual BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count) = 0;
virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0) = 0;
virtual BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
BOOL reversible=FALSE) = 0;
friend class LLImageJ2C;
};

View File

@ -173,7 +173,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
}
BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time)
BOOL LLImageJ2COJ::encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time, BOOL reversible)
{
const S32 MAX_COMPS = 5;
opj_cparameters_t parameters; /* compression parameters */

View File

@ -20,7 +20,8 @@ public:
protected:
/*virtual*/ BOOL getMetadata(LLImageJ2C &base);
/*virtual*/ BOOL decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decode_time, S32 first_channel, S32 max_channel_count);
/*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0);
/*virtual*/ BOOL encodeImpl(LLImageJ2C &base, const LLImageRaw &raw_image, const char* comment_text, F32 encode_time=0.0,
BOOL reversible = FALSE);
int ceildivpow2(int a, int b)
{
// Divide a by b to the power of 2 and round upwards.

View File

@ -441,6 +441,20 @@ F32 next_power_of_two(F32 value)
return pow(2.0f, power);
}
F32 nearest_power_of_two(F32 value)
{
// nearest in the linear sense means closest w/r/t a "halfway" point.
// in the exponential sense, the "halfway" point isn't 1/2, it's 1/sqrt(2).
// our windows build hates the math.h defines, so do it here. -qarl
F32 const INVSQRT2 = 0.7071067812f;
F32 answer = next_power_of_two(value * INVSQRT2);
// llwarns << value << " -> " << answer << llendl;
return answer;
}
BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted)
@ -585,7 +599,7 @@ BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted)
S32 sides = (S32)circle_detail;
if (is_sculpted)
sides = (S32)next_power_of_two((F32)sides);
sides = (S32)nearest_power_of_two((F32)sides - 1);
genNGon(sides);
@ -1132,7 +1146,7 @@ BOOL LLPath::generate(F32 detail, S32 split, BOOL is_sculpted)
S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions());
if (is_sculpted)
sides = (S32)next_power_of_two((F32)sides);
sides = (S32)nearest_power_of_two((F32)sides - 1);
genNGon(sides);
}
@ -1809,7 +1823,7 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
sNumMeshPoints += mMesh.size();
S32 vertex_change = 0;
// first test to see if image has enough variation to create geometry
// first test to see if image has enough variation to create non-degenerate geometry
if (!data_is_empty)
{
S32 last_index = 0;
@ -1835,12 +1849,13 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components,
if (fabs((F32)(sculpt_data[index] - sculpt_data[last_index])) +
fabs((F32)(sculpt_data[index+1] - sculpt_data[last_index+1])) +
fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 256 * 0.02)
fabs((F32)(sculpt_data[index+2] - sculpt_data[last_index+2])) > 0)
vertex_change++;
last_index = index;
}
if ((F32)vertex_change / sizeS / sizeT < 0.05) // less than 5%
if ((F32)vertex_change / sizeS / sizeT < 0.02) // less than 2%
data_is_empty = TRUE;
}

View File

@ -345,11 +345,11 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error)
LLAssetRequest* tmp = *curiter;
if (tmp->mUpCallback)
{
tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error);
tmp->mUpCallback(tmp->getUUID(), tmp->mUserData, error, LL_EXSTAT_NONE);
}
if (tmp->mDownCallback)
{
tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error);
tmp->mDownCallback(mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, error, LL_EXSTAT_NONE);
}
if (tmp->mInfoCallback)
{
@ -370,7 +370,7 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType
///////////////////////////////////////////////////////////////////////////
// IW - uuid is passed by value to avoid side effects, please don't re-add &
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *,S32), void *user_data, BOOL is_priority)
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), void *user_data, BOOL is_priority)
{
lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
@ -384,7 +384,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
// Special case early out for NULL uuid
if (callback)
{
callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE);
callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);
}
return;
}
@ -439,7 +439,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
// unless there's a weird error
if (callback)
{
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR);
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@ -482,7 +482,7 @@ void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType at
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE);
callback(mVFS, uuid, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@ -492,7 +492,7 @@ void LLAssetStorage::downloadCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data)
void* user_data, LLExtStat ext_status)
{
lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
<< "," << LLAssetType::lookup(file_type) << llendl;
@ -546,7 +546,7 @@ void LLAssetStorage::downloadCompleteCallback(
LLAssetRequest* tmp = *curiter;
if (tmp->mDownCallback)
{
tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result);
tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status);
}
delete tmp;
}
@ -566,7 +566,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
// Special case early out for NULL uuid
if (callback)
{
callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE);
callback(mVFS, asset_id, atype, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);
}
return;
}
@ -622,7 +622,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE);
callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@ -633,7 +633,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
// unless there's a weird error
if (callback)
{
callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR);
callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@ -642,7 +642,8 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data)
void* user_data,
LLExtStat ext_status)
{
LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data;
if(!req)
@ -673,7 +674,7 @@ void LLAssetStorage::downloadEstateAssetCompleteCallback(
}
}
req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result);
req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status);
}
void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
@ -757,7 +758,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
llwarns << "Attempt to move asset data request upstream w/o valid upstream provider" << llendl;
if (callback)
{
callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE);
callback(mVFS, asset_id, atype, user_data, LL_ERR_CIRCUIT_GONE, LL_EXSTAT_NO_UPSTREAM);
}
}
}
@ -768,7 +769,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
// unless there's a weird error
if (callback)
{
callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR);
callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
}
}
}
@ -778,7 +779,8 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data)
void* user_data,
LLExtStat ext_status)
{
LLInvItemRequest *req = (LLInvItemRequest*)user_data;
if(!req)
@ -808,7 +810,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
}
}
req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result);
req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -816,7 +818,7 @@ void LLAssetStorage::downloadInvItemCompleteCallback(
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// static
void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result) // StoreAssetData callback (fixed)
void LLAssetStorage::uploadCompleteCallback(const LLUUID& uuid, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
if (!gAssetStorage)
{
@ -856,10 +858,10 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat
msg->getBOOLFast(_PREHASH_AssetBlock, _PREHASH_Success, success);
asset_type = (LLAssetType::EType)asset_type_s8;
this_ptr->_callUploadCallbacks(uuid, asset_type, success);
this_ptr->_callUploadCallbacks(uuid, asset_type, success, LL_EXSTAT_NONE);
}
void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success)
void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status )
{
// SJB: We process the callbacks in reverse order, I do not know if this is important,
// but I didn't want to mess with it.
@ -893,7 +895,7 @@ void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType
LLAssetRequest* req = *curiter;
if (req->mUpCallback)
{
req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED ));
req->mUpCallback(uuid, req->mUserData, (success ? LL_ERR_NOERR : LL_ERR_ASSET_REQUEST_FAILED ), ext_status );
}
delete req;
}
@ -1116,11 +1118,11 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::request_list_t* reques
// Run callbacks.
if (req->mUpCallback)
{
req->mUpCallback(req->getUUID(), req->mUserData, error);
req->mUpCallback(req->getUUID(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED);
}
if (req->mDownCallback)
{
req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error);
req->mDownCallback(mVFS, req->getUUID(), req->getType(), req->mUserData, error, LL_EXSTAT_REQUEST_DROPPED);
}
if (req->mInfoCallback)
{
@ -1173,7 +1175,7 @@ const char* LLAssetStorage::getErrorString(S32 status)
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority)
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority)
{
// check for duplicates here, since we're about to fool the normal duplicate checker
for (request_list_t::iterator iter = mPendingDownloads.begin();
@ -1203,7 +1205,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
}
// static
void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status)
void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 status, LLExtStat ext_status)
{
LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data;
char filename[LL_MAX_PATH] = ""; /* Flawfinder: ignore */
@ -1239,7 +1241,7 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAss
}
}
legacy->mDownCallback(filename, uuid, legacy->mUserData, status);
legacy->mDownCallback(filename, uuid, legacy->mUserData, status, ext_status);
delete legacy;
}
@ -1309,12 +1311,12 @@ void LLAssetStorage::storeAssetData(
}
// static
void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status)
void LLAssetStorage::legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status)
{
LLLegacyAssetRequest *legacy = (LLLegacyAssetRequest *)user_data;
if (legacy && legacy->mUpCallback)
{
legacy->mUpCallback(uuid, legacy->mUserData, status);
legacy->mUpCallback(uuid, legacy->mUserData, status, ext_status);
}
delete legacy;
}

View File

@ -20,6 +20,7 @@
#include "lltransfermanager.h" // For LLTSCode enum
#include "llassettype.h"
#include "llstring.h"
#include "llextendedstatus.h"
// Forward declarations
class LLMessageSystem;
@ -82,8 +83,8 @@ protected:
LLAssetType::EType mType;
public:
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
void (*mUpCallback)(const LLUUID&, void *, S32);
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat);
void (*mInfoCallback)(LLAssetInfo *, void *, S32);
void *mUserData;
@ -130,7 +131,7 @@ protected:
LLAssetType::EType mType;
public:
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
void *mUserData;
LLHost mHost;
@ -160,7 +161,7 @@ protected:
EstateAssetType mEstateAssetType;
public:
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32);
void (*mDownCallback)(LLVFS*, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat);
void *mUserData;
LLHost mHost;
@ -176,14 +177,14 @@ public:
typedef void (*LLGetAssetCallback)(LLVFS *vfs, const LLUUID &asset_id,
LLAssetType::EType asset_type, void *user_data, S32 status);
LLAssetType::EType asset_type, void *user_data, S32 status, LLExtStat ext_status);
class LLAssetStorage
{
public:
// VFS member is public because static child methods need it :(
LLVFS *mVFS;
typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status);
typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status, LLExtStat ext_status);
enum ERequestType
{
@ -315,27 +316,27 @@ public:
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data);
void* user_data, LLExtStat ext_status);
static void downloadEstateAssetCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data);
void* user_data, LLExtStat ext_status);
static void downloadInvItemCompleteCallback(
S32 result,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data);
void* user_data, LLExtStat ext_status);
// upload process callbacks
static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result);
static void uploadCompleteCallback(const LLUUID&, void *user_data, S32 result, LLExtStat ext_status);
static void processUploadComplete(LLMessageSystem *msg, void **this_handle);
// debugging
static const char* getErrorString( S32 status );
// deprecated file-based methods
void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32), void *user_data, BOOL is_priority = FALSE);
void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE);
/*
* AssetID version.
@ -365,8 +366,8 @@ public:
bool user_waiting = false,
F64 timeout = LL_ASSET_STORAGE_TIMEOUT);
static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status);
static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status);
static void legacyGetDataCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType, void *user_data, S32 status, LLExtStat ext_status);
static void legacyStoreDataCallback(const LLUUID &uuid, void *user_data, S32 status, LLExtStat ext_status);
// Temp assets are stored on sim nodes, they have agent ID and location data associated with them.
// This is a no-op for non-http asset systems
@ -384,10 +385,10 @@ public:
protected:
void _cleanupRequests(BOOL all, S32 error);
void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success);
void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status);
virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate,
BOOL is_priority);
@ -405,7 +406,7 @@ private:
class LLLegacyAssetRequest
{
public:
void (*mDownCallback)(const char *, const LLUUID&, void *, S32);
void (*mDownCallback)(const char *, const LLUUID&, void *, S32, LLExtStat);
LLAssetStorage::LLStoreAssetCallback mUpCallback;
void *mUserData;

View File

@ -1138,7 +1138,7 @@ std::ostream& operator<<(std::ostream& s, LLCircuitData& circuit)
s << S32(circuit.mBytesInLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f);
s << "/";
s << S32(circuit.mBytesOutLastPeriod * 8.f / circuit.mLastPeriodLength / 1024.f);
s << " Peak Kbps: ";
s << " Peak kbps: ";
s << S32(circuit.mPeakBPSIn / 1024.f);
s << "/";
s << S32(circuit.mPeakBPSOut / 1024.f);

View File

@ -444,7 +444,7 @@ void LLHTTPAssetStorage::storeAssetData(
llwarns << "AssetStorage: attempt to upload non-existent vfile " << uuid << ":" << LLAssetType::lookup(type) << llendl;
if (callback)
{
callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE );
callback(uuid, user_data, LL_ERR_ASSET_REQUEST_NONEXISTENT_FILE, LL_EXSTAT_NONEXISTENT_FILE);
}
}
}
@ -509,7 +509,7 @@ void LLHTTPAssetStorage::storeAssetData(
{
if (callback)
{
callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE);
callback(LLUUID::null, user_data, LL_ERR_CANNOT_OPEN_FILE, LL_EXSTAT_BLOCKED_FILE);
}
}
// Coverity CID-269 says there's a leak of 'legacy' here, but
@ -611,7 +611,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
{
if (pending_req->mUpCallback) //Clean up here rather than _callUploadCallbacks because this request is already cleared the req.
{
pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1);
pending_req->mUpCallback(pending_req->getUUID(), pending_req->mUserData, -1, LL_EXSTAT_REQUEST_DROPPED);
}
}
@ -637,7 +637,7 @@ bool LLHTTPAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
// internal requester, used by getAssetData in superclass
void LLHTTPAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate,
BOOL is_priority)
{
@ -902,7 +902,7 @@ void LLHTTPAssetStorage::checkForTimeouts()
{
// shared upload finished callback
// in the base class, this is called from processUploadComplete
_callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0));
_callUploadCallbacks(req->getUUID(), req->getType(), (xfer_result == 0), LL_EXSTAT_CURL_RESULT | curl_result);
// Pending upload flag will get cleared when the request is deleted
}
}
@ -944,7 +944,8 @@ void LLHTTPAssetStorage::checkForTimeouts()
xfer_result,
req->getUUID(),
req->getType(),
(void *)req);
(void *)req,
LL_EXSTAT_CURL_RESULT | curl_result);
// Pending download flag will get cleared when the request is deleted
}
else
@ -1369,3 +1370,4 @@ void LLHTTPAssetStorage::clearTempAssetData()
mTempAssets.clear();
}

View File

@ -108,7 +108,7 @@ public:
protected:
void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type,
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32),
void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat),
void *user_data, BOOL duplicate, BOOL is_priority);
private:

View File

@ -143,7 +143,7 @@ void LLMessageConfigFile::loadMessageBans(const LLSD& data)
bool LLMessageConfigFile::isCapBanned(const std::string& cap_name) const
{
llinfos << "mCapBans is " << LLSDXMLStreamer(mCapBans) << llendl;
lldebugs << "mCapBans is " << LLSDNotationStreamer(mCapBans) << llendl;
return mCapBans[cap_name];
}

View File

@ -256,7 +256,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data)
void LLSDMessageBuilder::copyFromLLSD(const LLSD& msg)
{
mCurrentMessage = msg;
lldebugs << LLSDXMLStreamer(mCurrentMessage) << llendl;
lldebugs << LLSDNotationStreamer(mCurrentMessage) << llendl;
}
const LLSD& LLSDMessageBuilder::getMessage() const

View File

@ -25,6 +25,7 @@ const U32 TELEPORT_FLAGS_DISABLE_CANCEL = 1 << 11; // Used for llTeleportAgentH
const U32 TELEPORT_FLAGS_VIA_REGION_ID = 1 << 12;
const U32 TELEPORT_FLAGS_IS_FLYING = 1 << 13;
const U32 TELEPORT_FLAGS_SHOW_RESET_HOME = 1 << 14;
const U32 TELEPORT_FLAGS_FORCE_REDIRECT = 1 << 15; // used to force a redirect to some random location - used when kicking someone from land.
const U32 TELEPORT_FLAGS_MASK_VIA = TELEPORT_FLAGS_VIA_LURE
| TELEPORT_FLAGS_VIA_LANDMARK

View File

@ -482,12 +482,15 @@ BOOL LLTemplateMessageReader::decodeTemplate(
return(TRUE);
}
void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host )
void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted )
{
// we've run off the end of the packet!
llwarns << "Ran off end of packet " << mCurrentRMessageTemplate->mName
// << " with id " << mCurrentRecvPacketID
<< " from " << host
<< " trying to read " << wanted
<< " bytes at position " << where
<< " going past packet end at " << mReceiveSize
<< llendl;
if(gMessageSystem->mVerboseLog)
{
@ -542,7 +545,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
// repeat number is a single byte
if (decode_pos >= mReceiveSize)
{
logRanOffEndOfPacket(sender);
logRanOffEndOfPacket(sender, decode_pos, 1);
// default to 0 repeats
repeat_number = 0;
@ -601,7 +604,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
if ((decode_pos + data_size) > mReceiveSize)
{
logRanOffEndOfPacket(sender);
logRanOffEndOfPacket(sender, decode_pos, data_size);
// default to 0 length variable blocks
tsize = 0;
@ -637,7 +640,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
// so, copy data pointer and set data size to fixed size
if ((decode_pos + mvci.getSize()) > mReceiveSize)
{
logRanOffEndOfPacket(sender);
logRanOffEndOfPacket(sender, decode_pos, mvci.getSize());
// default to 0s.
U32 size = mvci.getSize();

View File

@ -93,7 +93,7 @@ private:
BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs
LLMessageTemplate** msg_template ); // outputs
void logRanOffEndOfPacket( const LLHost& host );
void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted );
BOOL decodeData(const U8* buffer, const LLHost& sender );

View File

@ -154,7 +154,7 @@ BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp)
void LLTransferSourceAsset::responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
void *user_data, S32 result)
void *user_data, S32 result, LLExtStat ext_status )
{
LLUUID *tidp = ((LLUUID*) user_data);
LLUUID transfer_id = *(tidp);

View File

@ -39,7 +39,7 @@ public:
virtual ~LLTransferSourceAsset();
static void responderCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type,
void *user_data, S32 result);
void *user_data, S32 result, LLExtStat ext_status );
protected:
/*virtual*/ void initTransfer();
/*virtual*/ F32 updatePriority();

View File

@ -195,6 +195,7 @@ void LLTransferTargetVFile::completionCallback(const LLTSCode status)
mParams.mCompleteCallback(err_code,
mParams.getAssetID(),
mParams.getAssetType(),
mParams.mUserDatap);
mParams.mUserDatap,
LL_EXSTAT_NONE);
}
}

View File

@ -21,7 +21,7 @@ typedef void (*LLTTVFCompleteCallback)(
S32 status,
const LLUUID& file_id,
LLAssetType::EType file_type,
void* user_data);
void* user_data, LLExtStat ext_status );
class LLTransferTargetParamsVFile : public LLTransferTargetParams
{

View File

@ -281,7 +281,7 @@ S32 LLXfer::processEOF()
if (mCallback)
{
mCallback(mCallbackDataHandle,mCallbackResult);
mCallback(mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE);
}
return(retval);
@ -355,3 +355,4 @@ std::ostream& operator<< (std::ostream& os, LLXfer &hh)

View File

@ -47,7 +47,7 @@ class LLXfer
BOOL mWaitingForACK;
void (*mCallback)(void **,S32);
void (*mCallback)(void **,S32,LLExtStat);
void **mCallbackDataHandle;
S32 mCallbackResult;
@ -96,3 +96,4 @@ class LLXfer

View File

@ -103,7 +103,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void**,S32),
void (*callback)(void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success

View File

@ -40,7 +40,7 @@ class LLXfer_File : public LLXfer
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void**,S32),
void (*callback)(void**,S32,LLExtStat),
void** user_data);
virtual S32 startDownload();
@ -66,3 +66,4 @@ class LLXfer_File : public LLXfer

View File

@ -116,7 +116,7 @@ S32 LLXfer_Mem::processEOF()
if (mCallback)
{
mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult);
mCallback((void *)mBuffer,mBufferLength,mCallbackDataHandle,mCallbackResult,LL_EXSTAT_NONE);
}
return(retval);
@ -129,7 +129,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void*,S32,void**,S32),
void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success
@ -198,3 +198,4 @@ U32 LLXfer_Mem::getXferTypeTag()

View File

@ -20,7 +20,7 @@ class LLXfer_Mem : public LLXfer
{
private:
protected:
void (*mCallback)(void *, S32, void **,S32);
void (*mCallback)(void *, S32, void **, S32, LLExtStat);
char mRemoteFilename[LL_MAX_PATH]; /* Flawfinder : ignore */
ELLPath mRemotePath;
BOOL mDeleteRemoteOnCompletion;
@ -45,7 +45,7 @@ class LLXfer_Mem : public LLXfer
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void*,S32,void**,S32),
void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data);
virtual S32 startDownload();
@ -59,3 +59,4 @@ class LLXfer_Mem : public LLXfer

View File

@ -78,7 +78,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id,
const LLUUID& remote_id,
LLAssetType::EType type,
const LLHost& remote_host,
void (*callback)(void**,S32),
void (*callback)(void**,S32,LLExtStat),
void** user_data)
{
S32 retval = 0; // presume success

View File

@ -45,7 +45,7 @@ class LLXfer_VFile : public LLXfer
const LLUUID &remote_id,
const LLAssetType::EType type,
const LLHost &remote_host,
void (*callback)(void **,S32),
void (*callback)(void **,S32,LLExtStat),
void **user_data);
virtual S32 startDownload();
@ -72,3 +72,4 @@ class LLXfer_VFile : public LLXfer

View File

@ -376,7 +376,7 @@ void LLXferManager::requestFile(const char* local_filename,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void**,S32),
void (*callback)(void**,S32,LLExtStat),
void** user_data,
BOOL is_priority,
BOOL use_big_packets)
@ -433,7 +433,7 @@ void LLXferManager::requestFile(const char* remote_filename,
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void*,S32,void**,S32),
void (*callback)(void*,S32,void**,S32,LLExtStat),
void** user_data,
BOOL is_priority)
{
@ -461,7 +461,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id,
const LLUUID& remote_id,
LLAssetType::EType type, LLVFS* vfs,
const LLHost& remote_host,
void (*callback)(void**, S32),
void (*callback)(void**,S32,LLExtStat),
void** user_data,
BOOL is_priority)
{
@ -1129,5 +1129,6 @@ void process_abort_xfer(LLMessageSystem *mesgsys, void **user_data)

View File

@ -125,7 +125,7 @@ class LLXferManager
ELLPath remote_path,
const LLHost& remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void**,S32), void** user_data,
void (*callback)(void**,S32,LLExtStat), void** user_data,
BOOL is_priority = FALSE,
BOOL use_big_packets = FALSE);
@ -134,7 +134,7 @@ class LLXferManager
ELLPath remote_path,
const LLHost &remote_host,
BOOL delete_remote_on_completion,
void (*callback)(void*, S32, void**, S32),
void (*callback)(void*, S32, void**, S32, LLExtStat),
void** user_data,
BOOL is_priority = FALSE);
@ -143,7 +143,7 @@ class LLXferManager
virtual void requestVFile(const LLUUID &local_id, const LLUUID& remote_id,
LLAssetType::EType type, LLVFS* vfs,
const LLHost& remote_host,
void (*callback)(void**, S32), void** user_data,
void (*callback)(void**,S32,LLExtStat), void** user_data,
BOOL is_priority = FALSE);
/*
@ -185,3 +185,4 @@ void process_abort_xfer (LLMessageSystem *mesgsys, void **user_data);
#endif

View File

@ -2114,7 +2114,7 @@ void LLMessageSystem::dispatch(
}
// enable this for output of message names
//llinfos << "< \"" << msg_name << "\"" << llendl;
//lldebugs << "data: " << LLSDXMLStreamer(message) << llendl;
//lldebugs << "data: " << LLSDNotationStreamer(message) << llendl;
handler->post(responsep, context, message);
}

View File

@ -285,6 +285,7 @@ char * _PREHASH_LogFailedMoneyTransaction;
char * _PREHASH_ViewerStartAuction;
char * _PREHASH_StartAuction;
char * _PREHASH_DuplicateFlags;
char * _PREHASH_RegionInfo2;
char * _PREHASH_TextColor;
char * _PREHASH_SlaveID;
char * _PREHASH_Charter;
@ -650,9 +651,9 @@ char * _PREHASH_PreyAgent;
char * _PREHASH_SimStats;
char * _PREHASH_LogoutReply;
char * _PREHASH_FeatureDisabled;
char * _PREHASH_PhysicalAvatarEventList;
char * _PREHASH_ObjectLocalID;
char * _PREHASH_Dropped;
char * _PREHASH_PhysicalAvatarEventList;
char * _PREHASH_WebProfilesDisabled;
char * _PREHASH_Destination;
char * _PREHASH_MasterID;
@ -1617,6 +1618,7 @@ void init_prehash_data()
_PREHASH_ViewerStartAuction = gMessageStringTable.getString("ViewerStartAuction");
_PREHASH_StartAuction = gMessageStringTable.getString("StartAuction");
_PREHASH_DuplicateFlags = gMessageStringTable.getString("DuplicateFlags");
_PREHASH_RegionInfo2 = gMessageStringTable.getString("RegionInfo2");
_PREHASH_TextColor = gMessageStringTable.getString("TextColor");
_PREHASH_SlaveID = gMessageStringTable.getString("SlaveID");
_PREHASH_Charter = gMessageStringTable.getString("Charter");
@ -1982,9 +1984,9 @@ void init_prehash_data()
_PREHASH_SimStats = gMessageStringTable.getString("SimStats");
_PREHASH_LogoutReply = gMessageStringTable.getString("LogoutReply");
_PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled");
_PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList");
_PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID");
_PREHASH_Dropped = gMessageStringTable.getString("Dropped");
_PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList");
_PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled");
_PREHASH_Destination = gMessageStringTable.getString("Destination");
_PREHASH_MasterID = gMessageStringTable.getString("MasterID");

View File

@ -285,6 +285,7 @@ extern char * _PREHASH_LogFailedMoneyTransaction;
extern char * _PREHASH_ViewerStartAuction;
extern char * _PREHASH_StartAuction;
extern char * _PREHASH_DuplicateFlags;
extern char * _PREHASH_RegionInfo2;
extern char * _PREHASH_TextColor;
extern char * _PREHASH_SlaveID;
extern char * _PREHASH_Charter;
@ -650,9 +651,9 @@ extern char * _PREHASH_PreyAgent;
extern char * _PREHASH_SimStats;
extern char * _PREHASH_LogoutReply;
extern char * _PREHASH_FeatureDisabled;
extern char * _PREHASH_PhysicalAvatarEventList;
extern char * _PREHASH_ObjectLocalID;
extern char * _PREHASH_Dropped;
extern char * _PREHASH_PhysicalAvatarEventList;
extern char * _PREHASH_WebProfilesDisabled;
extern char * _PREHASH_Destination;
extern char * _PREHASH_MasterID;

View File

@ -69,8 +69,7 @@ LLButton::LLButton( const LLString& name, const LLRect& rect, const LLString& co
mCurGlowStrength(0.f),
mNeedsHighlight(FALSE),
mCommitOnReturn(TRUE),
mImagep( NULL ),
mIsDirty( FALSE )
mImagep( NULL )
{
mUnselectedLabel = name;
mSelectedLabel = name;
@ -255,8 +254,6 @@ void LLButton::onCommit()
{
(*mClickedCallback)( mCallbackUserData );
}
mIsDirty = TRUE;
}
@ -271,7 +268,6 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent)
(*mClickedCallback)( mCallbackUserData );
}
handled = TRUE;
mIsDirty = TRUE;
}
return handled;
}
@ -288,7 +284,6 @@ BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent )
(*mClickedCallback)( mCallbackUserData );
}
handled = TRUE;
mIsDirty = TRUE;
}
}
return handled;
@ -348,9 +343,7 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask)
if (mClickedCallback)
{
(*mClickedCallback)( mCallbackUserData );
}
mIsDirty = TRUE;
}
}
mMouseDownTimer.stop();
@ -753,7 +746,6 @@ void LLButton::setToggleState(BOOL b)
void LLButton::setValue(const LLSD& value )
{
mToggleState = value.asBoolean();
mIsDirty = FALSE;
}
LLSD LLButton::getValue() const

View File

@ -80,8 +80,6 @@ public:
// HACK: "committing" a button is the same as clicking on it.
virtual void onCommit();
virtual BOOL isDirty() { return mIsDirty; }; // Returns TRUE if the user has clicked on the button at all
void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
@ -259,8 +257,6 @@ protected:
LLPointer<LLImageGL> mImagep;
BOOL mIsDirty;
static LLFrameTimer sFlashingTimer;
};

View File

@ -39,7 +39,8 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect,
mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ),
mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ),
mRadioStyle( use_radio_style ),
mInitialValue( initial_value )
mInitialValue( initial_value ),
mSetValue( initial_value )
{
if (font)
{
@ -208,7 +209,8 @@ void LLCheckBoxCtrl::draw()
//virtual
void LLCheckBoxCtrl::setValue(const LLSD& value )
{
mButton->setToggleState( value.asBoolean() );
mSetValue = value.asBoolean();
mButton->setToggleState( mSetValue );
}
//virtual
@ -249,16 +251,27 @@ void LLCheckBoxCtrl::setControlName(const LLString& control_name, LLView* contex
// virtual Returns TRUE if the user has modified this control.
BOOL LLCheckBoxCtrl::isDirty()
BOOL LLCheckBoxCtrl::isDirty() const
{
if ( mButton )
{
return mButton->isDirty();
return (mSetValue != mButton->getToggleState());
}
return FALSE; // Shouldn't get here
}
// virtual Clear dirty state
void LLCheckBoxCtrl::resetDirty()
{
if ( mButton )
{
mSetValue = mButton->getToggleState();
}
}
// virtual
LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const
{

View File

@ -90,7 +90,8 @@ public:
static void onButtonPress(void *userdata);
virtual BOOL isDirty(); // Returns TRUE if the user has modified this control.
virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
virtual void resetDirty(); // Clear dirty state
protected:
// note: value is stored in toggle state of button
@ -100,7 +101,8 @@ protected:
LLColor4 mTextEnabledColor;
LLColor4 mTextDisabledColor;
BOOL mRadioStyle;
BOOL mInitialValue;
BOOL mInitialValue; // Value set in constructor
BOOL mSetValue; // Value set programmatically
BOOL mKeyboardFocusOnClick;
LLViewBorder* mBorder;
};

View File

@ -227,6 +227,27 @@ void LLComboBox::onCommit()
LLUICtrl::onCommit();
}
// virtual
BOOL LLComboBox::isDirty() const
{
BOOL grubby = FALSE;
if ( mList )
{
grubby = mList->isDirty();
}
return grubby;
}
// virtual Clear dirty state
void LLComboBox::resetDirty()
{
if ( mList )
{
mList->resetDirty();
}
}
// add item "name" to menu
void LLComboBox::add(const LLString& name, EAddPosition pos, BOOL enabled)
{

View File

@ -68,6 +68,8 @@ public:
virtual void clear(); // select nothing
virtual void onCommit();
virtual BOOL acceptsTextInput() const { return mAllowTextEntry; }
virtual BOOL isDirty() const; // Returns TRUE if the user has modified this control.
virtual void resetDirty(); // Clear dirty state
virtual void setFocus(BOOL b);
@ -127,7 +129,7 @@ public:
virtual BOOL getCanSelect() const { return TRUE; }
virtual BOOL selectFirstItem() { return setCurrentByIndex(0); }
virtual BOOL selectNthItem( S32 index ) { return setCurrentByIndex(index); }
virtual S32 getFirstSelectedIndex() { return getCurrentIndex(); }
virtual S32 getFirstSelectedIndex() const { return getCurrentIndex(); }
virtual BOOL setCurrentByID( const LLUUID& id );
virtual LLUUID getCurrentID(); // LLUUID::null if no items in menu
virtual BOOL setSelectedByValue(LLSD value, BOOL selected);

View File

@ -36,7 +36,7 @@ public:
virtual BOOL selectFirstItem() = 0;
virtual BOOL selectNthItem( S32 index ) = 0;
virtual S32 getFirstSelectedIndex() = 0;
virtual S32 getFirstSelectedIndex() const = 0;
// TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function
virtual BOOL setCurrentByID( const LLUUID& id ) = 0;

View File

@ -1232,10 +1232,13 @@ BOOL LLFloater::getEditModeEnabled()
//static
void LLFloater::show(LLFloater* floaterp)
{
if (floaterp) floaterp->open();
if (floaterp->getHost())
if (floaterp)
{
floaterp->getHost()->open();
floaterp->open();
if (floaterp->getHost())
{
floaterp->getHost()->open();
}
}
}

View File

@ -118,6 +118,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect,
mSelectionEnd( 0 ),
mLastSelectionX(-1),
mLastSelectionY(-1),
mLastSelectionStart(-1),
mLastSelectionEnd(-1),
mPrevalidateFunc( prevalidate_func ),
mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
@ -227,6 +229,19 @@ void LLLineEditor::onCommit()
selectAll();
}
// virtual
BOOL LLLineEditor::isDirty() const
{
return ( mText.getString() != mPrevText );
}
// virtual
void LLLineEditor::resetDirty()
{
mPrevText = mText.getString();
}
// line history support
void LLLineEditor::updateHistory()
{
@ -448,8 +463,38 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
}
else
{
// otherwise select everything
selectAll();
const LLWString& wtext = mText.getWString();
BOOL doSelectAll = TRUE;
// Select the word we're on
if( isPartOfWord( wtext[mCursorPos] ) )
{
S32 old_selection_start = mLastSelectionStart;
S32 old_selection_end = mLastSelectionEnd;
// Select word the cursor is over
while ((mCursorPos > 0) && isPartOfWord( wtext[mCursorPos-1] ))
{ // Find the start of the word
mCursorPos--;
}
startSelection();
while ((mCursorPos < (S32)wtext.length()) && isPartOfWord( wtext[mCursorPos] ) )
{ // Find the end of the word
mCursorPos++;
}
mSelectionEnd = mCursorPos;
// If nothing changed, then the word was already selected. Select the whole line.
doSelectAll = (old_selection_start == mSelectionStart) &&
(old_selection_end == mSelectionEnd);
}
if ( doSelectAll )
{ // Select everything
selectAll();
}
}
// We don't want handleMouseUp() to "finish" the selection (and thereby
@ -476,6 +521,9 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
mLastSelectionStart = -1;
mLastSelectionStart = -1;
setFocus( TRUE );
if (mask & MASK_SHIFT)
@ -519,6 +567,10 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask)
}
else
{
// Save selection for word/line selecting on double-click
mLastSelectionStart = mSelectionStart;
mLastSelectionEnd = mSelectionEnd;
// Move cursor and deselect for regular click
setCursorAtLocalPos( x );
deselect();

View File

@ -107,7 +107,8 @@ public:
virtual void setRect(const LLRect& rect);
virtual BOOL acceptsTextInput() const;
virtual void onCommit();
virtual BOOL isDirty() { return ( mText.getString() != mPrevText ); }; // Returns TRUE if the user has changed value at all
virtual BOOL isDirty() const; // Returns TRUE if the user has changed value at all
virtual void resetDirty(); // Clear dirty state
// assumes UTF8 text
virtual void setValue(const LLSD& value );
@ -237,6 +238,8 @@ protected:
S32 mSelectionEnd;
S32 mLastSelectionX;
S32 mLastSelectionY;
S32 mLastSelectionStart;
S32 mLastSelectionEnd;
S32 (*mPrevalidateFunc)(const LLWString &str);

View File

@ -95,7 +95,7 @@ public:
/*virtual*/ BOOL getCanSelect() const { return TRUE; }
/*virtual*/ BOOL selectFirstItem() { return setSelectedIndex(0); }
/*virtual*/ BOOL selectNthItem( S32 index ) { return setSelectedIndex(index); }
/*virtual*/ S32 getFirstSelectedIndex() { return getSelectedIndex(); }
/*virtual*/ S32 getFirstSelectedIndex() const { return getSelectedIndex(); }
/*virtual*/ BOOL setCurrentByID( const LLUUID& id );
/*virtual*/ LLUUID getCurrentID(); // LLUUID::null if no items in menu
/*virtual*/ BOOL setSelectedByValue(LLSD value, BOOL selected);

View File

@ -427,6 +427,8 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
mSortColumn(-1),
mSortAscending(TRUE),
mSorted(TRUE),
mDirty(FALSE),
mOriginalSelection(-1),
mDrewSelected(FALSE)
{
mItemListRect.setOriginAndSize(
@ -515,6 +517,7 @@ void LLScrollListCtrl::clearRows()
mScrollLines = 0;
mLastSelected = NULL;
updateMaxContentWidth(NULL);
mDirty = FALSE;
}
@ -547,10 +550,10 @@ std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
return ret;
}
S32 LLScrollListCtrl::getFirstSelectedIndex()
S32 LLScrollListCtrl::getFirstSelectedIndex() const
{
S32 CurSelectedIndex = 0;
item_list::iterator iter;
item_list::const_iterator iter;
for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
{
LLScrollListItem* item = *iter;
@ -865,6 +868,7 @@ BOOL LLScrollListCtrl::selectFirstItem()
selectItem(itemp);
}
success = TRUE;
mOriginalSelection = 0;
}
else
{
@ -898,6 +902,7 @@ BOOL LLScrollListCtrl::selectNthItem( S32 target_index )
{
selectItem(itemp);
success = TRUE;
mOriginalSelection = target_index;
}
}
else
@ -1721,6 +1726,7 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask)
// always commit when mouse operation is completed inside list
if (mItemListRect.pointInRect(x,y))
{
mDirty |= mSelectionChanged;
mSelectionChanged = FALSE;
onCommit();
}
@ -2121,6 +2127,7 @@ void LLScrollListCtrl::commitIfChanged()
{
if (mSelectionChanged)
{
mDirty = TRUE;
mSelectionChanged = FALSE;
onCommit();
}
@ -2979,6 +2986,26 @@ void LLScrollListCtrl::setFocus(BOOL b)
LLUICtrl::setFocus(b);
}
// virtual
BOOL LLScrollListCtrl::isDirty() const
{
BOOL grubby = mDirty;
if ( !mAllowMultipleSelection )
{
grubby = (mOriginalSelection != getFirstSelectedIndex());
}
return grubby;
}
// Clear dirty state
void LLScrollListCtrl::resetDirty()
{
mDirty = FALSE;
mOriginalSelection = getFirstSelectedIndex();
}
//virtual
void LLScrollListCtrl::onFocusReceived()
{

View File

@ -440,7 +440,7 @@ public:
LLUUID getStringUUIDSelectedItem();
LLScrollListItem* getFirstSelected() const;
virtual S32 getFirstSelectedIndex();
virtual S32 getFirstSelectedIndex() const;
std::vector<LLScrollListItem*> getAllSelected() const;
LLScrollListItem* getLastSelectedItem() const { return mLastSelected; }
@ -495,6 +495,9 @@ public:
virtual void onFocusReceived();
virtual void onFocusLost();
virtual BOOL isDirty() const;
virtual void resetDirty(); // Clear dirty state
virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
virtual void arrange(S32 max_width, S32 max_height);
virtual LLRect getRequiredRect();
@ -638,6 +641,9 @@ protected:
std::map<LLString, LLScrollListColumn> mColumns;
std::vector<LLScrollListColumn*> mColumnsIndexed;
BOOL mDirty;
S32 mOriginalSelection;
public:
// HACK: Did we draw one selected item this frame?
BOOL mDrewSelected;

View File

@ -334,6 +334,8 @@ LLTextEditor::LLTextEditor(
appendText(default_text, FALSE, FALSE);
resetDirty(); // Update saved text state
mParseHTML=FALSE;
mHTML="";
}
@ -509,6 +511,8 @@ void LLTextEditor::setText(const LLString &utf8str)
updateLineStartList();
updateScrollFromCursor();
resetDirty();
}
void LLTextEditor::setWText(const LLWString &wtext)
@ -525,6 +529,8 @@ void LLTextEditor::setWText(const LLWString &wtext)
updateLineStartList();
updateScrollFromCursor();
resetDirty();
}
void LLTextEditor::setValue(const LLSD& value)
@ -3427,6 +3433,7 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr
BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax());
S32 selection_start = mSelectionStart;
S32 selection_end = mSelectionEnd;
BOOL was_selecting = mIsSelecting;
S32 cursor_pos = mCursorPos;
S32 old_length = getLength();
BOOL cursor_was_at_end = (mCursorPos == old_length);
@ -3459,17 +3466,23 @@ void LLTextEditor::appendText(const LLString &new_text, bool allow_undo, bool pr
updateLineStartList(old_length);
// Set the cursor and scroll position
// Maintain the scroll position unless the scroll was at the end of the doc
// (in which case, move it to the new end of the doc)
if( was_scrolled_to_bottom )
// Maintain the scroll position unless the scroll was at the end of the doc (in which
// case, move it to the new end of the doc) or unless the user was doing actively selecting
if( was_scrolled_to_bottom && !was_selecting )
{
if( selection_start != selection_end )
{
// maintain an existing non-active selection
mSelectionStart = selection_start;
mSelectionEnd = selection_end;
}
endOfDoc();
}
else if( selection_start != selection_end )
{
mSelectionStart = selection_start;
mSelectionEnd = selection_end;
mIsSelecting = was_selecting;
setCursorPos(cursor_pos);
}
else if( cursor_was_at_end )
@ -3606,6 +3619,11 @@ BOOL LLTextEditor::tryToRevertToPristineState()
return isPristine(); // TRUE => success
}
// virtual Return TRUE if changes have been made
BOOL LLTextEditor::isDirty() const
{
return( mLastCmd != NULL || (mPristineCmd && (mPristineCmd != mLastCmd)) );
}
void LLTextEditor::updateTextRect()

View File

@ -89,6 +89,7 @@ public:
virtual void clear();
virtual void setFocus( BOOL b );
virtual BOOL acceptsTextInput() const;
virtual BOOL isDirty() const;
// LLEditMenuHandler interface
virtual void undo();

View File

@ -129,7 +129,9 @@ public:
};
// Returns TRUE if the user has modified this control. Editable controls should override this.
virtual BOOL isDirty() { return FALSE; };
virtual BOOL isDirty() const { return FALSE; };
// Clear the dirty state
virtual void resetDirty() {};
protected:
virtual void onFocusReceived();

View File

@ -156,11 +156,7 @@ LLDir_Mac::LLDir_Mac()
FSRefToLLString(&tempRef, mTempDir);
}
// Set the working dir to <bundle>/Contents/Resources
(void) chdir(mAppRODataDir.c_str());
// Canonically, since we set it here...
mWorkingDir = mAppRODataDir;
mWorkingDir = getCurPath();
CFRelease(executableURLRef);
executableURLRef = NULL;

View File

@ -872,11 +872,11 @@ BOOL LLVFS::setMaxSize(const LLUUID &file_id, const LLAssetType::EType file_type
{
llwarns << "Short write" << llendl;
}
delete[] buffer;
} else {
llwarns << "Short read" << llendl;
}
delete[] buffer;
}
}

View File

@ -93,6 +93,7 @@ BOOL ll_try_gtk_init(void)
if (!tried_gtk_init)
{
tried_gtk_init = TRUE;
if (!g_thread_supported ()) g_thread_init (NULL);
maybe_lock_display();
gtk_is_good = gtk_init_check(NULL, NULL);
maybe_unlock_display();

View File

@ -53,7 +53,6 @@
%token QUATERNION
%token LIST
%token STATE_DEFAULT
%token STATE
%token EVENT
%token JUMP

View File

@ -8937,8 +8937,12 @@ void LLScriptEventHandler::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi
{
entrycount = 0;
mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, mScopeEntry, entrycount, NULL);
fprintf(fp, "Function Args: %s\n", mScopeEntry->mFunctionArgs.mString);
fprintf(fp, "Local List: %s\n", mScopeEntry->mLocals.mString);
const char *function_args = mScopeEntry->mFunctionArgs.mString;
fprintf(fp, "Function Args: %s\n", function_args?function_args:"");
const char *local_list = mScopeEntry->mLocals.mString;
fprintf(fp, "Local List: %s\n", local_list?local_list:"");
}
mStackSpace = (S32)count;
break;

View File

@ -34,6 +34,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
UseOcclusion 1 1
RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)

View File

@ -34,6 +34,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
UseOcclusion 1 1
RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)
@ -107,6 +109,8 @@ RenderAvatarVP 0 0
RenderLighting 1 0
RenderParticleCount 1 1024
RenderTerrainDetail 1 0
RenderCubeMap 0 0
UseOcclusion 0 0
list low
@ -145,6 +149,7 @@ RenderVBO 1 0
RenderAniso 1 0
RenderLighting 1 0
RenderTerrainDetail 1 0
RenderCubeMap 0 0
list GeForce2
RenderVBO 1 1
@ -156,6 +161,7 @@ RenderTerrainDetail 1 0
list GeForce3
list ATI
UseOcclusion 0 0
list Radeon8500
RenderLighting 1 0

View File

@ -35,7 +35,8 @@ RenderParticleCount 1 4096
RenderRippleWater 1 1
RenderTerrainDetail 1 2
VertexShaderEnable 1 1
UseOcclusion 1 1
RenderCubeMap 1 1
//
// Class 0 Hardware (Unknown or just old)

View File

@ -25,6 +25,8 @@ ATI Mobility Radeon X1xxx .*ATI.*Mobility.*X1.* 2
ATI Mobility Radeon X3xx .*ATI.*Mobility.*X3.* 1
ATI Mobility Radeon X6xx .*ATI.*Mobility.*X6.* 1
ATI Mobility Radeon X7xx .*ATI.*Mobility.*X7.* 1
ATI Mobility Radeon Xxxx .*ATI.*Mobility.*X.* 1
ATI Mobility Radeon .*ATI.*Mobility.* 0
ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 3
ATI Diamond X1xxx .*ATI.*Diamond.*X1.* 3
ATI FireGL 5xxx .*ATI.*FireGL V5.* 3

View File

@ -97,6 +97,10 @@ you wish.
These are the most commonly-encountered known issues which are specific to
the Alpha release of the Linux client.
* VOICE COMMUNICATION - this is not yet available in the Linux client.
* STREAMING MOVIES - these are currently disabled while we work on some issues.
* VISUAL EFFECTS AND PERFORMANCE - many Linux graphics drivers are not as
robust as their counterparts for other operating systems, so some advanced
Second Life graphical features have been DISABLED by default to aid

View File

@ -43,6 +43,9 @@ export LL_GL_BASICEXT=x
## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
export SDL_VIDEO_X11_DGAMOUSE=0
## - Works around a problem with misconfigured 64-bit systems not finding GL
export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH}":/usr/lib64/dri:/usr/lib32/dri:/usr/lib/dri
## Nothing worth editing below this line.
##-------------------------------------------------------------------

View File

@ -5592,7 +5592,7 @@ void LLAgent::teleportCancel()
sendReliableMessage();
}
gTeleportDisplay = FALSE;
gAgent.setTeleportState( LLAgent::TELEPORT_CANCELLING );
gAgent.setTeleportState( LLAgent::TELEPORT_NONE );
}

View File

@ -509,8 +509,7 @@ public:
TELEPORT_REQUESTED = 2, // Waiting for source simulator to respond
TELEPORT_MOVING = 3, // Viewer has received destination location from source simulator
TELEPORT_START_ARRIVAL = 4, // Transition to ARRIVING. Viewer has received avatar update, etc., from destination simulator
TELEPORT_ARRIVING = 5, // Make the user wait while content "pre-caches"
TELEPORT_CANCELLING = 6 // used only if user clicks "cancel" button
TELEPORT_ARRIVING = 5 // Make the user wait while content "pre-caches"
};
ETeleportState getTeleportState() const { return mTeleportState; }

View File

@ -75,8 +75,8 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
{
case 400:
args["[FILE]"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
args["[REASON]"] = "Error in upload request. Please contact "
"support@lindenlab.com for help fixing this problem.";
args["[REASON]"] = "Error in upload request. Please visit "
"http://secondlife.com/support for help fixing this problem.";
gViewerWindow->alertXml("CannotUploadReason", args);
break;
case 500:

View File

@ -346,7 +346,7 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
// static
void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
void* user_data, S32 status)
void* user_data, S32 status, LLExtStat ext_status)
{
llinfos << "LLFloaterCompileQueue::scriptArrived()" << llendl;
LLScriptQueueData* data = (LLScriptQueueData*)user_data;
@ -429,7 +429,7 @@ void LLFloaterCompileQueue::scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
}
// static
void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveTextComplete()" << llendl;
if (status)
@ -442,7 +442,7 @@ void LLFloaterCompileQueue::onSaveTextComplete(const LLUUID& asset_id, void* use
}
// static
void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
void LLFloaterCompileQueue::onSaveBytecodeComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
llinfos << "LLFloaterCompileQueue::onSaveBytecodeComplete()" << llendl;
LLCompileQueueData* data = (LLCompileQueueData*)user_data;

View File

@ -113,12 +113,12 @@ protected:
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
LLAssetType::EType type,
void* user_data, S32 status);
void* user_data, S32 status, LLExtStat ext_status);
static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status);
static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
static void onSaveBytecodeComplete(const LLUUID& asset_id,
void* user_data,
S32 status);
S32 status, LLExtStat ext_status);
// compile the file given and save it out.
void compile(const char* filename, const LLUUID& asset_id);

View File

@ -449,12 +449,14 @@ LLDrawPool* LLRenderPass::instancePool()
void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
pushBatch(params, mask, texture);
LLDrawInfo *pparams = *k;
if (pparams) {
pushBatch(*pparams, mask, texture);
}
}
}
@ -464,14 +466,15 @@ void LLRenderPass::renderInvisible(U32 mask)
LLGLState::checkClientArrays(mask);
#endif
std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
LLDrawInfo *pparams = *i;
if (pparams && pparams->mVertexBuffer.notNull()) {
LLDrawInfo &params = *pparams;
if (params.mVertexBuffer)
{
params.mVertexBuffer->setBuffer(mask);
U32 *indices_pointer =
(U32 *) params.mVertexBuffer->getIndicesPointer();
@ -489,22 +492,19 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
pushBatch(params, mask, TRUE);
LLDrawInfo* pparams = *i;
if (pparams) {
pushBatch(*pparams, mask, TRUE);
}
}
}
void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
if (params.mVertexBuffer.isNull())
{
return;
}
if (texture)
{
if (params.mTexture.notNull())
@ -522,12 +522,15 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
LLImageGL::unbindTexture(0);
}
}
params.mVertexBuffer->setBuffer(mask);
U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
GL_UNSIGNED_INT, indices_pointer+params.mOffset);
gPipeline.mTrianglesDrawn += params.mCount/3;
if (params.mVertexBuffer.notNull())
{
params.mVertexBuffer->setBuffer(mask);
U32* indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
GL_UNSIGNED_INT, indices_pointer+params.mOffset);
gPipeline.mTrianglesDrawn += params.mCount/3;
}
if (params.mTextureMatrix && texture && params.mTexture.notNull())
{

View File

@ -199,9 +199,9 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask, std::vector<LLSpatialGroup*
last_part = part;
}
std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[LLRenderPass::PASS_ALPHA];
for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
@ -225,7 +225,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
{
BOOL light_enabled = TRUE;
std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
U32 prim_type = GL_TRIANGLES;
@ -252,7 +252,7 @@ void LLDrawPoolAlpha::renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask
glPointSize(width/(view*view));
}*/
for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if (texture && params.mTexture.notNull())

View File

@ -330,9 +330,9 @@ void LLDrawPoolBump::renderActive(U32 type, U32 mask, BOOL texture)
void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE)
{
std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;
if (LLPipeline::sDynamicReflections)
@ -879,9 +879,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
LLGLState::checkClientArrays(mask);
#endif
std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = gPipeline.mRenderMap[type];
for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
for (LLSpatialGroup::drawmap_elem_t::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
@ -894,9 +894,9 @@ void LLDrawPoolBump::renderBump(U32 type, U32 mask)
void LLDrawPoolBump::renderGroupBump(LLSpatialGroup* group, U32 type, U32 mask)
{
const std::vector<LLDrawInfo*>& draw_info = group->mDrawMap[type];
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
for (std::vector<LLDrawInfo*>::const_iterator k = draw_info.begin(); k != draw_info.end(); ++k)
for (LLSpatialGroup::drawmap_elem_t::iterator k = draw_info.begin(); k != draw_info.end(); ++k)
{
LLDrawInfo& params = **k;

View File

@ -72,8 +72,8 @@ LLDrawPool *LLDrawPoolWater::instancePool()
void LLDrawPoolWater::prerender()
{
mVertexShaderLevel = gSavedSettings.getBOOL("RenderRippleWater") ?
LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
mVertexShaderLevel = (gSavedSettings.getBOOL("RenderRippleWater") && gGLManager.mHasCubeMap && gFeatureManagerp->isFeatureAvailable("RenderCubeMap")) ?
LLShaderMgr::getVertexShaderLevel(LLShaderMgr::SHADER_ENVIRONMENT) : 0;
}
@ -545,7 +545,7 @@ void LLDrawPoolWater::shade()
LLCubeMap* skyMap = gSky.mVOSkyp->getCubeMap();
gWaterProgram.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, GL_TEXTURE_CUBE_MAP_ARB);
skyMap->bind();
skyMap->bind();
//bind normal map
S32 bumpTex = gWaterProgram.enableTexture(LLShaderMgr::BUMP_MAP);

View File

@ -185,8 +185,6 @@ BOOL LLDynamicTexture::updateAllInstances()
return TRUE;
}
BOOL started = FALSE;
BOOL result = FALSE;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
@ -195,29 +193,22 @@ BOOL LLDynamicTexture::updateAllInstances()
dynamicTexture = LLDynamicTexture::sInstances[order].getNextData())
{
if (dynamicTexture->needsRender())
{
if (!started)
{
started = TRUE;
LLVertexBuffer::startRender();
}
dynamicTexture->preRender();
{
dynamicTexture->preRender(); // Must be called outside of startRender()
LLVertexBuffer::startRender();
if (dynamicTexture->render())
{
result = TRUE;
sNumRenders++;
}
LLVertexBuffer::stopRender();
dynamicTexture->postRender(result);
}
}
}
if (started)
{
LLVertexBuffer::stopRender();
}
return result;
}

View File

@ -382,7 +382,7 @@ void LLFeatureManager::cleanupFeatureTables()
void LLFeatureManager::initCPUFeatureMasks()
{
if (gSysMemory.getPhysicalMemory() <= 256*1024*1024)
if (gSysMemory.getPhysicalMemoryClamped() <= 256*1024*1024)
{
maskFeatures("RAM256MB");
}
@ -474,7 +474,7 @@ extern LLOSInfo gSysOS;
void LLFeatureManager::applyRecommendedFeatures()
{
// see featuretable.txt
// see featuretable.txt / featuretable_linux.txt / featuretable_mac.txt
llinfos << "Applying Recommended Features" << llendl;
#ifndef LL_RELEASE_FOR_DOWNLOAD
@ -524,6 +524,10 @@ void LLFeatureManager::applyRecommendedFeatures()
// RippleWater
BOOL ripple = getRecommendedLevel("RenderRippleWater");
gSavedSettings.setBOOL("RenderRippleWater", ripple);
// Occlusion Culling
BOOL occlusion = getRecommendedLevel("UseOcclusion");
gSavedSettings.setBOOL("UseOcclusion", occlusion);
// Vertex Shaders
S32 shaders = getRecommendedLevel("VertexShaderEnable");

View File

@ -623,6 +623,15 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->updateRelativeXform();
doFlexibleUpdate();
// Object may have been rotated, which means it needs a rebuild. See SL-47220
BOOL rotated = FALSE;
LLQuaternion cur_rotation = getFrameRotation();
if ( cur_rotation != mLastFrameRotation )
{
mLastFrameRotation = cur_rotation;
rotated = TRUE;
}
if (volume->mLODChanged || volume->mFaceMappingChanged ||
volume->mVolumeChanged)
{
@ -630,7 +639,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME);
}
if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged)
if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged || rotated)
{
doFlexibleRebuild();
volume->genBBoxes(isVolumeGlobal());

View File

@ -97,7 +97,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
LLVector3 mAnchorPosition;
LLVector3 mParentPosition;
LLQuaternion mParentRotation;
LLQuaternion mInitialAxisRotation;
LLQuaternion mLastFrameRotation;
LLQuaternion mLastSegmentRotation;
BOOL mInitialized;
BOOL mUpdated;

View File

@ -99,9 +99,8 @@ LLFloaterAbout::LLFloaterAbout()
support.append( gSysCPU.getCPUString() );
support.append("\n");
U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024;
// For some reason, the reported amount of memory is always wrong by one meg
memory++;
U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
// Moved hack adjustment to Windows memory size into llsys.cpp
LLString mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
@ -147,8 +146,15 @@ LLFloaterAbout::LLFloaterAbout()
// Fix views
childDisable("credits_editor");
childDisable("support_editor");
childSetText("support_editor", support);
LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true);
if (support_widget)
{
support_widget->setEnabled( FALSE );
support_widget->setTakesFocus( TRUE );
support_widget->setText( support );
support_widget->setHandleEditKeysDirectly( TRUE );
}
center();

View File

@ -82,7 +82,7 @@ public:
static void onSaveComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data,
S32 status);
S32 status, LLExtStat ext_status);
protected:
void draw();
void resetMotion();

View File

@ -35,9 +35,9 @@
///----------------------------------------------------------------------------
void auction_j2c_upload_done(const LLUUID& asset_id,
void* user_data, S32 status);
void* user_data, S32 status, LLExtStat ext_status);
void auction_tga_upload_done(const LLUUID& asset_id,
void* user_data, S32 status);
void* user_data, S32 status, LLExtStat ext_status);
///----------------------------------------------------------------------------
/// Class llfloaterauction
@ -238,7 +238,7 @@ void LLFloaterAuction::onClickOK(void* data)
/// Local function definitions
///----------------------------------------------------------------------------
void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
llinfos << "Upload of asset '" << *name << "' " << asset_id
@ -259,7 +259,7 @@ void auction_tga_upload_done(const LLUUID& asset_id, void* user_data, S32 status
}
}
void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status) // StoreAssetData callback (fixed)
void auction_j2c_upload_done(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLString* name = (LLString*)(user_data);
llinfos << "Upload of asset '" << *name << "' " << asset_id

View File

@ -177,29 +177,33 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata)
}
}
// static callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)data;
if (!self)
if (self)
{
self->doSelectionChange( items, user_action, data );
}
}
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
if (!mListNames)
{
return;
}
self->mAvatarIDs.clear();
self->mAvatarNames.clear();
// if we have calling cards, disable select button until
// the inventory picks a valid calling card
if (!items.empty())
{
self->childSetEnabled("Select", FALSE);
std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
if ( search_items.size() == 0 )
{ // Nothing selected in the search results
mAvatarIDs.clear();
mAvatarNames.clear();
childSetEnabled("Select", FALSE);
}
if (!self->mListNames)
{
return;
}
BOOL first_calling_card = TRUE;
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
@ -210,10 +214,18 @@ void LLFloaterAvatarPicker::onSelectionChange(const std::deque<LLFolderViewItem*
if (item)
{
self->mAvatarIDs.push_back(item->getCreatorUUID());
self->mAvatarNames.push_back(listenerp->getName());
self->childSetEnabled("Select", TRUE);
self->mListNames->deselectAllItems();
if ( first_calling_card )
{ // Have a calling card selected, so clear anything from the search panel
first_calling_card = FALSE;
mAvatarIDs.clear();
mAvatarNames.clear();
mListNames->deselectAllItems();
}
// Add calling card info to the selected avatars
mAvatarIDs.push_back(item->getCreatorUUID());
mAvatarNames.push_back(listenerp->getName());
childSetEnabled("Select", TRUE);
}
}
}

View File

@ -44,6 +44,8 @@ protected:
static void onBtnAdd(void* userdata);
static void onBtnClose(void* userdata);
static void onList(LLUICtrl* ctrl, void* userdata);
void doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
void find();

View File

@ -73,12 +73,13 @@ LLPanelFriends::~LLPanelFriends()
delete mObserver;
}
void LLPanelFriends::tick()
BOOL LLPanelFriends::tick()
{
mEventTimer.stop();
mPeriod = 1000000;
mAllowRightsChange = TRUE;
updateFriends(LLFriendObserver::ADD);
return FALSE;
}
void LLPanelFriends::updateFriends(U32 changed_mask)

View File

@ -37,7 +37,7 @@ public:
* current instantiation of this floater. There is only once since
* you can currently only look at your local friends.
*/
virtual void tick();
virtual BOOL tick();
/**
* @brief This method is called in response to the LLAvatarTracker

View File

@ -1399,7 +1399,7 @@ void LLPanelRequestTools::onClickRequest(void* data)
}
}
void terrain_download_done(void** data, S32 status)
void terrain_download_done(void** data, S32 status, LLExtStat ext_status)
{
LLNotifyBox::showXml("TerrainDownloaded");
}

View File

@ -87,7 +87,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite()
}
// static
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids)
{
// Make sure group_id isn't null
if (group_id.isNull())
@ -111,6 +111,11 @@ void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id)
fgi->mImpl->mInvitePanelp->clear();
}
if (agent_ids != NULL)
{
fgi->mImpl->mInvitePanelp->addUsers(*agent_ids);
}
fgi->center();
fgi->open(); /*Flawfinder: ignore*/

View File

@ -19,7 +19,7 @@ class LLFloaterGroupInvite
public:
virtual ~LLFloaterGroupInvite();
static void showForGroup(const LLUUID &group_id);
static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL);
protected:
LLFloaterGroupInvite(const std::string& name,

View File

@ -18,6 +18,7 @@
#include "llfloatergroups.h"
#include "message.h"
#include "roles_constants.h"
#include "llagent.h"
#include "llbutton.h"
@ -36,7 +37,7 @@
std::map<const LLUUID, LLFloaterGroupPicker*> LLFloaterGroupPicker::sInstances;
// helper functions
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id);
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask = GP_ALL_POWERS);
///----------------------------------------------------------------------------
/// Class LLFloaterGroupPicker
@ -63,7 +64,8 @@ LLFloaterGroupPicker* LLFloaterGroupPicker::createInstance(const LLSD &seed)
LLFloaterGroupPicker::LLFloaterGroupPicker(const LLSD& seed) :
mSelectCallback(NULL),
mCallbackUserdata(NULL)
mCallbackUserdata(NULL),
mPowersMask(GP_ALL_POWERS)
{
mID = seed.asUUID();
sInstances.insert(std::make_pair(mID, this));
@ -81,9 +83,16 @@ void LLFloaterGroupPicker::setSelectCallback(void (*callback)(LLUUID, void*),
mCallbackUserdata = userdata;
}
void LLFloaterGroupPicker::setPowersMask(U64 powers_mask)
{
mPowersMask = powers_mask;
postBuild();
}
BOOL LLFloaterGroupPicker::postBuild()
{
init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID());
init_group_list(LLUICtrlFactory::getScrollListByName(this, "group list"), gAgent.getGroupID(), mPowersMask);
childSetAction("OK", onBtnOK, this);
@ -394,7 +403,7 @@ void LLPanelGroups::onGroupList(LLUICtrl* ctrl, void* userdata)
if(self) self->enableButtons();
}
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id, U64 powers_mask)
{
S32 count = gAgent.mGroups.count();
LLUUID id;
@ -407,20 +416,22 @@ void init_group_list(LLScrollListCtrl* ctrl, const LLUUID& highlight_id)
{
id = gAgent.mGroups.get(i).mID;
LLGroupData* group_datap = &gAgent.mGroups.get(i);
LLString style = "NORMAL";
if(highlight_id == id)
{
style = "BOLD";
if ((group_datap->mPowers & powers_mask) != 0) {
LLString style = "NORMAL";
if(highlight_id == id)
{
style = "BOLD";
}
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = group_datap->mName;
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][0]["font-style"] = style;
group_list->addElement(element, ADD_SORTED);
}
LLSD element;
element["id"] = id;
element["columns"][0]["column"] = "name";
element["columns"][0]["value"] = group_datap->mName;
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][0]["font-style"] = style;
group_list->addElement(element, ADD_SORTED);
}
// add "none" to list at top

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