svn merge -r 58902:58986 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
parent
6fa974fc64
commit
b36dc36306
|
|
@ -20,16 +20,16 @@ const char* const BLACKLIST_PROFILE_WEB_URL = "http://secondlife.com/app/webdisa
|
|||
// Maximum number of avatar picks
|
||||
const S32 MAX_AVATAR_PICKS = 10;
|
||||
|
||||
// For Flags in AvatarPropertiesReply
|
||||
const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
|
||||
const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
|
||||
const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
|
||||
// For Flags in AvatarPropertiesReply
|
||||
const U32 AVATAR_ALLOW_PUBLISH = 0x1 << 0; // whether profile is externally visible or not
|
||||
const U32 AVATAR_MATURE_PUBLISH = 0x1 << 1; // profile is "mature"
|
||||
const U32 AVATAR_IDENTIFIED = 0x1 << 2; // whether avatar has provided payment info
|
||||
const U32 AVATAR_TRANSACTED = 0x1 << 3; // whether avatar has actively used payment info
|
||||
const U32 AVATAR_ONLINE = 0x1 << 4; // the online status of this avatar, if known.
|
||||
|
||||
static const std::string VISIBILITY_DEFAULT("default");
|
||||
static const std::string VISIBILITY_DEFAULT("default");
|
||||
static const std::string VISIBILITY_HIDDEN("hidden");
|
||||
static const std::string VISIBILITY_VISIBLE("visible");
|
||||
static const std::string VISIBILITY_VISIBLE("visible");
|
||||
static const std::string VISIBILITY_INVISIBLE("invisible");
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,43 +1,43 @@
|
|||
/**
|
||||
* @file llbase64.cpp
|
||||
* @brief Wrapper for apr base64 encoding that returns a std::string
|
||||
* @author James Cook
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llbase64.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "apr-1/apr_base64.h"
|
||||
|
||||
|
||||
// static
|
||||
std::string LLBase64::encode(const U8* input, size_t input_size)
|
||||
{
|
||||
std::string output;
|
||||
if (input
|
||||
&& input_size > 0)
|
||||
{
|
||||
// Yes, it returns int.
|
||||
int b64_buffer_length = apr_base64_encode_len(input_size);
|
||||
char* b64_buffer = new char[b64_buffer_length];
|
||||
|
||||
// This is faster than apr_base64_encode() if you know
|
||||
// you're not on an EBCDIC machine. Also, the output is
|
||||
// null terminated, even though the documentation doesn't
|
||||
// specify. See apr_base64.c for details. JC
|
||||
b64_buffer_length = apr_base64_encode_binary(
|
||||
b64_buffer,
|
||||
input,
|
||||
input_size);
|
||||
output.assign(b64_buffer);
|
||||
delete[] b64_buffer;
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @file llbase64.cpp
|
||||
* @brief Wrapper for apr base64 encoding that returns a std::string
|
||||
* @author James Cook
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llbase64.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "apr-1/apr_base64.h"
|
||||
|
||||
|
||||
// static
|
||||
std::string LLBase64::encode(const U8* input, size_t input_size)
|
||||
{
|
||||
std::string output;
|
||||
if (input
|
||||
&& input_size > 0)
|
||||
{
|
||||
// Yes, it returns int.
|
||||
int b64_buffer_length = apr_base64_encode_len(input_size);
|
||||
char* b64_buffer = new char[b64_buffer_length];
|
||||
|
||||
// This is faster than apr_base64_encode() if you know
|
||||
// you're not on an EBCDIC machine. Also, the output is
|
||||
// null terminated, even though the documentation doesn't
|
||||
// specify. See apr_base64.c for details. JC
|
||||
b64_buffer_length = apr_base64_encode_binary(
|
||||
b64_buffer,
|
||||
input,
|
||||
input_size);
|
||||
output.assign(b64_buffer);
|
||||
delete[] b64_buffer;
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* @file llbase64.h
|
||||
* @brief Wrapper for apr base64 encoding that returns a std::string
|
||||
* @author James Cook
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLBASE64_H
|
||||
#define LLBASE64_h
|
||||
|
||||
class LLBase64
|
||||
{
|
||||
public:
|
||||
static std::string encode(const U8* input, size_t input_size);
|
||||
};
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @file llbase64.h
|
||||
* @brief Wrapper for apr base64 encoding that returns a std::string
|
||||
* @author James Cook
|
||||
*
|
||||
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLBASE64_H
|
||||
#define LLBASE64_h
|
||||
|
||||
class LLBase64
|
||||
{
|
||||
public:
|
||||
static std::string encode(const U8* input, size_t input_size);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ public:
|
|||
FTM_UPDATE,
|
||||
FTM_RENDER,
|
||||
FTM_SWAP,
|
||||
FTM_CLIENT_COPY,
|
||||
FTM_IDLE,
|
||||
FTM_SLEEP,
|
||||
|
||||
|
|
|
|||
|
|
@ -1,46 +1,46 @@
|
|||
/**
|
||||
* @file llliveappconfig.cpp
|
||||
* @brief Configuration information for an LLApp that overrides indra.xml
|
||||
*
|
||||
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llliveappconfig.h"
|
||||
|
||||
#include "llapp.h"
|
||||
#include "llsd.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
LLLiveAppConfig::LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period)
|
||||
: LLLiveFile(filename, refresh_period),
|
||||
mApp(app)
|
||||
{ }
|
||||
|
||||
|
||||
LLLiveAppConfig::~LLLiveAppConfig()
|
||||
{ }
|
||||
|
||||
// virtual
|
||||
void LLLiveAppConfig::loadFile()
|
||||
{
|
||||
llinfos << "LLLiveAppConfig::loadFile(): reading from "
|
||||
<< filename() << llendl;
|
||||
llifstream file(filename().c_str());
|
||||
LLSD config;
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(config, file);
|
||||
if(!config.isMap())
|
||||
{
|
||||
llinfos << "LLDataserverConfig::loadFile(): not an map!"
|
||||
<< " Ignoring the data." << llendl;
|
||||
return;
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
mApp->setOptionData(
|
||||
LLApp::PRIORITY_SPECIFIC_CONFIGURATION, config);
|
||||
}
|
||||
/**
|
||||
* @file llliveappconfig.cpp
|
||||
* @brief Configuration information for an LLApp that overrides indra.xml
|
||||
*
|
||||
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llliveappconfig.h"
|
||||
|
||||
#include "llapp.h"
|
||||
#include "llsd.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
LLLiveAppConfig::LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period)
|
||||
: LLLiveFile(filename, refresh_period),
|
||||
mApp(app)
|
||||
{ }
|
||||
|
||||
|
||||
LLLiveAppConfig::~LLLiveAppConfig()
|
||||
{ }
|
||||
|
||||
// virtual
|
||||
void LLLiveAppConfig::loadFile()
|
||||
{
|
||||
llinfos << "LLLiveAppConfig::loadFile(): reading from "
|
||||
<< filename() << llendl;
|
||||
llifstream file(filename().c_str());
|
||||
LLSD config;
|
||||
if (file.is_open())
|
||||
{
|
||||
LLSDSerialize::fromXML(config, file);
|
||||
if(!config.isMap())
|
||||
{
|
||||
llinfos << "LLDataserverConfig::loadFile(): not an map!"
|
||||
<< " Ignoring the data." << llendl;
|
||||
return;
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
mApp->setOptionData(
|
||||
LLApp::PRIORITY_SPECIFIC_CONFIGURATION, config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
/**
|
||||
* @file llliveappconfig.h
|
||||
* @brief Configuration information for an LLApp that overrides indra.xml
|
||||
*
|
||||
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLLIVEAPPCONFIG_H
|
||||
#define LLLIVEAPPCONFIG_H
|
||||
|
||||
#include "lllivefile.h"
|
||||
|
||||
class LLApp;
|
||||
|
||||
class LLLiveAppConfig : public LLLiveFile
|
||||
{
|
||||
public:
|
||||
// To use this, instantiate a LLLiveAppConfig object inside your main loop.
|
||||
// The traditional name for it is live_config.
|
||||
// Be sure to call live_config.checkAndReload() periodically.
|
||||
|
||||
LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period);
|
||||
~LLLiveAppConfig();
|
||||
|
||||
protected:
|
||||
/*virtual*/ void loadFile();
|
||||
|
||||
private:
|
||||
LLApp* mApp;
|
||||
};
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @file llliveappconfig.h
|
||||
* @brief Configuration information for an LLApp that overrides indra.xml
|
||||
*
|
||||
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLLIVEAPPCONFIG_H
|
||||
#define LLLIVEAPPCONFIG_H
|
||||
|
||||
#include "lllivefile.h"
|
||||
|
||||
class LLApp;
|
||||
|
||||
class LLLiveAppConfig : public LLLiveFile
|
||||
{
|
||||
public:
|
||||
// To use this, instantiate a LLLiveAppConfig object inside your main loop.
|
||||
// The traditional name for it is live_config.
|
||||
// Be sure to call live_config.checkAndReload() periodically.
|
||||
|
||||
LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period);
|
||||
~LLLiveAppConfig();
|
||||
|
||||
protected:
|
||||
/*virtual*/ void loadFile();
|
||||
|
||||
private:
|
||||
LLApp* mApp;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -359,8 +359,7 @@ LLURI LLURI::buildHTTP(const std::string& host_port,
|
|||
LLURI result;
|
||||
|
||||
// TODO: deal with '/' '?' '#' in host_port
|
||||
S32 index = host_port.find("://");
|
||||
if (index != host_port.npos)
|
||||
if (host_port.find("://") != host_port.npos)
|
||||
{
|
||||
// The scheme is part of the host_port
|
||||
result.mScheme = "";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const LLMetaClass& LLMetaProperty::getObjectMetaClass() const
|
|||
{
|
||||
return mObjectClass;
|
||||
}
|
||||
|
||||
|
||||
void LLMetaProperty::checkObjectClass(const LLReflective* object) const
|
||||
{
|
||||
if(! mObjectClass.isInstance(object))
|
||||
|
|
|
|||
|
|
@ -1,165 +1,165 @@
|
|||
/**
|
||||
* @file llimage.cpp
|
||||
* @brief Base class for images.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llimageworker.h"
|
||||
#include "llimagedxt.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//static
|
||||
LLWorkerThread* LLImageWorker::sWorkerThread = NULL;
|
||||
S32 LLImageWorker::sCount = 0;
|
||||
|
||||
//static
|
||||
void LLImageWorker::initClass(LLWorkerThread* workerthread)
|
||||
{
|
||||
sWorkerThread = workerthread;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLImageWorker::cleanupClass()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LLImageWorker::LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder)
|
||||
: LLWorkerClass(sWorkerThread, "Image"),
|
||||
mFormattedImage(image),
|
||||
mDecodedType(-1),
|
||||
mDiscardLevel(discard),
|
||||
mPriority(priority),
|
||||
mResponder(responder)
|
||||
{
|
||||
++sCount;
|
||||
}
|
||||
|
||||
LLImageWorker::~LLImageWorker()
|
||||
{
|
||||
mDecodedImage = NULL;
|
||||
mFormattedImage = NULL;
|
||||
--sCount;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//virtual, main thread
|
||||
void LLImageWorker::startWork(S32 param)
|
||||
{
|
||||
llassert_always(mDecodedImage.isNull());
|
||||
mDecodedType = -1;
|
||||
}
|
||||
|
||||
bool LLImageWorker::doWork(S32 param)
|
||||
{
|
||||
bool decoded = false;
|
||||
if(mDecodedImage.isNull())
|
||||
{
|
||||
if (!mFormattedImage->updateData())
|
||||
{
|
||||
mDecodedType = -2; // failed
|
||||
return true;
|
||||
}
|
||||
if (mDiscardLevel >= 0)
|
||||
{
|
||||
mFormattedImage->setDiscardLevel(mDiscardLevel);
|
||||
}
|
||||
if (!(mFormattedImage->getWidth() * mFormattedImage->getHeight() * mFormattedImage->getComponents()))
|
||||
{
|
||||
decoded = true; // failed
|
||||
}
|
||||
else
|
||||
{
|
||||
S32 nc = param ? 1 : mFormattedImage->getComponents();
|
||||
mDecodedImage = new LLImageRaw(mFormattedImage->getWidth(),
|
||||
mFormattedImage->getHeight(),
|
||||
nc);
|
||||
}
|
||||
}
|
||||
if (!decoded)
|
||||
{
|
||||
if (param == 0)
|
||||
{
|
||||
// Decode primary channels
|
||||
decoded = mFormattedImage->decode(mDecodedImage, .1f); // 1ms
|
||||
}
|
||||
else
|
||||
{
|
||||
// Decode aux channel
|
||||
decoded = mFormattedImage->decode(mDecodedImage, .1f, param, param); // 1ms
|
||||
}
|
||||
}
|
||||
if (decoded)
|
||||
{
|
||||
// Call the callback immediately; endWork doesn't get called until ckeckWork
|
||||
if (mResponder.notNull())
|
||||
{
|
||||
bool success = (!wasAborted() && mDecodedImage.notNull() && mDecodedImage->getDataSize() != 0);
|
||||
mResponder->completed(success);
|
||||
}
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
void LLImageWorker::endWork(S32 param, bool aborted)
|
||||
{
|
||||
if (mDecodedType != -2)
|
||||
{
|
||||
mDecodedType = aborted ? -2 : param;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
BOOL LLImageWorker::requestDecodedAuxData(LLPointer<LLImageRaw>& raw, S32 channel, S32 discard)
|
||||
{
|
||||
// For most codecs, only mDiscardLevel data is available.
|
||||
// (see LLImageDXT for exception)
|
||||
if (discard >= 0 && discard != mFormattedImage->getDiscardLevel())
|
||||
{
|
||||
llerrs << "Request for invalid discard level" << llendl;
|
||||
}
|
||||
checkWork();
|
||||
if (mDecodedType == -2)
|
||||
{
|
||||
return TRUE; // aborted, done
|
||||
}
|
||||
if (mDecodedType != channel)
|
||||
{
|
||||
if (!haveWork())
|
||||
{
|
||||
addWork(channel, mPriority);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert_always(!haveWork());
|
||||
llassert_always(mDecodedType == channel);
|
||||
raw = mDecodedImage; // smart pointer acquires ownership of data
|
||||
mDecodedImage = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLImageWorker::requestDecodedData(LLPointer<LLImageRaw>& raw, S32 discard)
|
||||
{
|
||||
if (mFormattedImage->getCodec() == IMG_CODEC_DXT)
|
||||
{
|
||||
// special case
|
||||
LLImageDXT* imagedxt = (LLImageDXT*)((LLImageFormatted*)mFormattedImage);
|
||||
return imagedxt->getMipData(raw, discard);
|
||||
}
|
||||
else
|
||||
{
|
||||
return requestDecodedAuxData(raw, 0, discard);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @file llimage.cpp
|
||||
* @brief Base class for images.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llimageworker.h"
|
||||
#include "llimagedxt.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//static
|
||||
LLWorkerThread* LLImageWorker::sWorkerThread = NULL;
|
||||
S32 LLImageWorker::sCount = 0;
|
||||
|
||||
//static
|
||||
void LLImageWorker::initClass(LLWorkerThread* workerthread)
|
||||
{
|
||||
sWorkerThread = workerthread;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLImageWorker::cleanupClass()
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LLImageWorker::LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder)
|
||||
: LLWorkerClass(sWorkerThread, "Image"),
|
||||
mFormattedImage(image),
|
||||
mDecodedType(-1),
|
||||
mDiscardLevel(discard),
|
||||
mPriority(priority),
|
||||
mResponder(responder)
|
||||
{
|
||||
++sCount;
|
||||
}
|
||||
|
||||
LLImageWorker::~LLImageWorker()
|
||||
{
|
||||
mDecodedImage = NULL;
|
||||
mFormattedImage = NULL;
|
||||
--sCount;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//virtual, main thread
|
||||
void LLImageWorker::startWork(S32 param)
|
||||
{
|
||||
llassert_always(mDecodedImage.isNull());
|
||||
mDecodedType = -1;
|
||||
}
|
||||
|
||||
bool LLImageWorker::doWork(S32 param)
|
||||
{
|
||||
bool decoded = false;
|
||||
if(mDecodedImage.isNull())
|
||||
{
|
||||
if (!mFormattedImage->updateData())
|
||||
{
|
||||
mDecodedType = -2; // failed
|
||||
return true;
|
||||
}
|
||||
if (mDiscardLevel >= 0)
|
||||
{
|
||||
mFormattedImage->setDiscardLevel(mDiscardLevel);
|
||||
}
|
||||
if (!(mFormattedImage->getWidth() * mFormattedImage->getHeight() * mFormattedImage->getComponents()))
|
||||
{
|
||||
decoded = true; // failed
|
||||
}
|
||||
else
|
||||
{
|
||||
S32 nc = param ? 1 : mFormattedImage->getComponents();
|
||||
mDecodedImage = new LLImageRaw(mFormattedImage->getWidth(),
|
||||
mFormattedImage->getHeight(),
|
||||
nc);
|
||||
}
|
||||
}
|
||||
if (!decoded)
|
||||
{
|
||||
if (param == 0)
|
||||
{
|
||||
// Decode primary channels
|
||||
decoded = mFormattedImage->decode(mDecodedImage, .1f); // 1ms
|
||||
}
|
||||
else
|
||||
{
|
||||
// Decode aux channel
|
||||
decoded = mFormattedImage->decode(mDecodedImage, .1f, param, param); // 1ms
|
||||
}
|
||||
}
|
||||
if (decoded)
|
||||
{
|
||||
// Call the callback immediately; endWork doesn't get called until ckeckWork
|
||||
if (mResponder.notNull())
|
||||
{
|
||||
bool success = (!wasAborted() && mDecodedImage.notNull() && mDecodedImage->getDataSize() != 0);
|
||||
mResponder->completed(success);
|
||||
}
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
void LLImageWorker::endWork(S32 param, bool aborted)
|
||||
{
|
||||
if (mDecodedType != -2)
|
||||
{
|
||||
mDecodedType = aborted ? -2 : param;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
BOOL LLImageWorker::requestDecodedAuxData(LLPointer<LLImageRaw>& raw, S32 channel, S32 discard)
|
||||
{
|
||||
// For most codecs, only mDiscardLevel data is available.
|
||||
// (see LLImageDXT for exception)
|
||||
if (discard >= 0 && discard != mFormattedImage->getDiscardLevel())
|
||||
{
|
||||
llerrs << "Request for invalid discard level" << llendl;
|
||||
}
|
||||
checkWork();
|
||||
if (mDecodedType == -2)
|
||||
{
|
||||
return TRUE; // aborted, done
|
||||
}
|
||||
if (mDecodedType != channel)
|
||||
{
|
||||
if (!haveWork())
|
||||
{
|
||||
addWork(channel, mPriority);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert_always(!haveWork());
|
||||
llassert_always(mDecodedType == channel);
|
||||
raw = mDecodedImage; // smart pointer acquires ownership of data
|
||||
mDecodedImage = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLImageWorker::requestDecodedData(LLPointer<LLImageRaw>& raw, S32 discard)
|
||||
{
|
||||
if (mFormattedImage->getCodec() == IMG_CODEC_DXT)
|
||||
{
|
||||
// special case
|
||||
LLImageDXT* imagedxt = (LLImageDXT*)((LLImageFormatted*)mFormattedImage);
|
||||
return imagedxt->getMipData(raw, discard);
|
||||
}
|
||||
else
|
||||
{
|
||||
return requestDecodedAuxData(raw, 0, discard);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,57 +1,57 @@
|
|||
/**
|
||||
* @file llimageworker.h
|
||||
* @brief Object for managing images and their textures.
|
||||
*
|
||||
* Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLIMAGEWORKER_H
|
||||
#define LL_LLIMAGEWORKER_H
|
||||
|
||||
#include "llimage.h"
|
||||
#include "llworkerthread.h"
|
||||
|
||||
class LLImageWorker : public LLWorkerClass
|
||||
{
|
||||
public:
|
||||
static void initClass(LLWorkerThread* workerthread);
|
||||
static void cleanupClass();
|
||||
static LLWorkerThread* getWorkerThread() { return sWorkerThread; }
|
||||
|
||||
// LLWorkerThread
|
||||
public:
|
||||
LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder = NULL);
|
||||
~LLImageWorker();
|
||||
|
||||
// called from WORKER THREAD, returns TRUE if done
|
||||
/*virtual*/ bool doWork(S32 param);
|
||||
|
||||
BOOL requestDecodedData(LLPointer<LLImageRaw>& raw, S32 discard = -1);
|
||||
BOOL requestDecodedAuxData(LLPointer<LLImageRaw>& raw, S32 channel, S32 discard = -1);
|
||||
void releaseDecodedData();
|
||||
void cancelDecode();
|
||||
|
||||
private:
|
||||
// called from MAIN THREAD
|
||||
/*virtual*/ void startWork(S32 param); // called from addWork()
|
||||
/*virtual*/ void endWork(S32 param, bool aborted); // called from doWork()
|
||||
|
||||
protected:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
LLPointer<LLImageRaw> mDecodedImage;
|
||||
S32 mDecodedType;
|
||||
S32 mDiscardLevel;
|
||||
|
||||
private:
|
||||
U32 mPriority;
|
||||
LLPointer<LLResponder> mResponder;
|
||||
|
||||
protected:
|
||||
static LLWorkerThread* sWorkerThread;
|
||||
|
||||
public:
|
||||
static S32 sCount;
|
||||
};
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @file llimageworker.h
|
||||
* @brief Object for managing images and their textures.
|
||||
*
|
||||
* Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLIMAGEWORKER_H
|
||||
#define LL_LLIMAGEWORKER_H
|
||||
|
||||
#include "llimage.h"
|
||||
#include "llworkerthread.h"
|
||||
|
||||
class LLImageWorker : public LLWorkerClass
|
||||
{
|
||||
public:
|
||||
static void initClass(LLWorkerThread* workerthread);
|
||||
static void cleanupClass();
|
||||
static LLWorkerThread* getWorkerThread() { return sWorkerThread; }
|
||||
|
||||
// LLWorkerThread
|
||||
public:
|
||||
LLImageWorker(LLImageFormatted* image, U32 priority, S32 discard, LLResponder* responder = NULL);
|
||||
~LLImageWorker();
|
||||
|
||||
// called from WORKER THREAD, returns TRUE if done
|
||||
/*virtual*/ bool doWork(S32 param);
|
||||
|
||||
BOOL requestDecodedData(LLPointer<LLImageRaw>& raw, S32 discard = -1);
|
||||
BOOL requestDecodedAuxData(LLPointer<LLImageRaw>& raw, S32 channel, S32 discard = -1);
|
||||
void releaseDecodedData();
|
||||
void cancelDecode();
|
||||
|
||||
private:
|
||||
// called from MAIN THREAD
|
||||
/*virtual*/ void startWork(S32 param); // called from addWork()
|
||||
/*virtual*/ void endWork(S32 param, bool aborted); // called from doWork()
|
||||
|
||||
protected:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
LLPointer<LLImageRaw> mDecodedImage;
|
||||
S32 mDecodedType;
|
||||
S32 mDiscardLevel;
|
||||
|
||||
private:
|
||||
U32 mPriority;
|
||||
LLPointer<LLResponder> mResponder;
|
||||
|
||||
protected:
|
||||
static LLWorkerThread* sWorkerThread;
|
||||
|
||||
public:
|
||||
static S32 sCount;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@
|
|||
#endif
|
||||
|
||||
#define LL_OCTREE_PARANOIA_CHECK 0
|
||||
#if LL_DARWIN
|
||||
#define LL_OCTREE_MAX_CAPACITY 32
|
||||
#else
|
||||
#define LL_OCTREE_MAX_CAPACITY 256
|
||||
#endif
|
||||
|
||||
template <class T> class LLOctreeState;
|
||||
template <class T> class LLOctreeNode;
|
||||
|
|
|
|||
|
|
@ -713,6 +713,8 @@ BOOL LLImageGL::setSubImage(const U8* datap, S32 data_width, S32 data_height, S3
|
|||
if (!res) llerrs << "LLImageGL::setSubImage(): bindTexture failed" << llendl;
|
||||
stop_glerror();
|
||||
|
||||
LLGLEnable tex( GL_TEXTURE_2D );
|
||||
|
||||
glTexSubImage2D(mTarget, 0, x_pos, y_pos,
|
||||
width, height, mFormatPrimary, mFormatType, datap);
|
||||
stop_glerror();
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
S32 LLVertexBuffer::sCount = 0;
|
||||
S32 LLVertexBuffer::sGLCount = 0;
|
||||
BOOL LLVertexBuffer::sEnableVBOs = TRUE;
|
||||
S32 LLVertexBuffer::sGLRenderBuffer = 0;
|
||||
S32 LLVertexBuffer::sGLRenderIndices = 0;
|
||||
U32 LLVertexBuffer::sGLRenderBuffer = 0;
|
||||
U32 LLVertexBuffer::sGLRenderIndices = 0;
|
||||
U32 LLVertexBuffer::sLastMask = 0;
|
||||
BOOL LLVertexBuffer::sVBOActive = FALSE;
|
||||
BOOL LLVertexBuffer::sIBOActive = FALSE;
|
||||
|
|
@ -92,7 +92,7 @@ void LLVertexBuffer::stopRender()
|
|||
sRenderActive = FALSE;
|
||||
}
|
||||
|
||||
void LLVertexBuffer::clientCopy()
|
||||
void LLVertexBuffer::clientCopy(F64 max_time)
|
||||
{
|
||||
if (!sDeleteList.empty())
|
||||
{
|
||||
|
|
@ -122,7 +122,7 @@ void LLVertexBuffer::clientCopy()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (timer.getElapsedTimeF64() > 0.005)
|
||||
if (timer.getElapsedTimeF64() > max_time)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -191,7 +191,10 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
|
|||
mNumVerts(0), mNumIndices(0), mUsage(usage), mGLBuffer(0), mGLIndices(0),
|
||||
mMappedData(NULL),
|
||||
mMappedIndexData(NULL), mLocked(FALSE),
|
||||
mResized(FALSE), mEmpty(TRUE), mFinal(FALSE), mFilthy(FALSE)
|
||||
mFinal(FALSE),
|
||||
mFilthy(FALSE),
|
||||
mEmpty(TRUE),
|
||||
mResized(FALSE)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_VERTEX_DATA);
|
||||
if (!sEnableVBOs)
|
||||
|
|
@ -614,7 +617,6 @@ void LLVertexBuffer::unmapBuffer()
|
|||
{
|
||||
DirtyRegion& region = *i;
|
||||
glBufferSubDataARB(GL_ARRAY_BUFFER_ARB, region.mIndex*mStride, region.mCount*mStride, mMappedData + region.mIndex*mStride);
|
||||
glFlush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -639,7 +641,6 @@ void LLVertexBuffer::unmapBuffer()
|
|||
DirtyRegion& region = *i;
|
||||
glBufferSubDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, region.mIndicesIndex*sizeof(U32),
|
||||
region.mIndicesCount*sizeof(U32), mMappedIndexData + region.mIndicesIndex*sizeof(U32));
|
||||
glFlush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -786,13 +787,7 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
unmapBuffer();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mDirtyRegions.empty())
|
||||
{
|
||||
mFilthy = TRUE;
|
||||
mDirtyRegions.clear();
|
||||
}
|
||||
|
||||
{
|
||||
if (mGLBuffer)
|
||||
{
|
||||
if (sEnableVBOs && sVBOActive)
|
||||
|
|
@ -890,6 +885,15 @@ void LLVertexBuffer::markDirty(U32 vert_index, U32 vert_count, U32 indices_index
|
|||
if (!mDirtyRegions.empty())
|
||||
{
|
||||
DirtyRegion& region = *(mDirtyRegions.rbegin());
|
||||
|
||||
if (region.mIndex+region.mCount > vert_index)
|
||||
{
|
||||
//this buffer has received multiple updates since the last copy, mark it filthy
|
||||
mFilthy = TRUE;
|
||||
mDirtyRegions.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (region.mIndex + region.mCount == vert_index &&
|
||||
region.mIndicesIndex + region.mIndicesCount == indices_index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public:
|
|||
static void cleanupClass();
|
||||
static void startRender(); //between start and stop render, no client copies will occur
|
||||
static void stopRender(); //any buffer not copied to GL will be rendered from client memory
|
||||
static void clientCopy(); //copy data from client to GL
|
||||
static void clientCopy(F64 max_time = 0.005); //copy data from client to GL
|
||||
static void unbind(); //unbind any bound vertex buffer
|
||||
|
||||
enum {
|
||||
|
|
@ -167,8 +167,8 @@ public:
|
|||
|
||||
static BOOL sEnableVBOs;
|
||||
static S32 sTypeOffsets[TYPE_MAX];
|
||||
static S32 sGLRenderBuffer;
|
||||
static S32 sGLRenderIndices;
|
||||
static U32 sGLRenderBuffer;
|
||||
static U32 sGLRenderIndices;
|
||||
static BOOL sVBOActive;
|
||||
static BOOL sIBOActive;
|
||||
static U32 sLastMask;
|
||||
|
|
|
|||
|
|
@ -1,44 +1,44 @@
|
|||
/**
|
||||
* @file llctrlselectioninterface.cpp
|
||||
* @brief Programmatic selection of items in a list.
|
||||
*
|
||||
* Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "llctrlselectioninterface.h"
|
||||
|
||||
#include "llsd.h"
|
||||
|
||||
// virtual
|
||||
LLCtrlSelectionInterface::~LLCtrlSelectionInterface()
|
||||
{ }
|
||||
|
||||
BOOL LLCtrlSelectionInterface::selectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, TRUE);
|
||||
}
|
||||
|
||||
BOOL LLCtrlSelectionInterface::deselectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, FALSE);
|
||||
}
|
||||
|
||||
|
||||
// virtual
|
||||
LLCtrlListInterface::~LLCtrlListInterface()
|
||||
{ }
|
||||
|
||||
LLScrollListItem* LLCtrlListInterface::addSimpleElement(const LLString& value)
|
||||
{
|
||||
return addSimpleElement(value, ADD_BOTTOM, LLSD());
|
||||
}
|
||||
|
||||
LLScrollListItem* LLCtrlListInterface::addSimpleElement(const LLString& value, EAddPosition pos)
|
||||
{
|
||||
return addSimpleElement(value, pos, LLSD());
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLCtrlScrollInterface::~LLCtrlScrollInterface()
|
||||
{ }
|
||||
/**
|
||||
* @file llctrlselectioninterface.cpp
|
||||
* @brief Programmatic selection of items in a list.
|
||||
*
|
||||
* Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "llctrlselectioninterface.h"
|
||||
|
||||
#include "llsd.h"
|
||||
|
||||
// virtual
|
||||
LLCtrlSelectionInterface::~LLCtrlSelectionInterface()
|
||||
{ }
|
||||
|
||||
BOOL LLCtrlSelectionInterface::selectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, TRUE);
|
||||
}
|
||||
|
||||
BOOL LLCtrlSelectionInterface::deselectByValue(LLSD value)
|
||||
{
|
||||
return setSelectedByValue(value, FALSE);
|
||||
}
|
||||
|
||||
|
||||
// virtual
|
||||
LLCtrlListInterface::~LLCtrlListInterface()
|
||||
{ }
|
||||
|
||||
LLScrollListItem* LLCtrlListInterface::addSimpleElement(const LLString& value)
|
||||
{
|
||||
return addSimpleElement(value, ADD_BOTTOM, LLSD());
|
||||
}
|
||||
|
||||
LLScrollListItem* LLCtrlListInterface::addSimpleElement(const LLString& value, EAddPosition pos)
|
||||
{
|
||||
return addSimpleElement(value, pos, LLSD());
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLCtrlScrollInterface::~LLCtrlScrollInterface()
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -1,84 +1,84 @@
|
|||
/**
|
||||
* @file llctrlselectioninterface.h
|
||||
* @brief Programmatic selection of items in a list.
|
||||
*
|
||||
* Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLCTRLSELECTIONINTERFACE_H
|
||||
#define LLCTRLSELECTIONINTERFACE_H
|
||||
|
||||
#include "stdtypes.h"
|
||||
#include "stdenums.h"
|
||||
#include "llstring.h"
|
||||
|
||||
class LLSD;
|
||||
class LLUUID;
|
||||
class LLScrollListItem;
|
||||
|
||||
class LLCtrlSelectionInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlSelectionInterface();
|
||||
|
||||
enum EOperation
|
||||
{
|
||||
OP_DELETE = 1,
|
||||
OP_SELECT,
|
||||
OP_DESELECT,
|
||||
};
|
||||
|
||||
virtual BOOL getCanSelect() const = 0;
|
||||
|
||||
virtual BOOL selectFirstItem() = 0;
|
||||
virtual BOOL selectNthItem( S32 index ) = 0;
|
||||
|
||||
virtual S32 getFirstSelectedIndex() = 0;
|
||||
|
||||
// TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function
|
||||
virtual BOOL setCurrentByID( const LLUUID& id ) = 0;
|
||||
virtual LLUUID getCurrentID() = 0;
|
||||
|
||||
BOOL selectByValue(LLSD value);
|
||||
BOOL deselectByValue(LLSD value);
|
||||
virtual BOOL setSelectedByValue(LLSD value, BOOL selected) = 0;
|
||||
virtual LLSD getSimpleSelectedValue() = 0;
|
||||
|
||||
virtual BOOL isSelected(LLSD value) = 0;
|
||||
|
||||
virtual BOOL operateOnSelection(EOperation op) = 0;
|
||||
virtual BOOL operateOnAll(EOperation op) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlListInterface : public LLCtrlSelectionInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlListInterface();
|
||||
|
||||
virtual S32 getItemCount() const = 0;
|
||||
virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM) = 0;
|
||||
virtual void clearColumns() = 0;
|
||||
virtual void setColumnLabel(const LLString& column, const LLString& label) = 0;
|
||||
// TomY TODO: Document this
|
||||
virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL) = 0;
|
||||
|
||||
LLScrollListItem* addSimpleElement(const LLString& value); // defaults to bottom
|
||||
LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos); // defaults to no LLSD() id
|
||||
virtual LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos, const LLSD& id) = 0;
|
||||
|
||||
virtual void clearRows() = 0;
|
||||
virtual void sortByColumn(LLString name, BOOL ascending) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlScrollInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlScrollInterface();
|
||||
|
||||
virtual S32 getScrollPos() = 0;
|
||||
virtual void setScrollPos( S32 pos ) = 0;
|
||||
virtual void scrollToShowSelected() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @file llctrlselectioninterface.h
|
||||
* @brief Programmatic selection of items in a list.
|
||||
*
|
||||
* Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LLCTRLSELECTIONINTERFACE_H
|
||||
#define LLCTRLSELECTIONINTERFACE_H
|
||||
|
||||
#include "stdtypes.h"
|
||||
#include "stdenums.h"
|
||||
#include "llstring.h"
|
||||
|
||||
class LLSD;
|
||||
class LLUUID;
|
||||
class LLScrollListItem;
|
||||
|
||||
class LLCtrlSelectionInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlSelectionInterface();
|
||||
|
||||
enum EOperation
|
||||
{
|
||||
OP_DELETE = 1,
|
||||
OP_SELECT,
|
||||
OP_DESELECT,
|
||||
};
|
||||
|
||||
virtual BOOL getCanSelect() const = 0;
|
||||
|
||||
virtual BOOL selectFirstItem() = 0;
|
||||
virtual BOOL selectNthItem( S32 index ) = 0;
|
||||
|
||||
virtual S32 getFirstSelectedIndex() = 0;
|
||||
|
||||
// TomY TODO: Simply cast the UUIDs to LLSDs, using the selectByValue function
|
||||
virtual BOOL setCurrentByID( const LLUUID& id ) = 0;
|
||||
virtual LLUUID getCurrentID() = 0;
|
||||
|
||||
BOOL selectByValue(LLSD value);
|
||||
BOOL deselectByValue(LLSD value);
|
||||
virtual BOOL setSelectedByValue(LLSD value, BOOL selected) = 0;
|
||||
virtual LLSD getSimpleSelectedValue() = 0;
|
||||
|
||||
virtual BOOL isSelected(LLSD value) = 0;
|
||||
|
||||
virtual BOOL operateOnSelection(EOperation op) = 0;
|
||||
virtual BOOL operateOnAll(EOperation op) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlListInterface : public LLCtrlSelectionInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlListInterface();
|
||||
|
||||
virtual S32 getItemCount() const = 0;
|
||||
virtual void addColumn(const LLSD& column, EAddPosition pos = ADD_BOTTOM) = 0;
|
||||
virtual void clearColumns() = 0;
|
||||
virtual void setColumnLabel(const LLString& column, const LLString& label) = 0;
|
||||
// TomY TODO: Document this
|
||||
virtual LLScrollListItem* addElement(const LLSD& value, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL) = 0;
|
||||
|
||||
LLScrollListItem* addSimpleElement(const LLString& value); // defaults to bottom
|
||||
LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos); // defaults to no LLSD() id
|
||||
virtual LLScrollListItem* addSimpleElement(const LLString& value, EAddPosition pos, const LLSD& id) = 0;
|
||||
|
||||
virtual void clearRows() = 0;
|
||||
virtual void sortByColumn(LLString name, BOOL ascending) = 0;
|
||||
};
|
||||
|
||||
class LLCtrlScrollInterface
|
||||
{
|
||||
public:
|
||||
virtual ~LLCtrlScrollInterface();
|
||||
|
||||
virtual S32 getScrollPos() = 0;
|
||||
virtual void setScrollPos( S32 pos ) = 0;
|
||||
virtual void scrollToShowSelected() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -377,20 +377,21 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect,
|
|||
mFgUnselectedColor( LLUI::sColorsGroup->getColor("ScrollUnselectedColor") ),
|
||||
mFgDisabledColor( LLUI::sColorsGroup->getColor("ScrollDisabledColor") ),
|
||||
mHighlightedColor( LLUI::sColorsGroup->getColor("ScrollHighlightedColor") ),
|
||||
mHighlightedItem(-1),
|
||||
mBorderThickness( 2 ),
|
||||
mOnDoubleClickCallback( NULL ),
|
||||
mOnMaximumSelectCallback( NULL ),
|
||||
mOnSortChangedCallback( NULL ),
|
||||
mDrewSelected(FALSE),
|
||||
mHighlightedItem(-1),
|
||||
mBorder(NULL),
|
||||
mSearchColumn(0),
|
||||
mDefaultColumn("SIMPLE"),
|
||||
mSearchColumn(0),
|
||||
|
||||
mNumDynamicWidthColumns(0),
|
||||
mTotalStaticColumnWidth(0),
|
||||
mSortColumn(0),
|
||||
mSortAscending(TRUE)
|
||||
mSortAscending(TRUE),
|
||||
|
||||
mDrewSelected(FALSE)
|
||||
{
|
||||
mItemListRect.setOriginAndSize(
|
||||
mBorderThickness + LIST_BORDER_PAD,
|
||||
|
|
|
|||
|
|
@ -1,126 +1,126 @@
|
|||
/**
|
||||
* @file llviewquery.cpp
|
||||
* @brief Implementation of view query class.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "llview.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llviewquery.h"
|
||||
|
||||
void LLQuerySorter::operator() (LLView * parent, viewList_t &children) const {}
|
||||
|
||||
filterResult_t LLNoLeavesFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(!(view->getChildList()->size() == 0), TRUE);
|
||||
}
|
||||
|
||||
filterResult_t LLVisibleFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->getVisible(), view->getVisible());
|
||||
}
|
||||
filterResult_t LLEnabledFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->getEnabled(), view->getEnabled());
|
||||
}
|
||||
filterResult_t LLTabStopFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl* const>(view)->hasTabStop(),
|
||||
view->canFocusChildren());
|
||||
}
|
||||
|
||||
// LLViewQuery
|
||||
|
||||
LLViewQuery::LLViewQuery(): mPreFilters(), mPostFilters(), mSorterp()
|
||||
{
|
||||
}
|
||||
|
||||
void LLViewQuery::addPreFilter(const LLQueryFilter* prefilter) { mPreFilters.push_back(prefilter); }
|
||||
|
||||
void LLViewQuery::addPostFilter(const LLQueryFilter* postfilter) { mPostFilters.push_back(postfilter); }
|
||||
|
||||
const LLViewQuery::filterList_t & LLViewQuery::getPreFilters() const { return mPreFilters; }
|
||||
|
||||
const LLViewQuery::filterList_t & LLViewQuery::getPostFilters() const { return mPostFilters; }
|
||||
|
||||
void LLViewQuery::setSorter(const LLQuerySorter* sorterp) { mSorterp = sorterp; }
|
||||
const LLQuerySorter* LLViewQuery::getSorter() const { return mSorterp; }
|
||||
|
||||
viewList_t LLViewQuery::run(LLView * view) const
|
||||
{
|
||||
viewList_t result;
|
||||
|
||||
filterResult_t pre = runFilters(view, viewList_t(), mPreFilters);
|
||||
if(!pre.first && !pre.second)
|
||||
{
|
||||
// skip post filters completely if we're not including ourselves or the children
|
||||
return result;
|
||||
}
|
||||
if(pre.second)
|
||||
{
|
||||
// run filters on children
|
||||
viewList_t filtered_children;
|
||||
filterChildren(view, filtered_children);
|
||||
filterResult_t post = runFilters(view, filtered_children, mPostFilters);
|
||||
if(pre.first && post.first)
|
||||
{
|
||||
result.push_back(view);
|
||||
}
|
||||
if(post.second)
|
||||
{
|
||||
result.insert(result.end(), filtered_children.begin(), filtered_children.end());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pre.first)
|
||||
{
|
||||
result.push_back(view);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) const
|
||||
{
|
||||
LLView::child_list_t views(*(view->getChildList()));
|
||||
(*mSorterp)(view, views); // sort the children per the sorter
|
||||
for(LLView::child_list_iter_t iter = views.begin();
|
||||
iter != views.end();
|
||||
iter++)
|
||||
{
|
||||
viewList_t indiv_children = this->run(*iter);
|
||||
filtered_children.insert(filtered_children.end(), indiv_children.begin(), indiv_children.end());
|
||||
}
|
||||
}
|
||||
|
||||
filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const
|
||||
{
|
||||
filterResult_t result = filterResult_t(TRUE, TRUE);
|
||||
for(filterList_const_iter_t iter = filters.begin();
|
||||
iter != filters.end();
|
||||
iter++)
|
||||
{
|
||||
filterResult_t filtered = (**iter)(view, children);
|
||||
result.first = result.first && filtered.first;
|
||||
result.second = result.second && filtered.second;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
class SortByTabOrder : public LLQuerySorter, public LLSingleton<SortByTabOrder>
|
||||
{
|
||||
/*virtual*/ void operator() (LLView * parent, LLView::child_list_t &children) const
|
||||
{
|
||||
children.sort(LLCompareByTabOrder(parent->getCtrlOrder()));
|
||||
}
|
||||
};
|
||||
|
||||
LLCtrlQuery::LLCtrlQuery() :
|
||||
LLViewQuery()
|
||||
{
|
||||
setSorter(SortByTabOrder::getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
* @file llviewquery.cpp
|
||||
* @brief Implementation of view query class.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#include "llview.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llviewquery.h"
|
||||
|
||||
void LLQuerySorter::operator() (LLView * parent, viewList_t &children) const {}
|
||||
|
||||
filterResult_t LLNoLeavesFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(!(view->getChildList()->size() == 0), TRUE);
|
||||
}
|
||||
|
||||
filterResult_t LLVisibleFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->getVisible(), view->getVisible());
|
||||
}
|
||||
filterResult_t LLEnabledFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->getEnabled(), view->getEnabled());
|
||||
}
|
||||
filterResult_t LLTabStopFilter::operator() (const LLView* const view, const viewList_t & children) const
|
||||
{
|
||||
return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl* const>(view)->hasTabStop(),
|
||||
view->canFocusChildren());
|
||||
}
|
||||
|
||||
// LLViewQuery
|
||||
|
||||
LLViewQuery::LLViewQuery(): mPreFilters(), mPostFilters(), mSorterp()
|
||||
{
|
||||
}
|
||||
|
||||
void LLViewQuery::addPreFilter(const LLQueryFilter* prefilter) { mPreFilters.push_back(prefilter); }
|
||||
|
||||
void LLViewQuery::addPostFilter(const LLQueryFilter* postfilter) { mPostFilters.push_back(postfilter); }
|
||||
|
||||
const LLViewQuery::filterList_t & LLViewQuery::getPreFilters() const { return mPreFilters; }
|
||||
|
||||
const LLViewQuery::filterList_t & LLViewQuery::getPostFilters() const { return mPostFilters; }
|
||||
|
||||
void LLViewQuery::setSorter(const LLQuerySorter* sorterp) { mSorterp = sorterp; }
|
||||
const LLQuerySorter* LLViewQuery::getSorter() const { return mSorterp; }
|
||||
|
||||
viewList_t LLViewQuery::run(LLView * view) const
|
||||
{
|
||||
viewList_t result;
|
||||
|
||||
filterResult_t pre = runFilters(view, viewList_t(), mPreFilters);
|
||||
if(!pre.first && !pre.second)
|
||||
{
|
||||
// skip post filters completely if we're not including ourselves or the children
|
||||
return result;
|
||||
}
|
||||
if(pre.second)
|
||||
{
|
||||
// run filters on children
|
||||
viewList_t filtered_children;
|
||||
filterChildren(view, filtered_children);
|
||||
filterResult_t post = runFilters(view, filtered_children, mPostFilters);
|
||||
if(pre.first && post.first)
|
||||
{
|
||||
result.push_back(view);
|
||||
}
|
||||
if(post.second)
|
||||
{
|
||||
result.insert(result.end(), filtered_children.begin(), filtered_children.end());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(pre.first)
|
||||
{
|
||||
result.push_back(view);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void LLViewQuery::filterChildren(LLView * view, viewList_t & filtered_children) const
|
||||
{
|
||||
LLView::child_list_t views(*(view->getChildList()));
|
||||
(*mSorterp)(view, views); // sort the children per the sorter
|
||||
for(LLView::child_list_iter_t iter = views.begin();
|
||||
iter != views.end();
|
||||
iter++)
|
||||
{
|
||||
viewList_t indiv_children = this->run(*iter);
|
||||
filtered_children.insert(filtered_children.end(), indiv_children.begin(), indiv_children.end());
|
||||
}
|
||||
}
|
||||
|
||||
filterResult_t LLViewQuery::runFilters(LLView * view, const viewList_t children, const filterList_t filters) const
|
||||
{
|
||||
filterResult_t result = filterResult_t(TRUE, TRUE);
|
||||
for(filterList_const_iter_t iter = filters.begin();
|
||||
iter != filters.end();
|
||||
iter++)
|
||||
{
|
||||
filterResult_t filtered = (**iter)(view, children);
|
||||
result.first = result.first && filtered.first;
|
||||
result.second = result.second && filtered.second;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
class SortByTabOrder : public LLQuerySorter, public LLSingleton<SortByTabOrder>
|
||||
{
|
||||
/*virtual*/ void operator() (LLView * parent, LLView::child_list_t &children) const
|
||||
{
|
||||
children.sort(LLCompareByTabOrder(parent->getCtrlOrder()));
|
||||
}
|
||||
};
|
||||
|
||||
LLCtrlQuery::LLCtrlQuery() :
|
||||
LLViewQuery()
|
||||
{
|
||||
setSorter(SortByTabOrder::getInstance());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,89 +1,89 @@
|
|||
/**
|
||||
* @file llviewquery.h
|
||||
* @brief Query algorithm for flattening and filtering the view hierarchy.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLVIEWQUERY_H
|
||||
#define LL_LLVIEWQUERY_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "llmemory.h"
|
||||
|
||||
class LLView;
|
||||
|
||||
typedef std::list<LLView *> viewList_t;
|
||||
typedef std::pair<BOOL, BOOL> filterResult_t;
|
||||
|
||||
// Abstract base class for all filters.
|
||||
class LLQueryFilter : public LLRefCount
|
||||
{
|
||||
public:
|
||||
virtual filterResult_t operator() (const LLView* const view, const viewList_t & children) const =0;
|
||||
};
|
||||
|
||||
class LLQuerySorter : public LLRefCount
|
||||
{
|
||||
public:
|
||||
virtual void operator() (LLView * parent, viewList_t &children) const;
|
||||
};
|
||||
|
||||
class LLNoLeavesFilter : public LLQueryFilter, public LLSingleton<LLNoLeavesFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLVisibleFilter : public LLQueryFilter, public LLSingleton<LLVisibleFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLEnabledFilter : public LLQueryFilter, public LLSingleton<LLEnabledFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLTabStopFilter : public LLQueryFilter, public LLSingleton<LLTabStopFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
|
||||
// Algorithm for flattening
|
||||
class LLViewQuery
|
||||
{
|
||||
public:
|
||||
typedef std::list<const LLQueryFilter*> filterList_t;
|
||||
typedef filterList_t::iterator filterList_iter_t;
|
||||
typedef filterList_t::const_iterator filterList_const_iter_t;
|
||||
|
||||
LLViewQuery();
|
||||
virtual ~LLViewQuery() {}
|
||||
|
||||
void addPreFilter(const LLQueryFilter* prefilter);
|
||||
void addPostFilter(const LLQueryFilter* postfilter);
|
||||
const filterList_t & getPreFilters() const;
|
||||
const filterList_t & getPostFilters() const;
|
||||
|
||||
void setSorter(const LLQuerySorter* sorter);
|
||||
const LLQuerySorter* getSorter() const;
|
||||
|
||||
viewList_t run(LLView * view) const;
|
||||
// syntactic sugar
|
||||
viewList_t operator () (LLView * view) const { return run(view); }
|
||||
protected:
|
||||
// override this method to provide iteration over other types of children
|
||||
virtual void filterChildren(LLView * view, viewList_t & filtered_children) const;
|
||||
filterResult_t runFilters(LLView * view, const viewList_t children, const filterList_t filters) const;
|
||||
protected:
|
||||
filterList_t mPreFilters;
|
||||
filterList_t mPostFilters;
|
||||
const LLQuerySorter* mSorterp;
|
||||
};
|
||||
|
||||
class LLCtrlQuery : public LLViewQuery
|
||||
{
|
||||
public:
|
||||
LLCtrlQuery();
|
||||
};
|
||||
|
||||
#endif
|
||||
/**
|
||||
* @file llviewquery.h
|
||||
* @brief Query algorithm for flattening and filtering the view hierarchy.
|
||||
*
|
||||
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLVIEWQUERY_H
|
||||
#define LL_LLVIEWQUERY_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "llmemory.h"
|
||||
|
||||
class LLView;
|
||||
|
||||
typedef std::list<LLView *> viewList_t;
|
||||
typedef std::pair<BOOL, BOOL> filterResult_t;
|
||||
|
||||
// Abstract base class for all filters.
|
||||
class LLQueryFilter : public LLRefCount
|
||||
{
|
||||
public:
|
||||
virtual filterResult_t operator() (const LLView* const view, const viewList_t & children) const =0;
|
||||
};
|
||||
|
||||
class LLQuerySorter : public LLRefCount
|
||||
{
|
||||
public:
|
||||
virtual void operator() (LLView * parent, viewList_t &children) const;
|
||||
};
|
||||
|
||||
class LLNoLeavesFilter : public LLQueryFilter, public LLSingleton<LLNoLeavesFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLVisibleFilter : public LLQueryFilter, public LLSingleton<LLVisibleFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLEnabledFilter : public LLQueryFilter, public LLSingleton<LLEnabledFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
class LLTabStopFilter : public LLQueryFilter, public LLSingleton<LLTabStopFilter>
|
||||
{
|
||||
/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const;
|
||||
};
|
||||
|
||||
// Algorithm for flattening
|
||||
class LLViewQuery
|
||||
{
|
||||
public:
|
||||
typedef std::list<const LLQueryFilter*> filterList_t;
|
||||
typedef filterList_t::iterator filterList_iter_t;
|
||||
typedef filterList_t::const_iterator filterList_const_iter_t;
|
||||
|
||||
LLViewQuery();
|
||||
virtual ~LLViewQuery() {}
|
||||
|
||||
void addPreFilter(const LLQueryFilter* prefilter);
|
||||
void addPostFilter(const LLQueryFilter* postfilter);
|
||||
const filterList_t & getPreFilters() const;
|
||||
const filterList_t & getPostFilters() const;
|
||||
|
||||
void setSorter(const LLQuerySorter* sorter);
|
||||
const LLQuerySorter* getSorter() const;
|
||||
|
||||
viewList_t run(LLView * view) const;
|
||||
// syntactic sugar
|
||||
viewList_t operator () (LLView * view) const { return run(view); }
|
||||
protected:
|
||||
// override this method to provide iteration over other types of children
|
||||
virtual void filterChildren(LLView * view, viewList_t & filtered_children) const;
|
||||
filterResult_t runFilters(LLView * view, const viewList_t children, const filterList_t filters) const;
|
||||
protected:
|
||||
filterList_t mPreFilters;
|
||||
filterList_t mPostFilters;
|
||||
const LLQuerySorter* mSorterp;
|
||||
};
|
||||
|
||||
class LLCtrlQuery : public LLViewQuery
|
||||
{
|
||||
public:
|
||||
LLCtrlQuery();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -908,8 +908,8 @@ void LLDrawable::updateLightSet()
|
|||
// mLightSet points to nearby lights
|
||||
mLightSet.clear();
|
||||
part->getLights(getPositionAgent(), getRadius(), mLightSet);
|
||||
const S32 max_lights = 16;
|
||||
if (mLightSet.size() > max_lights)
|
||||
const drawable_set_t::size_type MAX_LIGHTS = 16;
|
||||
if (mLightSet.size() > MAX_LIGHTS)
|
||||
{
|
||||
typedef std::set<std::pair<F32,LLPointer<LLDrawable> > > sorted_pair_set_t;
|
||||
sorted_pair_set_t sorted_set;
|
||||
|
|
|
|||
|
|
@ -711,11 +711,13 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
|
|||
const LLVolumeFace &face = volume.getVolumeFace(f);
|
||||
|
||||
//get bounding box
|
||||
if (mDrawablep->isState(LLDrawable::REBUILD_ALL))
|
||||
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION))
|
||||
{
|
||||
//vertex buffer no longer valid
|
||||
mVertexBuffer = NULL;
|
||||
mLastVertexBuffer = NULL;
|
||||
if (mDrawablep->isState(LLDrawable::REBUILD_VOLUME))
|
||||
{ //vertex buffer no longer valid
|
||||
mVertexBuffer = NULL;
|
||||
mLastVertexBuffer = NULL;
|
||||
}
|
||||
|
||||
LLVector3 min,max;
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ static struct ft_display_info ft_display_table[] =
|
|||
// { LLFastTimer::FTM_RENDER_FONTS, " Fonts", &LLColor4::pink1, 0 },
|
||||
// { LLFastTimer::FTM_UPDATE_TEXTURES, " Textures", &LLColor4::pink2, 0 },
|
||||
{ LLFastTimer::FTM_SWAP, " Swap", &LLColor4::pink1, 0 },
|
||||
// { LLFastTimer::FTM_TEMP6, " Client Copy", &LLColor4::red1, 1},
|
||||
{ LLFastTimer::FTM_CLIENT_COPY, " Client Copy", &LLColor4::red1, 1},
|
||||
|
||||
// { LLFastTimer::FTM_TEMP1, " Temp1", &LLColor4::red1, 0 },
|
||||
// { LLFastTimer::FTM_TEMP2, " Temp2", &LLColor4::magenta1, 0 },
|
||||
|
|
|
|||
|
|
@ -216,12 +216,6 @@ void LLVolumeImplFlexible::setAttributesOfAllSections()
|
|||
|
||||
void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, const S32 detail)
|
||||
{
|
||||
if (mVO && mVO->mDrawable.notNull())
|
||||
{
|
||||
LLVOVolume* volume = (LLVOVolume*) mVO;
|
||||
volume->regenFaces();
|
||||
}
|
||||
|
||||
/*doIdleUpdate(gAgent, *gWorldp, 0.0);
|
||||
if (mVO && mVO->mDrawable.notNull())
|
||||
{
|
||||
|
|
@ -615,11 +609,19 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
|
|||
{
|
||||
LLVolumeParams volume_params = volume->getVolume()->getParams();
|
||||
volume->setVolume(volume_params, 0);
|
||||
mUpdated = FALSE;
|
||||
}
|
||||
|
||||
volume->updateRelativeXform();
|
||||
doFlexibleUpdate();
|
||||
if (!mUpdated || volume->mFaceMappingChanged)
|
||||
|
||||
if (volume->mLODChanged || volume->mFaceMappingChanged ||
|
||||
volume->mVolumeChanged)
|
||||
{
|
||||
volume->regenFaces();
|
||||
}
|
||||
|
||||
if (!mUpdated || volume->mFaceMappingChanged || volume->mVolumeChanged)
|
||||
{
|
||||
doFlexibleRebuild();
|
||||
volume->genBBoxes(isVolumeGlobal());
|
||||
|
|
@ -629,6 +631,7 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
|
|||
volume->mLODChanged = FALSE;
|
||||
volume->mFaceMappingChanged = FALSE;
|
||||
|
||||
|
||||
// clear UV flag
|
||||
drawable->clearState(LLDrawable::UV);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,220 +1,221 @@
|
|||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterinspect.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llcachename.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llvieweruictrlfactory.h"
|
||||
|
||||
LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
LLFloaterInspect::LLFloaterInspect(void) :
|
||||
LLFloater("Inspect Object"),
|
||||
mDirty(FALSE)
|
||||
{
|
||||
sInstance = this;
|
||||
gUICtrlFactory->buildFloater(this, "floater_inspect.xml");
|
||||
}
|
||||
|
||||
LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
if(!gFloaterTools->getVisible())
|
||||
{
|
||||
if(gToolMgr->getBaseTool() == gToolInspect)
|
||||
{
|
||||
select_tool(gToolNull);
|
||||
}
|
||||
// Switch back to basic toolset
|
||||
gToolMgr->setCurrentToolset(gBasicToolset);
|
||||
}
|
||||
else
|
||||
{
|
||||
gFloaterTools->setFocus(TRUE);
|
||||
}
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::isVisible()
|
||||
{
|
||||
return (!!sInstance);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::show(void* ignored)
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
sInstance->open();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterInspect* self = new LLFloaterInspect;
|
||||
self->open();
|
||||
}
|
||||
|
||||
sInstance->mObjectSelection = gSelectMgr->getSelection();
|
||||
select_tool(gToolInspect);
|
||||
sInstance->refresh();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode();
|
||||
LLUUID obj_id, creator_id;
|
||||
obj_id = sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
while(obj)
|
||||
{
|
||||
if(obj_id == obj->getObject()->getID())
|
||||
{
|
||||
creator_id = obj->mPermissions->getCreator();
|
||||
break;
|
||||
}
|
||||
obj = sInstance->mObjectSelection->getNextNode();
|
||||
}
|
||||
if(obj)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(creator_id);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode();
|
||||
LLUUID obj_id, owner_id;
|
||||
obj_id = sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
while(obj)
|
||||
{
|
||||
if(obj_id == obj->getObject()->getID())
|
||||
{
|
||||
owner_id = obj->mPermissions->getOwner();
|
||||
break;
|
||||
}
|
||||
obj = sInstance->mObjectSelection->getNextNode();
|
||||
}
|
||||
if(obj)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(owner_id);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = LLUICtrlFactory::getScrollListByName(this, "object_list");
|
||||
childSetAction("button owner",onClickOwnerProfile, this);
|
||||
childSetAction("button creator",onClickCreatorProfile, this);
|
||||
childSetCommitCallback("object_list", onSelectObject);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
{
|
||||
sInstance->childSetEnabled("button owner", true);
|
||||
sInstance->childSetEnabled("button creator", true);
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID LLFloaterInspect::getSelectedUUID()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() > 0) return sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLUUID creator_id;
|
||||
LLString creator_name;
|
||||
S32 pos = mObjectList->getScrollPos();
|
||||
childSetEnabled("button owner", false);
|
||||
childSetEnabled("button creator", false);
|
||||
LLUUID selected_uuid;
|
||||
S32 selected_index = mObjectList->getFirstSelectedIndex();
|
||||
if(selected_index > -1) selected_uuid = mObjectList->getFirstSelected()->getUUID();
|
||||
mObjectList->operateOnAll(LLScrollListCtrl::OP_DELETE);
|
||||
//List all transient objects, then all linked objects
|
||||
LLSelectNode* obj = mObjectSelection->getFirstNode();
|
||||
LLSD row;
|
||||
while(obj)
|
||||
{
|
||||
char owner_first_name[MAX_STRING], owner_last_name[MAX_STRING];
|
||||
char creator_first_name[MAX_STRING], creator_last_name[MAX_STRING];
|
||||
char time[MAX_STRING];
|
||||
std::ostringstream owner_name, creator_name, date;
|
||||
time_t timestamp = (time_t) (obj->mCreationDate/1000000);
|
||||
LLString::copy(time, ctime(×tamp), MAX_STRING);
|
||||
time[24] = '\0';
|
||||
date << obj->mCreationDate;
|
||||
gCacheName->getName(obj->mPermissions->getOwner(), owner_first_name, owner_last_name);
|
||||
owner_name << owner_first_name << " " << owner_last_name;
|
||||
gCacheName->getName(obj->mPermissions->getCreator(), creator_first_name, creator_last_name);
|
||||
creator_name << creator_first_name << " " << creator_last_name;
|
||||
row["id"] = obj->getObject()->getID();
|
||||
row["columns"][0]["column"] = "object_name";
|
||||
row["columns"][0]["type"] = "text";
|
||||
// make sure we're either at the top of the link chain
|
||||
// or top of the editable chain, for attachments
|
||||
if(!(obj->getObject()->isRoot() || obj->getObject()->isRootEdit()))
|
||||
{
|
||||
row["columns"][0]["value"] = LLString(" ") + obj->mName;
|
||||
}
|
||||
else
|
||||
{
|
||||
row["columns"][0]["value"] = obj->mName;
|
||||
}
|
||||
row["columns"][1]["column"] = "owner_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = owner_name.str().c_str();
|
||||
row["columns"][2]["column"] = "creator_name";
|
||||
row["columns"][2]["type"] = "text";
|
||||
row["columns"][2]["value"] = creator_name.str().c_str();
|
||||
row["columns"][3]["column"] = "creation_date";
|
||||
row["columns"][3]["type"] = "text";
|
||||
row["columns"][3]["value"] = time;
|
||||
mObjectList->addElement(row, ADD_TOP);
|
||||
obj = mObjectSelection->getNextNode();
|
||||
}
|
||||
if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
|
||||
{
|
||||
mObjectList->selectNthItem(selected_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
mObjectList->selectNthItem(0);
|
||||
}
|
||||
onSelectObject(this, NULL);
|
||||
mObjectList->setScrollPos(pos);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onFocusReceived()
|
||||
{
|
||||
select_tool(gToolInspect);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::dirty()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
sInstance->setDirty();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::draw()
|
||||
{
|
||||
if (mDirty)
|
||||
{
|
||||
refresh();
|
||||
mDirty = FALSE;
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloaterinspect.h"
|
||||
#include "llfloatertools.h"
|
||||
#include "llcachename.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llvieweruictrlfactory.h"
|
||||
|
||||
LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
|
||||
|
||||
LLFloaterInspect::LLFloaterInspect(void) :
|
||||
LLFloater("Inspect Object"),
|
||||
mDirty(FALSE)
|
||||
{
|
||||
sInstance = this;
|
||||
gUICtrlFactory->buildFloater(this, "floater_inspect.xml");
|
||||
}
|
||||
|
||||
LLFloaterInspect::~LLFloaterInspect(void)
|
||||
{
|
||||
if(!gFloaterTools->getVisible())
|
||||
{
|
||||
if(gToolMgr->getBaseTool() == gToolInspect)
|
||||
{
|
||||
select_tool(gToolNull);
|
||||
}
|
||||
// Switch back to basic toolset
|
||||
gToolMgr->setCurrentToolset(gBasicToolset);
|
||||
}
|
||||
else
|
||||
{
|
||||
gFloaterTools->setFocus(TRUE);
|
||||
}
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::isVisible()
|
||||
{
|
||||
return (!!sInstance);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::show(void* ignored)
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
sInstance->open();
|
||||
}
|
||||
else
|
||||
{
|
||||
LLFloaterInspect* self = new LLFloaterInspect;
|
||||
self->open();
|
||||
}
|
||||
|
||||
sInstance->mObjectSelection = gSelectMgr->getSelection();
|
||||
select_tool(gToolInspect);
|
||||
sInstance->refresh();
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode();
|
||||
LLUUID obj_id, creator_id;
|
||||
obj_id = sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
while(obj)
|
||||
{
|
||||
if(obj_id == obj->getObject()->getID())
|
||||
{
|
||||
creator_id = obj->mPermissions->getCreator();
|
||||
break;
|
||||
}
|
||||
obj = sInstance->mObjectSelection->getNextNode();
|
||||
}
|
||||
if(obj)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(creator_id);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() == 0) return;
|
||||
LLSelectNode* obj = sInstance->mObjectSelection->getFirstNode();
|
||||
LLUUID obj_id, owner_id;
|
||||
obj_id = sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
while(obj)
|
||||
{
|
||||
if(obj_id == obj->getObject()->getID())
|
||||
{
|
||||
owner_id = obj->mPermissions->getOwner();
|
||||
break;
|
||||
}
|
||||
obj = sInstance->mObjectSelection->getNextNode();
|
||||
}
|
||||
if(obj)
|
||||
{
|
||||
LLFloaterAvatarInfo::showFromDirectory(owner_id);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLFloaterInspect::postBuild()
|
||||
{
|
||||
mObjectList = LLUICtrlFactory::getScrollListByName(this, "object_list");
|
||||
childSetAction("button owner",onClickOwnerProfile, this);
|
||||
childSetAction("button creator",onClickCreatorProfile, this);
|
||||
childSetCommitCallback("object_list", onSelectObject);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
|
||||
{
|
||||
sInstance->childSetEnabled("button owner", true);
|
||||
sInstance->childSetEnabled("button creator", true);
|
||||
}
|
||||
}
|
||||
|
||||
LLUUID LLFloaterInspect::getSelectedUUID()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
if(sInstance->mObjectList->getAllSelected().size() > 0) return sInstance->mObjectList->getFirstSelected()->getUUID();
|
||||
}
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void LLFloaterInspect::refresh()
|
||||
{
|
||||
LLUUID creator_id;
|
||||
LLString creator_name;
|
||||
S32 pos = mObjectList->getScrollPos();
|
||||
childSetEnabled("button owner", false);
|
||||
childSetEnabled("button creator", false);
|
||||
LLUUID selected_uuid;
|
||||
S32 selected_index = mObjectList->getFirstSelectedIndex();
|
||||
if(selected_index > -1) selected_uuid = mObjectList->getFirstSelected()->getUUID();
|
||||
mObjectList->operateOnAll(LLScrollListCtrl::OP_DELETE);
|
||||
//List all transient objects, then all linked objects
|
||||
LLSelectNode* obj = mObjectSelection->getFirstNode();
|
||||
LLSD row;
|
||||
while(obj)
|
||||
{
|
||||
char owner_first_name[MAX_STRING], owner_last_name[MAX_STRING];
|
||||
char creator_first_name[MAX_STRING], creator_last_name[MAX_STRING];
|
||||
char time[MAX_STRING];
|
||||
std::ostringstream owner_name, creator_name, date;
|
||||
time_t timestamp = (time_t) (obj->mCreationDate/1000000);
|
||||
LLString::copy(time, ctime(×tamp), MAX_STRING);
|
||||
time[24] = '\0';
|
||||
date << obj->mCreationDate;
|
||||
gCacheName->getName(obj->mPermissions->getOwner(), owner_first_name, owner_last_name);
|
||||
owner_name << owner_first_name << " " << owner_last_name;
|
||||
gCacheName->getName(obj->mPermissions->getCreator(), creator_first_name, creator_last_name);
|
||||
creator_name << creator_first_name << " " << creator_last_name;
|
||||
row["id"] = obj->getObject()->getID();
|
||||
row["columns"][0]["column"] = "object_name";
|
||||
row["columns"][0]["type"] = "text";
|
||||
// make sure we're either at the top of the link chain
|
||||
// or top of the editable chain, for attachments
|
||||
if(!(obj->getObject()->isRoot() || obj->getObject()->isRootEdit()))
|
||||
{
|
||||
row["columns"][0]["value"] = LLString(" ") + obj->mName;
|
||||
}
|
||||
else
|
||||
{
|
||||
row["columns"][0]["value"] = obj->mName;
|
||||
}
|
||||
row["columns"][1]["column"] = "owner_name";
|
||||
row["columns"][1]["type"] = "text";
|
||||
row["columns"][1]["value"] = owner_name.str().c_str();
|
||||
row["columns"][2]["column"] = "creator_name";
|
||||
row["columns"][2]["type"] = "text";
|
||||
row["columns"][2]["value"] = creator_name.str().c_str();
|
||||
row["columns"][3]["column"] = "creation_date";
|
||||
row["columns"][3]["type"] = "text";
|
||||
row["columns"][3]["value"] = time;
|
||||
mObjectList->addElement(row, ADD_TOP);
|
||||
obj = mObjectSelection->getNextNode();
|
||||
}
|
||||
if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index)
|
||||
{
|
||||
mObjectList->selectNthItem(selected_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
mObjectList->selectNthItem(0);
|
||||
}
|
||||
onSelectObject(this, NULL);
|
||||
mObjectList->setScrollPos(pos);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::onFocusReceived()
|
||||
{
|
||||
select_tool(gToolInspect);
|
||||
}
|
||||
|
||||
void LLFloaterInspect::dirty()
|
||||
{
|
||||
if(sInstance)
|
||||
{
|
||||
sInstance->setDirty();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterInspect::draw()
|
||||
{
|
||||
if (mDirty)
|
||||
{
|
||||
refresh();
|
||||
mDirty = FALSE;
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,50 +1,50 @@
|
|||
/**
|
||||
* @file llfloaterfriends.h
|
||||
* @author Cube
|
||||
* @date 2006-12-16
|
||||
* @brief Declaration of class for displaying object attributes
|
||||
*
|
||||
* Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERINSPECT_H
|
||||
#define LL_LLFLOATERINSPECT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
//class LLTool;
|
||||
class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater
|
||||
{
|
||||
public:
|
||||
virtual ~LLFloaterInspect(void);
|
||||
static void show(void* ignored = NULL);
|
||||
virtual BOOL postBuild();
|
||||
static void dirty();
|
||||
static LLUUID getSelectedUUID();
|
||||
virtual void draw();
|
||||
virtual void refresh();
|
||||
static BOOL isVisible();
|
||||
virtual void onFocusReceived();
|
||||
static void onClickCreatorProfile(void* ctrl);
|
||||
static void onClickOwnerProfile(void* ctrl);
|
||||
static void onSelectObject(LLUICtrl* ctrl, void* user_data);
|
||||
LLScrollListCtrl* mObjectList;
|
||||
protected:
|
||||
// protected members
|
||||
LLFloaterInspect();
|
||||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
|
||||
private:
|
||||
// static data
|
||||
static LLFloaterInspect* sInstance;
|
||||
|
||||
LLHandle<LLObjectSelection> mObjectSelection;
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
/**
|
||||
* @file llfloaterfriends.h
|
||||
* @author Cube
|
||||
* @date 2006-12-16
|
||||
* @brief Declaration of class for displaying object attributes
|
||||
*
|
||||
* Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERINSPECT_H
|
||||
#define LL_LLFLOATERINSPECT_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
//class LLTool;
|
||||
class LLObjectSelection;
|
||||
class LLScrollListCtrl;
|
||||
class LLUICtrl;
|
||||
|
||||
class LLFloaterInspect : public LLFloater
|
||||
{
|
||||
public:
|
||||
virtual ~LLFloaterInspect(void);
|
||||
static void show(void* ignored = NULL);
|
||||
virtual BOOL postBuild();
|
||||
static void dirty();
|
||||
static LLUUID getSelectedUUID();
|
||||
virtual void draw();
|
||||
virtual void refresh();
|
||||
static BOOL isVisible();
|
||||
virtual void onFocusReceived();
|
||||
static void onClickCreatorProfile(void* ctrl);
|
||||
static void onClickOwnerProfile(void* ctrl);
|
||||
static void onSelectObject(LLUICtrl* ctrl, void* user_data);
|
||||
LLScrollListCtrl* mObjectList;
|
||||
protected:
|
||||
// protected members
|
||||
LLFloaterInspect();
|
||||
void setDirty() { mDirty = TRUE; }
|
||||
bool mDirty;
|
||||
|
||||
private:
|
||||
// static data
|
||||
static LLFloaterInspect* sInstance;
|
||||
|
||||
LLHandle<LLObjectSelection> mObjectSelection;
|
||||
};
|
||||
|
||||
#endif //LL_LLFLOATERINSPECT_H
|
||||
|
|
|
|||
|
|
@ -346,8 +346,8 @@ void* LLFloaterLand::createPanelLandBan(void* data)
|
|||
|
||||
LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel)
|
||||
: LLPanel("land_general_panel"),
|
||||
mParcel(parcel),
|
||||
mUncheckedSell(FALSE)
|
||||
mUncheckedSell(FALSE),
|
||||
mParcel(parcel)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,8 @@ LLLinkedList<LLFloaterPostcard> LLFloaterPostcard::sInstances;
|
|||
|
||||
LLFloaterPostcard::LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global)
|
||||
: LLFloater("Postcard Floater"),
|
||||
mViewerImage(img),
|
||||
mJPEGImage(jpeg),
|
||||
mViewerImage(img),
|
||||
mImageScale(img_scale),
|
||||
mPosTakenGlobal(pos_taken_global)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ void LLFloaterProperties::refresh()
|
|||
"RadioSaleType",
|
||||
"EditPrice"
|
||||
};
|
||||
for(int t=0;t<sizeof(enableNames)/sizeof(char*);t++)
|
||||
for(size_t t=0; t<sizeof(enableNames)/sizeof(char*); ++t)
|
||||
{
|
||||
childSetEnabled(enableNames[t],false);
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ void LLFloaterProperties::refresh()
|
|||
"EveryoneMaskDebug",
|
||||
"NextMaskDebug"
|
||||
};
|
||||
for(int t=0;t<sizeof(hideNames)/sizeof(char*);t++)
|
||||
for(size_t t=0; t<sizeof(hideNames)/sizeof(char*); ++t)
|
||||
{
|
||||
childSetVisible(hideNames[t],false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ BOOL LLFloaterTools::postBuild()
|
|||
&LLToolPlacerPanel::sTriangleTorus,
|
||||
&LLToolPlacerPanel::sTree,
|
||||
&LLToolPlacerPanel::sGrass};
|
||||
for(int t=0;t<sizeof(toolNames)/sizeof(toolNames[0]);t++)
|
||||
for(size_t t=0; t<sizeof(toolNames)/sizeof(toolNames[0]); ++t)
|
||||
{
|
||||
LLButton *found = LLViewerUICtrlFactory::getButtonByName(this,toolNames[t]);
|
||||
if(found)
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
|
|||
}
|
||||
}
|
||||
|
||||
if (group_datap->mMembers.size() == group_datap->mMemberCount)
|
||||
if (group_datap->mMembers.size() == (U32)group_datap->mMemberCount)
|
||||
{
|
||||
group_datap->mMemberDataComplete = TRUE;
|
||||
group_datap->mMemberRequestID.setNull();
|
||||
|
|
@ -979,7 +979,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
|
|||
group_data->mRoles[role_id] = rd;
|
||||
}
|
||||
|
||||
if (group_data->mRoles.size() == group_data->mRoleCount)
|
||||
if (group_data->mRoles.size() == (U32)group_data->mRoleCount)
|
||||
{
|
||||
group_data->mRoleDataComplete = TRUE;
|
||||
group_data->mRoleDataRequestID.setNull();
|
||||
|
|
|
|||
|
|
@ -2174,6 +2174,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
case LLAssetType::AT_CATEGORY:
|
||||
is_movable = ( LLAssetType::AT_NONE == ((LLInventoryCategory*)inv_item)->getPreferredType() );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
LLUUID trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
|
||||
|
|
@ -2190,6 +2192,8 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
|||
case LLAssetType::AT_OBJECT:
|
||||
is_movable = !avatar->isWearingAttachment(inv_item->getUUID());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2759,6 +2763,8 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,
|
|||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
|
@ -3407,8 +3413,8 @@ struct LLFoundData
|
|||
LLAssetType::EType asset_type) :
|
||||
mItemID(item_id),
|
||||
mAssetID(asset_id),
|
||||
mAssetType(asset_type),
|
||||
mName(name),
|
||||
mAssetType(asset_type),
|
||||
mWearable( NULL ) {}
|
||||
|
||||
LLUUID mItemID;
|
||||
|
|
|
|||
|
|
@ -1120,6 +1120,8 @@ void LLManipTranslate::renderSnapGuides()
|
|||
inner_color.setVec(1,1,0,line_alpha);
|
||||
mManipPart = LL_XY_PLANE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
highlightIntersection(normal, selection_center, grid_rotation, inner_color);
|
||||
|
|
|
|||
|
|
@ -512,25 +512,25 @@ BOOL LLPanelAvatarPicks::postBuild(void)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLPanelAvatarAdvanced::postBuild()
|
||||
BOOL LLPanelAvatarAdvanced::postBuild()
|
||||
{
|
||||
for( S32 i = 0; i < kArraySize(mWantToCheck); i++ )
|
||||
mWantToCheck[i] = NULL;
|
||||
for( S32 i = 0; i < kArraySize(mSkillsCheck); i++ )
|
||||
mSkillsCheck[i] = NULL;
|
||||
for(size_t ii = 0; ii < kArraySize(mWantToCheck); ++ii)
|
||||
mWantToCheck[ii] = NULL;
|
||||
for(size_t ii = 0; ii < kArraySize(mSkillsCheck); ++ii)
|
||||
mSkillsCheck[ii] = NULL;
|
||||
mWantToCount = (8>kArraySize(mWantToCheck))?kArraySize(mWantToCheck):8;
|
||||
for(int t=0;t < mWantToCount ;t++)
|
||||
for(S32 tt=0; tt < mWantToCount; ++tt)
|
||||
{
|
||||
LLString ctlname = llformat("chk%d",t);
|
||||
mWantToCheck[t] = LLUICtrlFactory::getCheckBoxByName(this,ctlname);
|
||||
LLString ctlname = llformat("chk%d", tt);
|
||||
mWantToCheck[tt] = LLUICtrlFactory::getCheckBoxByName(this,ctlname);
|
||||
}
|
||||
mSkillsCount = (6>kArraySize(mSkillsCheck))?kArraySize(mSkillsCheck):6;
|
||||
|
||||
for(int t=0;t<mSkillsCount;t++)
|
||||
for(S32 tt=0; tt < mSkillsCount; ++tt)
|
||||
{
|
||||
//Find the Skills checkboxes and save off thier controls
|
||||
LLString ctlname = llformat("schk%d",t);
|
||||
mSkillsCheck[t] = LLUICtrlFactory::getCheckBoxByName(this,ctlname);
|
||||
LLString ctlname = llformat("schk%d",tt);
|
||||
mSkillsCheck[tt] = LLUICtrlFactory::getCheckBoxByName(this,ctlname);
|
||||
}
|
||||
|
||||
mWantToEdit = LLUICtrlFactory::getLineEditorByName(this,"want_to_edit");
|
||||
|
|
|
|||
|
|
@ -83,16 +83,17 @@ LLPanelClassified::LLPanelClassified(BOOL in_finder)
|
|||
mDataRequested(FALSE),
|
||||
mEnableCommit(FALSE),
|
||||
mPaidFor(FALSE),
|
||||
mParcelID(),
|
||||
mPosGlobal(),
|
||||
mSnapshotCtrl(NULL),
|
||||
mNameEditor(NULL),
|
||||
mLocationEditor(NULL),
|
||||
mDescEditor(NULL),
|
||||
mLocationEditor(NULL),
|
||||
mCategoryCombo(NULL),
|
||||
mUpdateBtn(NULL),
|
||||
mTeleportBtn(NULL),
|
||||
mMapBtn(NULL),
|
||||
//mLandmarkBtn(NULL),
|
||||
//mEnabledCheck(NULL),
|
||||
mProfileBtn(NULL),
|
||||
mInfoText(NULL),
|
||||
mMatureCheck(NULL),
|
||||
mAutoRenewCheck(NULL),
|
||||
mSetBtn(NULL),
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ LLPanelGroup::LLPanelGroup(const std::string& filename,
|
|||
mCurrentTab( NULL ),
|
||||
mRequestedTab( NULL ),
|
||||
mTabContainer( NULL ),
|
||||
mForceClose( FALSE ),
|
||||
mIgnoreTransition( FALSE ),
|
||||
mForceClose( FALSE ),
|
||||
mInitialTab(initial_tab_selected),
|
||||
mAllowEdit( TRUE ),
|
||||
mShowingNotifyDialog( FALSE )
|
||||
|
|
|
|||
|
|
@ -1101,7 +1101,10 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()
|
|||
check->setCommitCallback(onRoleCheck);
|
||||
check->setCallbackUserData(this);
|
||||
check->set( count > 0 );
|
||||
check->setTentative(0 != count && selected_members.size() != count);
|
||||
check->setTentative(
|
||||
(0 != count)
|
||||
&& (selected_members.size() !=
|
||||
(std::vector<LLUUID>::size_type)count));
|
||||
|
||||
//NOTE: as of right now a user can break the group
|
||||
//by removing himself from a role if he is the
|
||||
|
|
@ -1996,7 +1999,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc)
|
|||
|
||||
mRolesList->sortByColumn("name", TRUE);
|
||||
|
||||
if ( (gdatap->mRoles.size() < MAX_ROLES)
|
||||
if ( (gdatap->mRoles.size() < (U32)MAX_ROLES)
|
||||
&& gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CREATE) )
|
||||
{
|
||||
mCreateRoleButton->setEnabled(TRUE);
|
||||
|
|
|
|||
|
|
@ -513,4 +513,4 @@ void LLMultiPreview::setAutoOpenInstance(LLMultiPreview* previewp, const LLUUID&
|
|||
{
|
||||
sAutoOpenPreviewHandles[id] = previewp->getHandle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5770,8 +5770,8 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
|
|||
LLObjectSelection::LLObjectSelection() :
|
||||
std::list<LLSelectNode*>(),
|
||||
LLRefCount(),
|
||||
mCurrentTE(-1),
|
||||
mCurrentNode(end()),
|
||||
mCurrentTE(-1),
|
||||
mSelectType(SELECT_TYPE_WORLD)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ void LLSpatialGroup::validateDrawMap()
|
|||
|
||||
void LLSpatialGroup::makeStatic()
|
||||
{
|
||||
#if !LL_DARWIN
|
||||
if (isState(GEOM_DIRTY | ALPHA_DIRTY))
|
||||
{
|
||||
return;
|
||||
|
|
@ -309,6 +310,7 @@ void LLSpatialGroup::makeStatic()
|
|||
|
||||
mBuilt = 1.f;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
|
||||
|
|
@ -318,7 +320,12 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate)
|
|||
drawablep->updateSpatialExtents();
|
||||
validate_drawable(drawablep);
|
||||
|
||||
if (mOctreeNode->isInside(drawablep) && mOctreeNode->contains(drawablep))
|
||||
OctreeNode* parent = mOctreeNode->getOctParent();
|
||||
|
||||
if (mOctreeNode->isInside(drawablep->getPositionGroup()) &&
|
||||
(mOctreeNode->contains(drawablep) ||
|
||||
(drawablep->getBinRadius() > mOctreeNode->getSize().mdV[0] &&
|
||||
parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY)))
|
||||
{
|
||||
unbound();
|
||||
setState(OBJECT_DIRTY);
|
||||
|
|
@ -697,14 +704,21 @@ void LLSpatialGroup::clearState(U32 state, S32 mode)
|
|||
// Octree Listener Implementation
|
||||
//======================================
|
||||
|
||||
LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part)
|
||||
: mOctreeNode(node), mState(0), mSpatialPartition(part), mVertexBuffer(NULL),
|
||||
mDistance(0.f), mLastUpdateDistance(-1.f),
|
||||
mViewAngle(0.f), mLastUpdateViewAngle(-1.f),
|
||||
mDepth(0.f), mBuilt(0.f),
|
||||
mLastUpdateTime(gFrameTimeSeconds), mLastRenderTime(gFrameTimeSeconds),
|
||||
mLastAddTime(gFrameTimeSeconds),
|
||||
mBufferUsage(GL_STATIC_DRAW_ARB)
|
||||
LLSpatialGroup::LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part) :
|
||||
mState(0),
|
||||
mBuilt(0.f),
|
||||
mOctreeNode(node),
|
||||
mSpatialPartition(part),
|
||||
mVertexBuffer(NULL),
|
||||
mBufferUsage(GL_STATIC_DRAW_ARB),
|
||||
mDistance(0.f),
|
||||
mDepth(0.f),
|
||||
mLastUpdateDistance(-1.f),
|
||||
mLastUpdateTime(gFrameTimeSeconds),
|
||||
mLastAddTime(gFrameTimeSeconds),
|
||||
mLastRenderTime(gFrameTimeSeconds),
|
||||
mViewAngle(0.f),
|
||||
mLastUpdateViewAngle(-1.f)
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
||||
|
|
@ -898,6 +912,31 @@ void LLSpatialGroup::handleChildRemoval(const OctreeNode* parent, const OctreeNo
|
|||
unbound();
|
||||
}
|
||||
|
||||
void LLSpatialGroup::destroyGL()
|
||||
{
|
||||
setState(LLSpatialGroup::GEOM_DIRTY |
|
||||
LLSpatialGroup::OCCLUSION_DIRTY |
|
||||
LLSpatialGroup::IMAGE_DIRTY);
|
||||
mLastUpdateTime = gFrameTimeSeconds;
|
||||
mVertexBuffer = NULL;
|
||||
mBufferMap.clear();
|
||||
|
||||
mOcclusionVerts = NULL;
|
||||
mReflectionMap = NULL;
|
||||
clearDrawMap();
|
||||
|
||||
for (LLSpatialGroup::element_iter i = getData().begin(); i != getData().end(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
for (S32 j = 0; j < drawable->getNumFaces(); j++)
|
||||
{
|
||||
LLFace* facep = drawable->getFace(j);
|
||||
facep->mVertexBuffer = NULL;
|
||||
facep->mLastVertexBuffer = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLSpatialGroup::rebound()
|
||||
{
|
||||
if (!isState(DIRTY))
|
||||
|
|
@ -1423,28 +1462,11 @@ public:
|
|||
virtual void visit(const LLOctreeState<LLDrawable>* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
group->destroyGL();
|
||||
|
||||
group->setState(LLSpatialGroup::GEOM_DIRTY |
|
||||
LLSpatialGroup::OCCLUSION_DIRTY |
|
||||
LLSpatialGroup::IMAGE_DIRTY);
|
||||
group->mLastUpdateTime = gFrameTimeSeconds;
|
||||
group->mVertexBuffer = NULL;
|
||||
group->mBufferMap.clear();
|
||||
|
||||
group->mOcclusionVerts = NULL;
|
||||
group->mReflectionMap = NULL;
|
||||
group->clearDrawMap();
|
||||
|
||||
for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = *i;
|
||||
for (S32 j = 0; j < drawable->getNumFaces(); j++)
|
||||
{
|
||||
LLFace* facep = drawable->getFace(j);
|
||||
facep->mVertexBuffer = NULL;
|
||||
facep->mLastVertexBuffer = NULL;
|
||||
}
|
||||
|
||||
if (drawable->getVObj() && !group->mSpatialPartition->mRenderByGroup)
|
||||
{
|
||||
gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL, TRUE);
|
||||
|
|
@ -1458,6 +1480,7 @@ public:
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
void LLSpatialPartition::restoreGL()
|
||||
{
|
||||
LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
|
||||
|
|
@ -1597,7 +1620,7 @@ void LLSpatialPartition::processGeometry(LLCamera* camera)
|
|||
U32 process_count = 8;
|
||||
|
||||
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
|
||||
if (!root->isState(LLSpatialGroup::IN_GEOMETRY_QUEUE))
|
||||
if (mUpdateQueue.empty())
|
||||
{
|
||||
root->setState(LLSpatialGroup::IN_GEOMETRY_QUEUE);
|
||||
mUpdateQueue.push(root);
|
||||
|
|
@ -1628,18 +1651,19 @@ void LLSpatialPartition::processGeometry(LLCamera* camera)
|
|||
}
|
||||
}
|
||||
|
||||
if (!group->isDead() &&
|
||||
!group->isVisible() &&
|
||||
!group->isState(LLSpatialGroup::OBJECT_DIRTY) &&
|
||||
group->mBufferUsage != GL_STREAM_DRAW_ARB)
|
||||
if (!group->isDead() && !group->isVisible())
|
||||
{
|
||||
group->updateDistance(*camera);
|
||||
for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i)
|
||||
if (!group->isState(LLSpatialGroup::OBJECT_DIRTY) &&
|
||||
group->mBufferUsage != GL_STREAM_DRAW_ARB)
|
||||
{
|
||||
LLDrawable* drawablep = *i;
|
||||
if (!drawablep->isDead())
|
||||
group->updateDistance(*camera);
|
||||
for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i)
|
||||
{
|
||||
drawablep->updateDistance(*camera);
|
||||
LLDrawable* drawablep = *i;
|
||||
if (!drawablep->isDead())
|
||||
{
|
||||
drawablep->updateDistance(*camera);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1703,7 +1727,7 @@ void LLSpatialPartition::processImagery(LLCamera* camera)
|
|||
}
|
||||
|
||||
gPipeline.generateReflectionMap(gPipeline.mCubeBuffer, cube_cam, 128);
|
||||
gPipeline.blurReflectionMap(gPipeline.mCubeBuffer, cube_map, 32);
|
||||
gPipeline.blurReflectionMap(gPipeline.mCubeBuffer, cube_map, 64);
|
||||
group->mReflectionMap = cube_map;
|
||||
group->setState(LLSpatialGroup::GEOM_DIRTY);
|
||||
gPipeline.markRebuild(group);
|
||||
|
|
@ -2821,11 +2845,19 @@ LLDrawable* LLSpatialPartition::pickDrawable(const LLVector3& start, const LLVec
|
|||
LLDrawInfo::LLDrawInfo(U32 start, U32 end, U32 count, U32 offset,
|
||||
LLViewerImage* texture, LLVertexBuffer* buffer,
|
||||
BOOL fullbright, U8 bump, BOOL particle, F32 part_size)
|
||||
: mStart(start), mEnd(end), mCount(count), mOffset(offset),
|
||||
mTexture(texture), mVertexBuffer(buffer),
|
||||
mFullbright(fullbright), mBump(bump),
|
||||
mParticle(particle), mPartSize(part_size),
|
||||
mVSize(0.f), mTextureMatrix(NULL)
|
||||
:
|
||||
mVertexBuffer(buffer),
|
||||
mTexture(texture),
|
||||
mTextureMatrix(NULL),
|
||||
mStart(start),
|
||||
mEnd(end),
|
||||
mCount(count),
|
||||
mOffset(offset),
|
||||
mFullbright(fullbright),
|
||||
mBump(bump),
|
||||
mParticle(particle),
|
||||
mPartSize(part_size),
|
||||
mVSize(0.f)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@ public:
|
|||
BOOL boundObjects(BOOL empty, LLVector3& newMin, LLVector3& newMax);
|
||||
void unbound();
|
||||
BOOL rebound();
|
||||
void destroyGL();
|
||||
|
||||
void updateDistance(LLCamera& camera);
|
||||
BOOL changeLOD();
|
||||
|
|
@ -273,6 +274,8 @@ public:
|
|||
BOOL isVolatile() const { return mVolatile; }
|
||||
|
||||
virtual LLSpatialBridge* asBridge() { return NULL; }
|
||||
virtual BOOL isBridge() { return asBridge() != NULL; }
|
||||
|
||||
S32 getObjects(const LLVector3& pos, F32 rad, LLDrawable::drawable_set_t &results );
|
||||
S32 getLights(const LLVector3& pos, F32 rad, LLDrawable::drawable_set_t &results );
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,149 +1,149 @@
|
|||
/**
|
||||
* @file lltexturecache.h
|
||||
* @brief Object for managing texture cachees.
|
||||
*
|
||||
* Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLTEXTURECACHE_
|
||||
#define LL_LLTEXTURECACHE_H
|
||||
|
||||
#include "lldir.h"
|
||||
#include "llstl.h"
|
||||
#include "llstring.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
#include "llworkerthread.h"
|
||||
|
||||
class LLTextureCacheWorker;
|
||||
|
||||
class LLTextureCache : public LLWorkerThread
|
||||
{
|
||||
friend class LLTextureCacheWorker;
|
||||
|
||||
public:
|
||||
|
||||
class Responder : public LLResponder
|
||||
{
|
||||
public:
|
||||
virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) = 0;
|
||||
};
|
||||
|
||||
class ReadResponder : public Responder
|
||||
{
|
||||
public:
|
||||
ReadResponder();
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal);
|
||||
void setImage(LLImageFormatted* image) { mFormattedImage = image; }
|
||||
protected:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
S32 mImageSize;
|
||||
BOOL mImageLocal;
|
||||
};
|
||||
|
||||
class WriteResponder : public Responder
|
||||
{
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
|
||||
{
|
||||
// not used
|
||||
}
|
||||
};
|
||||
|
||||
LLTextureCache(bool threaded);
|
||||
~LLTextureCache();
|
||||
|
||||
/*virtual*/ S32 update(U32 max_time_ms);
|
||||
|
||||
void purgeCache(ELLPath location);
|
||||
S64 initCache(ELLPath location, S64 maxsize, BOOL read_only);
|
||||
|
||||
handle_t readFromCache(const LLUUID& id, U32 priority, S32 offset, S32 size,
|
||||
ReadResponder* responder);
|
||||
bool readComplete(handle_t handle, bool abort);
|
||||
handle_t writeToCache(const LLUUID& id, U32 priority, U8* data, S32 datasize, S32 imagesize,
|
||||
WriteResponder* responder);
|
||||
bool writeComplete(handle_t handle, bool abort = false);
|
||||
void prioritizeWrite(handle_t handle);
|
||||
|
||||
void removeFromCache(const LLUUID& id);
|
||||
|
||||
// For LLTextureCacheWorker::Responder
|
||||
LLTextureCacheWorker* getReader(handle_t handle);
|
||||
LLTextureCacheWorker* getWriter(handle_t handle);
|
||||
void lockWorkers() { mWorkersMutex.lock(); }
|
||||
void unlockWorkers() { mWorkersMutex.unlock(); }
|
||||
|
||||
// debug
|
||||
S32 getNumReads() { return mReaders.size(); }
|
||||
S32 getNumWrites() { return mWriters.size(); }
|
||||
|
||||
protected:
|
||||
// Accessed by LLTextureCacheWorker
|
||||
apr_pool_t* getFileAPRPool() { return mFileAPRPool; }
|
||||
bool appendToTextureEntryList(const LLUUID& id, S32 size);
|
||||
std::string getLocalFileName(const LLUUID& id);
|
||||
std::string getTextureFileName(const LLUUID& id);
|
||||
|
||||
private:
|
||||
void setDirNames(ELLPath location);
|
||||
void readHeaderCache(apr_pool_t* poolp = NULL);
|
||||
void purgeAllTextures(bool purge_directories);
|
||||
void purgeTextures(bool validate);
|
||||
S32 getHeaderCacheEntry(const LLUUID& id, bool touch, S32* imagesize = NULL);
|
||||
bool removeHeaderCacheEntry(const LLUUID& id);
|
||||
void lockHeaders() { mHeaderMutex.lock(); }
|
||||
void unlockHeaders() { mHeaderMutex.unlock(); }
|
||||
|
||||
private:
|
||||
// Internal
|
||||
LLMutex mWorkersMutex;
|
||||
LLMutex mHeaderMutex;
|
||||
apr_pool_t* mFileAPRPool;
|
||||
|
||||
typedef std::map<handle_t, LLTextureCacheWorker*> handle_map_t;
|
||||
handle_map_t mReaders;
|
||||
handle_map_t mWriters;
|
||||
std::vector<handle_t> mPrioritizeWriteList;
|
||||
|
||||
BOOL mReadOnly;
|
||||
|
||||
// Entries
|
||||
struct EntriesInfo
|
||||
{
|
||||
F32 mVersion;
|
||||
U32 mEntries;
|
||||
};
|
||||
struct Entry
|
||||
{
|
||||
Entry() {}
|
||||
Entry(const LLUUID& id, S32 size, U32 time) : mID(id), mSize(size), mTime(time) {}
|
||||
LLUUID mID; // 128 bits
|
||||
S32 mSize; // total size of image if known (NOT size cached)
|
||||
U32 mTime; // seconds since 1/1/1970
|
||||
};
|
||||
|
||||
// HEADERS (Include first mip)
|
||||
std::string mHeaderEntriesFileName;
|
||||
std::string mHeaderDataFileName;
|
||||
EntriesInfo mHeaderEntriesInfo;
|
||||
typedef std::map<S32,LLUUID> index_map_t;
|
||||
index_map_t mLRU; // index, id; stored as a map for fast removal
|
||||
typedef std::map<LLUUID,S32> id_map_t;
|
||||
id_map_t mHeaderIDMap;
|
||||
|
||||
// BODIES (TEXTURES minus headers)
|
||||
std::string mTexturesDirName;
|
||||
std::string mTexturesDirEntriesFileName;
|
||||
typedef std::map<LLUUID,S32> size_map_t;
|
||||
size_map_t mTexturesSizeMap;
|
||||
S64 mTexturesSizeTotal;
|
||||
LLAtomic32<BOOL> mDoPurge;
|
||||
|
||||
// Statics
|
||||
static F32 sHeaderCacheVersion;
|
||||
static U32 sCacheMaxEntries;
|
||||
static S64 sCacheMaxTexturesSize;
|
||||
};
|
||||
|
||||
#endif // LL_LLTEXTURECACHE_H
|
||||
/**
|
||||
* @file lltexturecache.h
|
||||
* @brief Object for managing texture cachees.
|
||||
*
|
||||
* Copyright (c) 2000-$CurrentYear$, Linden Research, Inc.
|
||||
* $License$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLTEXTURECACHE_
|
||||
#define LL_LLTEXTURECACHE_H
|
||||
|
||||
#include "lldir.h"
|
||||
#include "llstl.h"
|
||||
#include "llstring.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
#include "llworkerthread.h"
|
||||
|
||||
class LLTextureCacheWorker;
|
||||
|
||||
class LLTextureCache : public LLWorkerThread
|
||||
{
|
||||
friend class LLTextureCacheWorker;
|
||||
|
||||
public:
|
||||
|
||||
class Responder : public LLResponder
|
||||
{
|
||||
public:
|
||||
virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) = 0;
|
||||
};
|
||||
|
||||
class ReadResponder : public Responder
|
||||
{
|
||||
public:
|
||||
ReadResponder();
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal);
|
||||
void setImage(LLImageFormatted* image) { mFormattedImage = image; }
|
||||
protected:
|
||||
LLPointer<LLImageFormatted> mFormattedImage;
|
||||
S32 mImageSize;
|
||||
BOOL mImageLocal;
|
||||
};
|
||||
|
||||
class WriteResponder : public Responder
|
||||
{
|
||||
void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal)
|
||||
{
|
||||
// not used
|
||||
}
|
||||
};
|
||||
|
||||
LLTextureCache(bool threaded);
|
||||
~LLTextureCache();
|
||||
|
||||
/*virtual*/ S32 update(U32 max_time_ms);
|
||||
|
||||
void purgeCache(ELLPath location);
|
||||
S64 initCache(ELLPath location, S64 maxsize, BOOL read_only);
|
||||
|
||||
handle_t readFromCache(const LLUUID& id, U32 priority, S32 offset, S32 size,
|
||||
ReadResponder* responder);
|
||||
bool readComplete(handle_t handle, bool abort);
|
||||
handle_t writeToCache(const LLUUID& id, U32 priority, U8* data, S32 datasize, S32 imagesize,
|
||||
WriteResponder* responder);
|
||||
bool writeComplete(handle_t handle, bool abort = false);
|
||||
void prioritizeWrite(handle_t handle);
|
||||
|
||||
void removeFromCache(const LLUUID& id);
|
||||
|
||||
// For LLTextureCacheWorker::Responder
|
||||
LLTextureCacheWorker* getReader(handle_t handle);
|
||||
LLTextureCacheWorker* getWriter(handle_t handle);
|
||||
void lockWorkers() { mWorkersMutex.lock(); }
|
||||
void unlockWorkers() { mWorkersMutex.unlock(); }
|
||||
|
||||
// debug
|
||||
S32 getNumReads() { return mReaders.size(); }
|
||||
S32 getNumWrites() { return mWriters.size(); }
|
||||
|
||||
protected:
|
||||
// Accessed by LLTextureCacheWorker
|
||||
apr_pool_t* getFileAPRPool() { return mFileAPRPool; }
|
||||
bool appendToTextureEntryList(const LLUUID& id, S32 size);
|
||||
std::string getLocalFileName(const LLUUID& id);
|
||||
std::string getTextureFileName(const LLUUID& id);
|
||||
|
||||
private:
|
||||
void setDirNames(ELLPath location);
|
||||
void readHeaderCache(apr_pool_t* poolp = NULL);
|
||||
void purgeAllTextures(bool purge_directories);
|
||||
void purgeTextures(bool validate);
|
||||
S32 getHeaderCacheEntry(const LLUUID& id, bool touch, S32* imagesize = NULL);
|
||||
bool removeHeaderCacheEntry(const LLUUID& id);
|
||||
void lockHeaders() { mHeaderMutex.lock(); }
|
||||
void unlockHeaders() { mHeaderMutex.unlock(); }
|
||||
|
||||
private:
|
||||
// Internal
|
||||
LLMutex mWorkersMutex;
|
||||
LLMutex mHeaderMutex;
|
||||
apr_pool_t* mFileAPRPool;
|
||||
|
||||
typedef std::map<handle_t, LLTextureCacheWorker*> handle_map_t;
|
||||
handle_map_t mReaders;
|
||||
handle_map_t mWriters;
|
||||
std::vector<handle_t> mPrioritizeWriteList;
|
||||
|
||||
BOOL mReadOnly;
|
||||
|
||||
// Entries
|
||||
struct EntriesInfo
|
||||
{
|
||||
F32 mVersion;
|
||||
U32 mEntries;
|
||||
};
|
||||
struct Entry
|
||||
{
|
||||
Entry() {}
|
||||
Entry(const LLUUID& id, S32 size, U32 time) : mID(id), mSize(size), mTime(time) {}
|
||||
LLUUID mID; // 128 bits
|
||||
S32 mSize; // total size of image if known (NOT size cached)
|
||||
U32 mTime; // seconds since 1/1/1970
|
||||
};
|
||||
|
||||
// HEADERS (Include first mip)
|
||||
std::string mHeaderEntriesFileName;
|
||||
std::string mHeaderDataFileName;
|
||||
EntriesInfo mHeaderEntriesInfo;
|
||||
typedef std::map<S32,LLUUID> index_map_t;
|
||||
index_map_t mLRU; // index, id; stored as a map for fast removal
|
||||
typedef std::map<LLUUID,S32> id_map_t;
|
||||
id_map_t mHeaderIDMap;
|
||||
|
||||
// BODIES (TEXTURES minus headers)
|
||||
std::string mTexturesDirName;
|
||||
std::string mTexturesDirEntriesFileName;
|
||||
typedef std::map<LLUUID,S32> size_map_t;
|
||||
size_map_t mTexturesSizeMap;
|
||||
S64 mTexturesSizeTotal;
|
||||
LLAtomic32<BOOL> mDoPurge;
|
||||
|
||||
// Statics
|
||||
static F32 sHeaderCacheVersion;
|
||||
static U32 sCacheMaxEntries;
|
||||
static S64 sCacheMaxTexturesSize;
|
||||
};
|
||||
|
||||
#endif // LL_LLTEXTURECACHE_H
|
||||
|
|
|
|||
|
|
@ -1205,9 +1205,9 @@ bool LLTextureFetchWorker::writeToCacheComplete()
|
|||
LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded)
|
||||
: LLWorkerThread("TextureFetch", threaded),
|
||||
mDebugCount(0),
|
||||
mDebugPause(0),
|
||||
mTextureCache(cache),
|
||||
mQueueMutex(getAPRPool())
|
||||
mDebugPause(FALSE),
|
||||
mQueueMutex(getAPRPool()),
|
||||
mTextureCache(cache)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,4 +82,4 @@ private:
|
|||
LLFrameTimer mNetworkTimer;
|
||||
};
|
||||
|
||||
#endif LL_LLTEXTUREFETCH_H
|
||||
#endif // LL_LLTEXTUREFETCH_H
|
||||
|
|
|
|||
|
|
@ -582,6 +582,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)
|
|||
gPipeline.stateSort(hud_cam);
|
||||
}
|
||||
|
||||
if (LLVertexBuffer::sEnableVBOs)
|
||||
{
|
||||
LLImageGL::sBoundTextureMemory += LLVertexBuffer::sAllocatedBytes;
|
||||
}
|
||||
|
||||
gPipeline.renderGeom(hud_cam);
|
||||
|
||||
//restore type mask
|
||||
|
|
@ -716,9 +721,10 @@ void render_ui_and_swap()
|
|||
}
|
||||
|
||||
{
|
||||
// LLFastTimer ftm(LLFastTimer::FTM_TEMP6);
|
||||
LLVertexBuffer::clientCopy();
|
||||
LLFastTimer ftm(LLFastTimer::FTM_CLIENT_COPY);
|
||||
LLVertexBuffer::clientCopy(0.016);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1134,6 +1134,9 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
|||
sub_menu->append(new LLMenuItemCheckGL("Texture Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_TEXTURE_AREA));
|
||||
sub_menu->append(new LLMenuItemCheckGL("Face Area (sqrt(A))",&LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_FACE_AREA));
|
||||
sub_menu->append(new LLMenuItemCheckGL("Pick Render", &LLPipeline::toggleRenderDebug, NULL,
|
||||
&LLPipeline::toggleRenderDebugControl,
|
||||
(void*)LLPipeline::RENDER_DEBUG_PICKING));
|
||||
|
|
|
|||
|
|
@ -1357,7 +1357,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
|||
|
||||
// Make sure the binary bucket is big enough to hold the header
|
||||
// and a null terminated item name.
|
||||
if ( (binary_bucket_size < (sizeof(notice_bucket_header_t) + sizeof(U8)))
|
||||
if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8))))
|
||||
|| (binary_bucket[binary_bucket_size - 1] != '\0') )
|
||||
{
|
||||
llwarns << "Malformed group notice binary bucket" << llendl;
|
||||
|
|
|
|||
|
|
@ -71,4 +71,4 @@ F32 gPacketDropPercentage = 0.f;
|
|||
F32 gInBandwidth = 0.f;
|
||||
F32 gOutBandwidth = 0.f;
|
||||
|
||||
unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */
|
||||
unsigned char gMACAddress[MAC_ADDRESS_BYTES]; /* Flawfinder: ignore */
|
||||
|
|
|
|||
|
|
@ -2523,9 +2523,9 @@ LLParcelSelection::LLParcelSelection() :
|
|||
mParcel(NULL),
|
||||
mSelectedMultipleOwners(FALSE),
|
||||
mWholeParcelSelected(FALSE),
|
||||
mSelectedPublicCount(0),
|
||||
mSelectedSelfCount(0),
|
||||
mSelectedOtherCount(0)
|
||||
mSelectedOtherCount(0),
|
||||
mSelectedPublicCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -2533,9 +2533,9 @@ LLParcelSelection::LLParcelSelection(LLParcel* parcel) :
|
|||
mParcel(parcel),
|
||||
mSelectedMultipleOwners(FALSE),
|
||||
mWholeParcelSelected(FALSE),
|
||||
mSelectedPublicCount(0),
|
||||
mSelectedSelfCount(0),
|
||||
mSelectedOtherCount(0)
|
||||
mSelectedOtherCount(0),
|
||||
mSelectedPublicCount(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -2570,4 +2570,4 @@ LLParcelSelection* get_null_parcel_selection()
|
|||
{
|
||||
static LLParcelSelectionHandle null_ptr = new LLParcelSelection();
|
||||
return null_ptr;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1842,13 +1842,6 @@ void LLViewerWindow::reshape(S32 width, S32 height)
|
|||
|
||||
gViewerStats->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
|
||||
gViewerStats->setStat(LLViewerStats::ST_WINDOW_HEIGHT, (F64)height);
|
||||
|
||||
//reposition HUD attachments
|
||||
LLVOAvatar* avatarp = gAgent.getAvatarObject();
|
||||
if (avatarp)
|
||||
{
|
||||
avatarp->resetHUDAttachments();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -748,9 +748,9 @@ LLVOAvatar::LLVOAvatar(
|
|||
mLastSkirtBakedID( IMG_DEFAULT_AVATAR ),
|
||||
mIsDummy(FALSE),
|
||||
mSpecialRenderMode(0),
|
||||
mTurning(FALSE),
|
||||
mPelvisToFoot(0.f),
|
||||
mLastSkeletonSerialNum( 0 ),
|
||||
mTurning(FALSE),
|
||||
mHeadOffset(),
|
||||
mIsSitting(FALSE),
|
||||
mTimeVisible(),
|
||||
|
|
@ -3005,8 +3005,12 @@ void LLVOAvatar::updateCharacter(LLAgent &agent)
|
|||
{
|
||||
F32 aspect = gCamera->getAspect();
|
||||
LLVector3 scale(1.f, aspect, 1.f);
|
||||
mScreenp->setScale(scale);
|
||||
mScreenp->updateWorldMatrixChildren();
|
||||
if (mScreenp->getScale() != scale)
|
||||
{
|
||||
mScreenp->setScale(scale);
|
||||
mScreenp->updateWorldMatrixChildren();
|
||||
resetHUDAttachments();
|
||||
}
|
||||
}
|
||||
|
||||
// clear debug text
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
|||
S32 result;
|
||||
if (result = mTextureAnimp->animateTextures(off_s, off_t, scale_s, scale_t, rot))
|
||||
{
|
||||
mTexAnimMode = result | mTextureAnimp->mMode;
|
||||
mTexAnimMode = mTextureAnimp->mMode | result;
|
||||
|
||||
S32 start, end;
|
||||
if (mTextureAnimp->mFace == -1)
|
||||
|
|
@ -309,6 +309,13 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
|||
tex_mat.translate(trans);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mTextureAnimp->mRate == 0)
|
||||
{
|
||||
mTexAnimMode = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dispatch to implementation
|
||||
|
|
@ -349,17 +356,18 @@ void LLVOVolume::updateTextures()
|
|||
|
||||
mTextureUpdateTimer.reset();
|
||||
|
||||
F32 old_area = mPixelArea;
|
||||
mPixelArea = 0.f;
|
||||
const S32 num_faces = mDrawable->getNumFaces();
|
||||
|
||||
const S32 num_faces = mDrawable->getNumFaces();
|
||||
F32 min_vsize=999999999.f, max_vsize=0.f;
|
||||
for (S32 i = 0; i < num_faces; i++)
|
||||
{
|
||||
LLFace* face = mDrawable->getFace(i);
|
||||
const LLTextureEntry *te = face->getTextureEntry();
|
||||
LLViewerImage *imagep = face->getTexture();
|
||||
|
||||
if (!imagep || !te)
|
||||
if (!imagep || !te ||
|
||||
face->mExtents[0] == face->mExtents[1])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -392,11 +400,12 @@ void LLVOVolume::updateTextures()
|
|||
if (pri < min_vsize) min_vsize = pri;
|
||||
if (pri > max_vsize) max_vsize = pri;
|
||||
}
|
||||
// U8 bump = te->getBumpmap();
|
||||
// if( te && bump)
|
||||
// {
|
||||
// gBumpImageList.addTextureStats( bump, imagep->getID(), vsize, 1, 1);
|
||||
// }
|
||||
else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_FACE_AREA))
|
||||
{
|
||||
F32 pri = mPixelArea;
|
||||
if (pri < min_vsize) min_vsize = pri;
|
||||
if (pri > max_vsize) max_vsize = pri;
|
||||
}
|
||||
}
|
||||
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
|
||||
|
|
@ -407,15 +416,22 @@ void LLVOVolume::updateTextures()
|
|||
{
|
||||
setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize)));
|
||||
}
|
||||
else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_FACE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize)));
|
||||
}
|
||||
|
||||
if (mPixelArea == 0)
|
||||
{ //flexi phasing issues make this happen
|
||||
mPixelArea = old_area;
|
||||
}
|
||||
}
|
||||
|
||||
F32 LLVOVolume::getTextureVirtualSize(LLFace* face)
|
||||
{
|
||||
//get area of circle around face
|
||||
LLVector3 center = face->getPositionAgent();
|
||||
LLVector3 size = //isFlexible() ?
|
||||
// getScale()*3.f :
|
||||
(face->mExtents[1] - face->mExtents[0]) * 0.5f;
|
||||
LLVector3 size = (face->mExtents[1] - face->mExtents[0]) * 0.5f;
|
||||
|
||||
F32 face_area = LLPipeline::calcPixelArea(center, size, *gCamera);
|
||||
|
||||
|
|
@ -585,9 +601,6 @@ BOOL LLVOVolume::calcLOD()
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
//update textures here as well
|
||||
updateTextures();
|
||||
|
||||
S32 cur_detail = 0;
|
||||
|
||||
F32 radius = mVolumep->mLODScaleBias.scaledVec(getScale()).magVec();
|
||||
|
|
@ -689,6 +702,17 @@ void LLVOVolume::updateFaceFlags()
|
|||
}
|
||||
}
|
||||
|
||||
void LLVOVolume::setParent(LLViewerObject* parent)
|
||||
{
|
||||
LLViewerObject::setParent(parent);
|
||||
if (mDrawable)
|
||||
{
|
||||
gPipeline.markMoved(mDrawable);
|
||||
mVolumeChanged = TRUE;
|
||||
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: regenFaces() MUST be followed by genTriangles()!
|
||||
void LLVOVolume::regenFaces()
|
||||
{
|
||||
|
|
@ -748,6 +772,8 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)
|
|||
{
|
||||
mDrawable->setSpatialExtents(min,max);
|
||||
mDrawable->setPositionGroup((min+max)*0.5f);
|
||||
//bounding boxes changed, update texture priorities
|
||||
updateTextures();
|
||||
}
|
||||
|
||||
updateRadius();
|
||||
|
|
@ -1918,8 +1944,10 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
|||
draw_vec[idx]->mVertexBuffer == facep->mVertexBuffer &&
|
||||
draw_vec[idx]->mEnd == facep->getGeomIndex()-1 &&
|
||||
draw_vec[idx]->mTexture == tex &&
|
||||
//draw_vec[idx]->mEnd - draw_vec[idx]->mStart + facep->getGeomCount() <= (U32) gGLManager.mGLMaxVertexRange &&
|
||||
//draw_vec[idx]->mCount + facep->getIndicesCount() <= (U32) gGLManager.mGLMaxIndexRange &&
|
||||
#if LL_DARWIN
|
||||
draw_vec[idx]->mEnd - draw_vec[idx]->mStart + facep->getGeomCount() <= (U32) gGLManager.mGLMaxVertexRange &&
|
||||
draw_vec[idx]->mCount + facep->getIndicesCount() <= (U32) gGLManager.mGLMaxIndexRange &&
|
||||
#endif
|
||||
draw_vec[idx]->mFullbright == fullbright &&
|
||||
draw_vec[idx]->mBump == bump &&
|
||||
draw_vec[idx]->mTextureMatrix == tex_mat)
|
||||
|
|
@ -2220,7 +2248,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
registerFace(group, facep, LLRenderPass::PASS_BUMP);
|
||||
}
|
||||
|
||||
if (!force_simple && vobj->getIsLight())
|
||||
if (vobj->getIsLight())
|
||||
{
|
||||
registerFace(group, facep, LLRenderPass::PASS_GLOW);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
/*virtual*/ BOOL isHUDAttachment() const;
|
||||
|
||||
void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point);
|
||||
|
||||
/*virtual*/ void setParent(LLViewerObject* parent);
|
||||
F32 getIndividualRadius() { return mRadius; }
|
||||
S32 getLOD() const { return mLOD; }
|
||||
const LLVector3 getPivotPositionAgent() const;
|
||||
|
|
|
|||
|
|
@ -212,6 +212,8 @@ BOOL LLPipeline::sSkipUpdate = FALSE;
|
|||
BOOL LLPipeline::sDynamicReflections = FALSE;
|
||||
|
||||
LLPipeline::LLPipeline() :
|
||||
mCubeBuffer(NULL),
|
||||
mCubeList(0),
|
||||
mVertexShadersEnabled(FALSE),
|
||||
mVertexShadersLoaded(0),
|
||||
mLastRebuildPool(NULL),
|
||||
|
|
@ -225,9 +227,7 @@ LLPipeline::LLPipeline() :
|
|||
mSimplePool(NULL),
|
||||
mBumpPool(NULL),
|
||||
mLightMask(0),
|
||||
mLightMovingMask(0),
|
||||
mCubeBuffer(NULL),
|
||||
mCubeList(0)
|
||||
mLightMovingMask(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1710,7 +1710,6 @@ void LLPipeline::updateMove()
|
|||
F32 LLPipeline::calcPixelArea(LLVector3 center, LLVector3 size, LLCamera &camera)
|
||||
{
|
||||
LLVector3 lookAt = center - camera.getOrigin();
|
||||
LLVector3 cross_vec = size * 2.f;
|
||||
F32 dist = lookAt.magVec();
|
||||
|
||||
//ramp down distance for nearby objects
|
||||
|
|
@ -1722,7 +1721,7 @@ F32 LLPipeline::calcPixelArea(LLVector3 center, LLVector3 size, LLCamera &camera
|
|||
}
|
||||
|
||||
//get area of circle around node
|
||||
F32 app_angle = atanf((cross_vec*0.5f).magVec()/dist);
|
||||
F32 app_angle = atanf(size.magVec()/dist);
|
||||
F32 radius = app_angle*LLDrawable::sCurPixelAngle;
|
||||
return radius*radius * 3.14159f;
|
||||
}
|
||||
|
|
@ -2196,10 +2195,12 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
|
|||
}
|
||||
}
|
||||
|
||||
#if !LL_DARWIN
|
||||
if (gFrameTimeSeconds - group->mLastUpdateTime > 4.f)
|
||||
{
|
||||
group->makeStatic();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
|
||||
|
|
|
|||
|
|
@ -325,7 +325,8 @@ public:
|
|||
RENDER_DEBUG_POINTS = 0x02000,
|
||||
RENDER_DEBUG_TEXTURE_PRIORITY = 0x04000,
|
||||
RENDER_DEBUG_TEXTURE_AREA = 0x08000,
|
||||
RENDER_DEBUG_PARTICLES = 0x10000,
|
||||
RENDER_DEBUG_FACE_AREA = 0x10000,
|
||||
RENDER_DEBUG_PARTICLES = 0x20000,
|
||||
};
|
||||
|
||||
LLPointer<LLViewerImage> mAlphaSizzleImagep;
|
||||
|
|
|
|||
Loading…
Reference in New Issue