diff --git a/autobuild.xml b/autobuild.xml
index b860ac7566..f41d75362e 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1355,9 +1355,9 @@
archive
name
darwin
@@ -1367,9 +1367,9 @@
archive
name
linux
@@ -1379,9 +1379,9 @@
archive
name
windows
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h
index 7bb2384938..387f93b98e 100755
--- a/indra/llmath/llcalcparser.h
+++ b/indra/llmath/llcalcparser.h
@@ -83,36 +83,36 @@ struct LLCalcParser : grammar
;
unary_func =
- ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sin)(self,arg1)]) |
- (str_p("COS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cos)(self,arg1)]) |
- (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tan)(self,arg1)]) |
- (str_p("ASIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asin)(self,arg1)]) |
- (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acos)(self,arg1)]) |
- (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atan)(self,arg1)]) |
+ ((str_p("SIN") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sin)(self,arg1)]) |
+ (str_p("COS") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_cos)(self,arg1)]) |
+ (str_p("TAN") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_tan)(self,arg1)]) |
+ (str_p("ASIN") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_asin)(self,arg1)]) |
+ (str_p("ACOS") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_acos)(self,arg1)]) |
+ (str_p("ATAN") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atan)(self,arg1)]) |
// FIRE-14618: Provide radian-based functions
- (str_p("SINR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sinr)(self,arg1)]) |
- (str_p("COSR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cosr)(self,arg1)]) |
- (str_p("TANR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tanr)(self,arg1)]) |
- (str_p("ASINR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asinr)(self,arg1)]) |
- (str_p("ACOSR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acosr)(self,arg1)]) |
- (str_p("ATANR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atanr)(self,arg1)]) |
+ (str_p("SINR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sinr)(self,arg1)]) |
+ (str_p("COSR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_cosr)(self,arg1)]) |
+ (str_p("TANR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_tanr)(self,arg1)]) |
+ (str_p("ASINR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_asinr)(self,arg1)]) |
+ (str_p("ACOSR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_acosr)(self,arg1)]) |
+ (str_p("ATANR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atanr)(self,arg1)]) |
//
- (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sqrt)(self,arg1)]) |
- (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_log)(self,arg1)]) |
- (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_exp)(self,arg1)]) |
- (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)]) |
- (str_p("FLR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_floor)(self,arg1)]) |
- (str_p("CEIL") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_ceil)(self,arg1)])
+ (str_p("SQRT") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sqrt)(self,arg1)]) |
+ (str_p("LOG") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_log)(self,arg1)]) |
+ (str_p("EXP") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_exp)(self,arg1)]) |
+ (str_p("ABS") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_fabs)(self,arg1)]) |
+ (str_p("FLR") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_floor)(self,arg1)]) |
+ (str_p("CEIL") >> '(' >> expression[unary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_ceil)(self,arg1)])
) >> assert_syntax(ch_p(')'))
;
binary_func =
((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
- expression[binary_func.value = bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) |
+ expression[binary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) |
(str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
- expression[binary_func.value = bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) |
+ expression[binary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) |
(str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
- expression[binary_func.value = bind(&LLCalcParser::_max)(self, binary_func.value, arg1)])
+ expression[binary_func.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_max)(self, binary_func.value, arg1)])
) >> assert_syntax(ch_p(')'))
;
@@ -128,10 +128,10 @@ struct LLCalcParser : grammar
// Lookup throws an Unknown Symbol error if it is unknown, while this works fine,
// would be "neater" to handle symbol lookup from here with an assertive parser.
// constants_p[factor.value = arg1]|
- identifier[factor.value = bind(&LLCalcParser::lookup)(self, arg1, arg2)]
+ identifier[factor.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::lookup)(self, arg1, arg2)]
) >>
// Detect and throw math errors.
- assert_domain(eps_p(bind(&LLCalcParser::checkNaN)(self, factor.value)))
+ assert_domain(eps_p(/* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::checkNaN)(self, factor.value)))
;
unary_expr =
@@ -141,14 +141,14 @@ struct LLCalcParser : grammar
power =
unary_expr[power.value = arg1] >>
- *('^' >> assert_syntax(unary_expr[power.value = bind(&powf)(power.value, arg1)]))
+ *('^' >> assert_syntax(unary_expr[power.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&powf)(power.value, arg1)]))
;
term =
power[term.value = arg1] >>
*(('*' >> assert_syntax(power[term.value *= arg1])) |
('/' >> assert_syntax(power[term.value /= arg1])) |
- ('%' >> assert_syntax(power[term.value = bind(&fmodf)(term.value, arg1)]))
+ ('%' >> assert_syntax(power[term.value = /* Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&fmodf)(term.value, arg1)]))
)
;
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index b58b6a5570..5f8260c512 100755
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -51,9 +51,14 @@ U32 wpo2(U32 i);
U32 LLImageGL::sUniqueCount = 0;
U32 LLImageGL::sBindCount = 0;
-S32Bytes LLImageGL::sGlobalTextureMemory(0);
-S32Bytes LLImageGL::sBoundTextureMemory(0);
-S32Bytes LLImageGL::sCurBoundTextureMemory(0);
+// Texture memory management
+//S32Bytes LLImageGL::sGlobalTextureMemory(0);
+//S32Bytes LLImageGL::sBoundTextureMemory(0);
+//S32Bytes LLImageGL::sCurBoundTextureMemory(0);
+S64Bytes LLImageGL::sGlobalTextureMemory(0);
+S64Bytes LLImageGL::sBoundTextureMemory(0);
+S64Bytes LLImageGL::sCurBoundTextureMemory(0);
+//
S32 LLImageGL::sCount = 0;
BOOL LLImageGL::sGlobalUseAnisotropic = FALSE;
@@ -251,7 +256,10 @@ void LLImageGL::updateStats(F32 current_time)
}
//static
-S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category)
+// Texture memory management
+//S32 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category)
+S64 LLImageGL::updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category)
+//
{
LLImageGL::sCurBoundTextureMemory += mem ;
return LLImageGL::sCurBoundTextureMemory.value();
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 21982eab1d..50d879a903 100755
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -69,7 +69,10 @@ public:
static void dirtyTexOptions();
// Sometimes called externally for textures not using LLImageGL (should go away...)
- static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ;
+ // Texture memory management
+ //static S32 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ;
+ static S64 updateBoundTexMem(const S32Bytes mem, const S32 ncomponents, S32 category) ;
+ //
static bool checkSize(S32 width, S32 height);
@@ -242,9 +245,14 @@ public:
static F32 sLastFrameTime;
// Global memory statistics
- static S32Bytes sGlobalTextureMemory; // Tracks main memory texmem
- static S32Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame
- static S32Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame
+ // Texture memory management
+ //static S32Bytes sGlobalTextureMemory; // Tracks main memory texmem
+ //static S32Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame
+ //static S32Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame
+ static S64Bytes sGlobalTextureMemory; // Tracks main memory texmem
+ static S64Bytes sBoundTextureMemory; // Tracks bound texmem for last completed frame
+ static S64Bytes sCurBoundTextureMemory; // Tracks bound texmem for current frame
+ //
static U32 sBindCount; // Tracks number of texture binds for current frame
static U32 sUniqueCount; // Tracks number of unique texture binds for current frame
static BOOL sGlobalUseAnisotropic;
diff --git a/indra/newview/fslslbridge.h b/indra/newview/fslslbridge.h
index 4143064433..21c4b8c13c 100644
--- a/indra/newview/fslslbridge.h
+++ b/indra/newview/fslslbridge.h
@@ -54,7 +54,7 @@ public:
FSLSLBridge();
~FSLSLBridge();
- typedef void (*tCallback)( LLSD const& );
+ typedef boost::function tCallback;
bool lslToViewer(const std::string& message, const LLUUID& fromID, const LLUUID& ownerID);
bool viewerToLSL(const std::string& message, tCallback = NULL );
diff --git a/indra/newview/installers/windows_x64/CheckProcess.dll b/indra/newview/installers/windows_x64/CheckProcess.dll
old mode 100644
new mode 100755
index 055bdf9e52..0dc1e181dc
Binary files a/indra/newview/installers/windows_x64/CheckProcess.dll and b/indra/newview/installers/windows_x64/CheckProcess.dll differ
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index f05173b9ac..7d0409d0f0 100755
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -32,9 +32,6 @@
#include "llcallbacklist.h"
#include "llinventorymodel.h"
#include "llsdutil.h"
-// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
-#include "llviewercontrol.h"
-// [/SL:KB]
#include "llviewerregion.h"
#include "llinventoryobserver.h"
#include "llviewercontrol.h"
@@ -49,11 +46,25 @@ const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3");
//-------------------------------------------------------------------------
/*static*/
-bool AISAPI::isAvailable()
+//bool AISAPI::isAvailable()
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+bool AISAPI::isAvailable(EAISCommand cmd)
+// [/SL:KB]
{
- if (gAgent.getRegion())
+ // Add AIS3 debug setting
+ //if (gAgent.getRegion())
+ if (gAgent.getRegion() && gSavedSettings.getBOOL("FSUseAis3Api"))
+ //
{
- return gAgent.getRegion()->isCapabilityAvailable(INVENTORY_CAP_NAME);
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ static LLCachedControl COMMAND_FILTER_MASK(gSavedSettings, "AISCommandFilterMask", U32_MAX);
+
+ bool aisAvailable = gAgent.getRegion()->isCapabilityAvailable(INVENTORY_CAP_NAME);
+ return
+ (aisAvailable) &&
+ ( (CMD_UNKNOWN == cmd) || ((U32)cmd & COMMAND_FILTER_MASK) );
+// [/SL:KB]
+ //return gAgent.getRegion()->isCapabilityAvailable(INVENTORY_CAP_NAME);
}
return false;
}
@@ -411,7 +422,18 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht
{
id = result["category_id"];
}
-
+ // - Patch: Appearance-SyncAttach
+ else if (type == COPYINVENTORY)
+ {
+ uuid_list_t ids;
+ AISUpdate::parseUUIDArray(result, "_created_items", ids);
+ AISUpdate::parseUUIDArray(result, "_created_categories", ids);
+ if (!ids.empty())
+ {
+ id = *ids.begin();
+ }
+ }
+ //
callback(id);
}
diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h
index 9330dedda5..df128efe60 100755
--- a/indra/newview/llaisapi.h
+++ b/indra/newview/llaisapi.h
@@ -41,7 +41,23 @@ class AISAPI
public:
typedef boost::function completion_t;
- static bool isAvailable();
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ // The debug setting is an OR of these values
+ enum EAISCommand
+ {
+ CMD_UNKNOWN = 0x0000, // New or command we're not filtering for
+ CMD_CAT_UPDATE = 0x0001, // update_inventory_category
+ CMD_CAT_REMOVE = 0x0002, // remove_inventory_category
+ CMD_CAT_SLAM = 0x0004, // slam_inventory_folder
+ CMD_CAT_PURGE = 0x0008, // purge_descendents_of
+ CMD_ITEM_REMOVE = 0x0010, // remove_inventory_item
+ CMD_ITEM_UPDATE = 0x0020, // update_inventory_item
+ CMD_OBJ_LINK = 0x0100, // link_inventory_array
+ CMD_OBJ_LINKBATCH = 0x0200, // link_inventory_array
+ };
+ static bool isAvailable(EAISCommand cmd = CMD_UNKNOWN);
+// [/SL:KB]
+ //static bool isAvailable();
static void getCapNames(LLSD& capNames);
static void CreateInventory(const LLUUID& parentId, const LLSD& newInventory, completion_t callback = completion_t());
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 40cdb96a89..72bca95c6b 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1682,34 +1682,6 @@ void LLModelPreview::rebuildUploadData()
}
}
- for (U32 lod = 0; lod < LLModel::NUM_LODS-1; lod++)
- {
- // Search for models that are not included into upload data
- // If we found any, that means something we loaded is not a sub-model.
- for (U32 model_ind = 0; model_ind < mModel[lod].size(); ++model_ind)
- {
- bool found_model = false;
- for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
- {
- LLModelInstance& instance = *iter;
- if (instance.mLOD[lod] == mModel[lod][model_ind])
- {
- found_model = true;
- break;
- }
- }
- if (!found_model && mModel[lod][model_ind] && !mModel[lod][model_ind]->mSubmodelID)
- {
- if (importerDebug)
- {
- LL_INFOS() << "Model " << mModel[lod][model_ind]->mLabel << " was not used - mismatching lod models." << LL_ENDL;
- }
- setLoadState( LLModelLoader::ERROR_MATERIALS );
- mFMP->childDisable( "calculate_btn" );
- }
- }
- }
-
// OpenSim limits
//F32 max_import_scale = (DEFAULT_MAX_PRIM_SCALE-0.1f)/max_scale;
F32 region_max_prim_scale = LLWorld::getInstance()->getRegionMaxPrimScale();
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index df16124233..89980f125a 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -1551,7 +1551,10 @@ void LLFloaterSnapshot::saveTexture()
}
// static
-BOOL LLFloaterSnapshot::saveLocal()
+// Threaded filepickers
+//BOOL LLFloaterSnapshot::saveLocal()
+void LLFloaterSnapshot::saveLocal(boost::function callback)
+//
{
LL_DEBUGS() << "saveLocal" << LL_ENDL;
// FIXME: duplicated code
@@ -1559,16 +1562,33 @@ BOOL LLFloaterSnapshot::saveLocal()
if (!instance)
{
llassert(instance != NULL);
- return FALSE;
+ // Threaded filepickers
+ //return FALSE;
+ if (callback)
+ {
+ callback(false);
+ }
+ return;
+ //
}
LLSnapshotLivePreview* previewp = Impl::getPreviewView(instance);
if (!previewp)
{
llassert(previewp != NULL);
- return FALSE;
+ // Threaded filepickers
+ //return FALSE;
+ if (callback)
+ {
+ callback(false);
+ }
+ return;
+ //
}
- return previewp->saveLocal();
+ // Threaded filepickers
+ //return previewp->saveLocal();
+ previewp->saveLocal(callback);
+ //
}
// static
diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h
index c422178525..e9f3bb5509 100755
--- a/indra/newview/llfloatersnapshot.h
+++ b/indra/newview/llfloatersnapshot.h
@@ -58,7 +58,10 @@ public:
static LLFloaterSnapshot* getInstance();
static LLFloaterSnapshot* findInstance();
static void saveTexture();
- static BOOL saveLocal();
+ // Threaded filepickers
+ //static BOOL saveLocal();
+ static void saveLocal(boost::function callback);
+ //
static void postSave();
static void postPanelSwitch();
static LLPointer getImageData();
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index e861407936..8e82956ef2 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -879,7 +879,11 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
}
// Don't allow items to be pasted directly into the COF or the inbox
- if (!isCOFFolder() && !isInboxFolder()
+ // Enable paste for inbox; doesn't actually makes much sense,
+ // but since we are not prevented from pasting via shortcut,
+ // we enable it in the context menu, too.
+ //if (!isCOFFolder() && !isInboxFolder()
+ if (!isCOFFolder()
// Client LSL Bridge (also for #AO)
&& !isProtectedFolder())
//
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 59689d1351..395326559d 100755
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -61,6 +61,9 @@ private:
/*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const;
/*virtual*/ void updateControls(const LLSD& info);
+ // Threaded filepickers
+ void saveLocalCallback(bool success);
+
S32 mLocalFormat;
void onFormatComboCommit(LLUICtrl* ctrl);
@@ -135,10 +138,7 @@ LLFloaterSnapshot::ESnapshotFormat LLPanelSnapshotLocal::getImageFormat() const
void LLPanelSnapshotLocal::updateControls(const LLSD& info)
{
LLFloaterSnapshot::ESnapshotFormat fmt =
- // FIRE-7090: Snapshot format for disk changes when selecting snapshot to inventory or email
(LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
- //(LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("FSSnapshotLocalFormat");
- //
getChild("local_format_combo")->selectNthItem((S32) fmt);
const bool show_quality_ctrls = (fmt == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG);
@@ -183,22 +183,19 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();
floater->notify(LLSD().with("set-working", true));
- BOOL saved = LLFloaterSnapshot::saveLocal();
- if (saved)
- {
- LLFloaterSnapshot::postSave();
- // Don't return to target selection after taking a snapshot
- //goBack();
- floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
- }
- else
- {
- // Notify user if we could not save file
- LLNotificationsUtil::add("CannotSaveSnapshot");
- floater->notify(LLSD().with("set-ready", true));
- // Don't return to target selection after taking a snapshot
- //cancel();
- }
+ // Threaded filepickers
+ //BOOL saved = LLFloaterSnapshot::saveLocal();
+ //if (saved)
+ //{
+ // LLFloaterSnapshot::postSave();
+ // floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
+ //}
+ //else
+ //{
+ // cancel();
+ //}
+ LLFloaterSnapshot::saveLocal(boost::bind(&LLPanelSnapshotLocal::saveLocalCallback, this, _1));
+ //
}
// Store settings at logout
@@ -209,3 +206,21 @@ LLPanelSnapshotLocal::~LLPanelSnapshotLocal()
gSavedSettings.setS32("LastSnapshotToDiskHeight", getTypedPreviewHeight());
}
//
+
+// Threaded filepickers
+void LLPanelSnapshotLocal::saveLocalCallback(bool success)
+{
+ LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();
+
+ if (success)
+ {
+ LLFloaterSnapshot::postSave();
+ floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
+ }
+ else
+ {
+ LLNotificationsUtil::add("CannotSaveSnapshot");
+ floater->notify(LLSD().with("set-ready", true));
+ }
+}
+//
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 99cb11bfcc..bf595de4b0 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -1092,18 +1092,41 @@ void LLSnapshotLivePreview::saveTexture()
mDataSize = 0;
}
-BOOL LLSnapshotLivePreview::saveLocal()
-{
- // Update mFormattedImage if necessary
- getFormattedImage();
-
- // Save the formatted image
- BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
+// Threaded filepickers
+//BOOL LLSnapshotLivePreview::saveLocal()
+//{
+// // Update mFormattedImage if necessary
+// getFormattedImage();
+//
+// // Save the formatted image
+// BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage);
+//
+// if(success)
+// {
+// gViewerWindow->playSnapshotAnimAndSound();
+// }
+// return success;
+//}
+void LLSnapshotLivePreview::saveLocal(boost::function callback)
+{
+ // Update mFormattedImage if necessary
+ getFormattedImage();
+
+ // Save the formatted image
+ gViewerWindow->saveImageNumbered(mFormattedImage, false, boost::bind(&LLSnapshotLivePreview::saveLocalCallback, this, _1, callback));
+}
+
+void LLSnapshotLivePreview::saveLocalCallback(bool success, boost::function callback)
+{
if(success)
{
gViewerWindow->playSnapshotAnimAndSound();
}
- return success;
-}
+ if (callback)
+ {
+ callback(success);
+ }
+}
+//
diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h
index f16d22f415..2b8b3955f9 100644
--- a/indra/newview/llsnapshotlivepreview.h
+++ b/indra/newview/llsnapshotlivepreview.h
@@ -112,7 +112,11 @@ public:
std::string getFilter() const { return mFilterName; }
void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f);
void saveTexture();
- BOOL saveLocal();
+ // Threaded filepickers
+ //BOOL saveLocal();
+ void saveLocal(boost::function callback);
+ void saveLocalCallback(bool success, boost::function callback);
+ //
LLPointer getFormattedImage();
LLPointer getEncodedImage();
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index f0dafec240..65b4153ba3 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -422,6 +422,16 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile()
assetType = LLAssetType::AT_ANIMATION;
filename = getFileName();
}
+ else if (exten == "ogg")
+ {
+ assetType = LLAssetType::AT_SOUND;
+ filename = getFileName();
+ }
+ else if (exten == "j2k")
+ {
+ assetType = LLAssetType::AT_TEXTURE;
+ filename = getFileName();
+ }
else
{
// Unknown extension
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 4839a369dd..82b4376960 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1307,7 +1307,10 @@ void link_inventory_array(const LLUUID& category,
#endif
}
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable( (baseobj_array.size() > 1) ? AISAPI::CMD_OBJ_LINKBATCH : AISAPI::CMD_OBJ_LINK ))
+// [/SL:KB]
{
LLSD new_inventory = LLSD::emptyMap();
new_inventory["links"] = links;
@@ -1371,7 +1374,10 @@ void update_inventory_item(
LLPointer cb)
{
const LLUUID& item_id = update_item->getUUID();
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_ITEM_UPDATE))
+// [/SL:KB]
{
LLSD updates = update_item->asLLSD();
// Replace asset_id and/or shadow_id with transaction_id (hash_id)
@@ -1440,7 +1446,10 @@ void update_inventory_item(
}
// [/SL:KB]
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_ITEM_UPDATE))
+// [/SL:KB]
{
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
AISAPI::UpdateItem(item_id, updates, cr);
@@ -1499,7 +1508,10 @@ void update_inventory_category(
LLPointer new_cat = new LLViewerInventoryCategory(obj);
new_cat->fromLLSD(updates);
// FIXME - restore this once the back-end work has been done.
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_CAT_UPDATE))
+// [/SL:KB]
{
LLSD new_llsd = new_cat->asLLSD();
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
@@ -1565,7 +1577,10 @@ void remove_inventory_item(
{
const LLUUID item_id(obj->getUUID());
LL_DEBUGS(LOG_INV) << "item_id: [" << item_id << "] name " << obj->getName() << LL_ENDL;
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_ITEM_REMOVE))
+// [/SL:KB]
{
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
AISAPI::RemoveItem(item_id, cr);
@@ -1641,7 +1656,10 @@ void remove_inventory_category(
LLNotificationsUtil::add("CannotRemoveProtectedCategories");
return;
}
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_CAT_REMOVE))
+// [/SL:KB]
{
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
AISAPI::RemoveCategory(cat_id, cr);
@@ -1744,7 +1762,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb)
}
else
{
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_CAT_PURGE))
+// [/SL:KB]
{
AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t();
AISAPI::PurgeDescendents(id, cr);
@@ -1954,7 +1975,10 @@ void slam_inventory_folder(const LLUUID& folder_id,
const LLSD& contents,
LLPointer cb)
{
- if (AISAPI::isAvailable())
+// if (AISAPI::isAvailable())
+// [SL:KB] - Patch: Appearance-AISFilter | Checked: 2015-03-01 (Catznip-3.7)
+ if (AISAPI::isAvailable(AISAPI::CMD_CAT_SLAM))
+// [/SL:KB]
{
LL_DEBUGS(LOG_INV) << "using AISv3 to slam folder, id " << folder_id
<< " new contents: " << ll_pretty_print_sd(contents) << LL_ENDL;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 5a780368c0..30506e29ab 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -706,6 +706,18 @@ class LLFileCloseAllWindows : public view_listener_t
}
};
+// Threaded filepickers
+LLPointer sFormattedSnapshotImage = NULL;
+void take_snapshot_to_disk_callback(bool success)
+{
+ sFormattedSnapshotImage = NULL;
+ if (success)
+ {
+ gViewerWindow->playSnapshotAnimAndSound();
+ }
+}
+//
+
class LLFileTakeSnapshotToDisk : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -729,27 +741,49 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
gSavedSettings.getBOOL("RenderUIInSnapshot"),
FALSE))
{
- gViewerWindow->playSnapshotAnimAndSound();
- LLPointer formatted;
+ // Threaded filepickers
+ //gViewerWindow->playSnapshotAnimAndSound();
+ //LLPointer formatted;
+ //LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
+ //switch (fmt)
+ //{
+ //case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
+ // formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
+ // break;
+ //default:
+ // LL_WARNS() << "Unknown local snapshot format: " << fmt << LL_ENDL;
+ //case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
+ // formatted = new LLImagePNG;
+ // break;
+ //case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
+ // formatted = new LLImageBMP;
+ // break;
+ //}
+ //formatted->enableOverSize() ;
+ //formatted->encode(raw, 0);
+ //formatted->disableOverSize() ;
+ //gViewerWindow->saveImageNumbered(formatted);
+
LLFloaterSnapshot::ESnapshotFormat fmt = (LLFloaterSnapshot::ESnapshotFormat) gSavedSettings.getS32("SnapshotFormat");
switch (fmt)
{
case LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG:
- formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
+ sFormattedSnapshotImage = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
default:
LL_WARNS() << "Unknown local snapshot format: " << fmt << LL_ENDL;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
- formatted = new LLImagePNG;
+ sFormattedSnapshotImage = new LLImagePNG;
break;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_BMP:
- formatted = new LLImageBMP;
+ sFormattedSnapshotImage = new LLImageBMP;
break;
}
- formatted->enableOverSize() ;
- formatted->encode(raw, 0);
- formatted->disableOverSize() ;
- gViewerWindow->saveImageNumbered(formatted);
+ sFormattedSnapshotImage->enableOverSize() ;
+ sFormattedSnapshotImage->encode(raw, 0);
+ sFormattedSnapshotImage->disableOverSize() ;
+ gViewerWindow->saveImageNumbered(sFormattedSnapshotImage, false, boost::bind(&take_snapshot_to_disk_callback, _1));
+ //
}
return true;
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index d2fae10cbe..640ad962c0 100755
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -95,11 +95,18 @@ S32 LLViewerTexture::sAuxCount = 0;
LLFrameTimer LLViewerTexture::sEvaluationTimer;
F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
-S32Bytes LLViewerTexture::sBoundTextureMemory;
-S32Bytes LLViewerTexture::sTotalTextureMemory;
+// Texture memory management
+//S32Bytes LLViewerTexture::sBoundTextureMemory;
+//S32Bytes LLViewerTexture::sTotalTextureMemory;
+S64Bytes LLViewerTexture::sBoundTextureMemory;
+S64Bytes LLViewerTexture::sTotalTextureMemory;
+//
S32Megabytes LLViewerTexture::sMaxBoundTextureMemory;
S32Megabytes LLViewerTexture::sMaxTotalTextureMem;
-S32Bytes LLViewerTexture::sMaxDesiredTextureMem;
+// Texture memory management
+//S32Bytes LLViewerTexture::sMaxDesiredTextureMem;
+S64Bytes LLViewerTexture::sMaxDesiredTextureMem;
+//
S8 LLViewerTexture::sCameraMovingDiscardBias = 0;
F32 LLViewerTexture::sCameraMovingBias = 0.0f;
S32 LLViewerTexture::sMaxSculptRez = 128; //max sculpt image size
@@ -577,7 +584,10 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity
sTotalTextureMemory >= sMaxTotalTextureMem)
{
//when texture memory overflows, lower down the threshold to release the textures more aggressively.
- sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam));
+ // Texture memory management
+ //sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, F32Bytes(gMaxVideoRam));
+ sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75, F64Bytes(gMaxVideoRam));
+ //
// If we are using more texture memory than we should,
// scale up the desired discard level
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 5c913ea5b7..d02d25d7dc 100755
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -217,11 +217,18 @@ public:
static LLFrameTimer sEvaluationTimer;
static F32 sDesiredDiscardBias;
static F32 sDesiredDiscardScale;
- static S32Bytes sBoundTextureMemory;
- static S32Bytes sTotalTextureMemory;
+ // Texture memory management
+ //static S32Bytes sBoundTextureMemory;
+ //static S32Bytes sTotalTextureMemory;
+ static S64Bytes sBoundTextureMemory;
+ static S64Bytes sTotalTextureMemory;
+ //
static S32Megabytes sMaxBoundTextureMemory;
static S32Megabytes sMaxTotalTextureMem;
- static S32Bytes sMaxDesiredTextureMem ;
+ // Texture memory management
+ //static S32Bytes sMaxDesiredTextureMem ;
+ static S64Bytes sMaxDesiredTextureMem ;
+ //
static S8 sCameraMovingDiscardBias;
static F32 sCameraMovingBias;
static S32 sMaxSculptRez ;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 6d48ec1712..dd55e5ae1e 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -217,6 +217,7 @@
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
#include "llimview.h"
+#include "llviewermenufile.h"
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
#include "rlvhandler.h"
@@ -4703,13 +4704,79 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d
return FALSE;
}
+// Threaded filepickers
+void do_save_image(LLImageFormatted* image, const std::string& snapshot_dir, const std::string& base_name, const std::string& extension, boost::function callback)
+{
+ // Look for an unused file name
+ std::string filepath;
+ S32 i = 1;
+ S32 err = 0;
+
+ do
+ {
+ filepath = snapshot_dir;
+ filepath += gDirUtilp->getDirDelimiter();
+ filepath += base_name;
+ filepath += llformat("_%.3d",i);
+ filepath += extension;
+
+ llstat stat_info;
+ err = LLFile::stat( filepath, &stat_info );
+ i++;
+ }
+ while( -1 != err ); // search until the file is not found (i.e., stat() gives an error).
+
+ LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL;
+
+ if (gSavedSettings.getBOOL("FSLogSnapshotsToLocal"))
+ {
+ LLStringUtil::format_map_t args;
+ args["FILENAME"] = filepath;
+ report_to_nearby_chat(LLTrans::getString("SnapshotSavedToDisk", args));
+ }
+
+ bool success = image->save(filepath);
+ if (callback)
+ {
+ callback(success);
+ }
+}
+
+void LLViewerWindow::saveImageCallback(const std::string& filename, LLImageFormatted* image, const std::string& extension, boost::function callback)
+{
+ if (!filename.empty())
+ {
+ LLViewerWindow::sSnapshotBaseName = gDirUtilp->getBaseFileName(filename, true);
+ LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filename);
+
+ do_save_image(image, LLViewerWindow::sSnapshotDir, LLViewerWindow::sSnapshotBaseName, extension, callback);
+ return;
+ }
+
+ if (callback)
+ {
+ callback(false);
+ }
+}
+//
+
// Saves an image to the harddrive as "SnapshotX" where X >= 1.
-BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker)
+// Threaded filepickers
+//BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker)
+void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker, boost::function callback)
+//
{
if (!image)
{
LL_WARNS() << "No image to save" << LL_ENDL;
- return FALSE;
+ // Threaded filepickers
+ //return FALSE;
+ if (callback)
+ {
+ callback(false);
+ return;
+ }
+ //
}
LLFilePicker::ESaveFilter pick_type;
@@ -4727,57 +4794,62 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke
else
pick_type = LLFilePicker::FFSAVE_ALL; // ???
+ // Threaded filepickers
+ //// Get a base file location if needed.
+ //if (force_picker || !isSnapshotLocSet())
+ //{
+ // std::string proposed_name( sSnapshotBaseName );
+
+ // // getSaveFile will append an appropriate extension to the proposed name, based on the ESaveFilter constant passed in.
+
+ // // pick a directory in which to save
+ // LLFilePicker& picker = LLFilePicker::instance();
+ // if (!picker.getSaveFile(pick_type, proposed_name))
+ // {
+ // // Clicked cancel
+ // return FALSE;
+ // }
+
+ // // Copy the directory + file name
+ // std::string filepath = picker.getFirstFile();
+
+ // LLViewerWindow::sSnapshotBaseName = gDirUtilp->getBaseFileName(filepath, true);
+ // LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
+ //}
+
+ //// Look for an unused file name
+ //std::string filepath;
+ //S32 i = 1;
+ //S32 err = 0;
+
+ //do
+ //{
+ // filepath = sSnapshotDir;
+ // filepath += gDirUtilp->getDirDelimiter();
+ // filepath += sSnapshotBaseName;
+ // filepath += llformat("_%.3d",i);
+ // filepath += extension;
+
+ // llstat stat_info;
+ // err = LLFile::stat( filepath, &stat_info );
+ // i++;
+ //}
+ //while( -1 != err ); // search until the file is not found (i.e., stat() gives an error).
+
+ //LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL;
+ //return image->save(filepath);
+
// Get a base file location if needed.
if (force_picker || !isSnapshotLocSet())
{
std::string proposed_name( sSnapshotBaseName );
- // getSaveFile will append an appropriate extension to the proposed name, based on the ESaveFilter constant passed in.
-
- // pick a directory in which to save
- LLFilePicker& picker = LLFilePicker::instance();
- if (!picker.getSaveFile(pick_type, proposed_name))
- {
- // Clicked cancel
- return FALSE;
- }
-
- // Copy the directory + file name
- std::string filepath = picker.getFirstFile();
-
- LLViewerWindow::sSnapshotBaseName = gDirUtilp->getBaseFileName(filepath, true);
- LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath);
+ (new LLGenericSaveFilePicker(pick_type, proposed_name, boost::bind(&LLViewerWindow::saveImageCallback, this, _1, image, extension, callback)))->getFile();
+ return;
}
- // Look for an unused file name
- std::string filepath;
- S32 i = 1;
- S32 err = 0;
-
- do
- {
- filepath = sSnapshotDir;
- filepath += gDirUtilp->getDirDelimiter();
- filepath += sSnapshotBaseName;
- filepath += llformat("_%.3d",i);
- filepath += extension;
-
- llstat stat_info;
- err = LLFile::stat( filepath, &stat_info );
- i++;
- }
- while( -1 != err ); // search until the file is not found (i.e., stat() gives an error).
-
- LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL;
- // Log snapshot filename to local chat history
- if (gSavedSettings.getBOOL("FSLogSnapshotsToLocal"))
- {
- LLStringUtil::format_map_t args;
- args["FILENAME"] = filepath;
- report_to_nearby_chat(LLTrans::getString("SnapshotSavedToDisk", args));
- }
- //
- return image->save(filepath);
+ do_save_image(image, LLViewerWindow::sSnapshotDir, LLViewerWindow::sSnapshotBaseName, extension, callback);
+ //
}
void LLViewerWindow::resetSnapshotLoc()
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 899969091a..c2671d198e 100755
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -355,7 +355,11 @@ public:
BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, ESnapshotType type) ;
BOOL isSnapshotLocSet() const { return ! sSnapshotDir.empty(); }
void resetSnapshotLoc() const { sSnapshotDir.clear(); }
- BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false);
+ // Threaded filepickers
+ //BOOL saveImageNumbered(LLImageFormatted *image, bool force_picker = false);
+ void saveImageNumbered(LLImageFormatted *image, bool force_picker = false, boost::function callback = NULL);
+ void saveImageCallback(const std::string& filename, LLImageFormatted* image, const std::string& extension, boost::function callback);
+ //
// Reset the directory where snapshots are saved.
// Client will open directory picker on next snapshot save.