From ddb63e7fb70eefea200fbb385efe86e50e5c1e12 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 30 Jun 2015 17:11:10 -0700 Subject: Initial checkin for uploading via coroutine. --- indra/newview/llsnapshotlivepreview.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsnapshotlivepreview.cpp') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 0ae8a338e0..bbf560f3fa 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1004,9 +1004,22 @@ void LLSnapshotLivePreview::saveTexture() LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - void *userdata = NULL; +#if 1 + std::string name = "Snapshot: " + pos_string; + std::string desc = "Taken by " + who_took_it + " at " + pos_string; + + NewResourceUploadInfo::ptr_t assetUploadInfo(new NewResourceUploadInfo(name, desc, 0, + LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, + PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), + name, expected_upload_cost)); + + upload_new_resource(tid, LLAssetType::AT_TEXTURE, assetUploadInfo); + +#else + LLAssetStorage::LLStoreAssetCallback callback = NULL; + void *userdata = NULL; + upload_new_resource(tid, // tid LLAssetType::AT_TEXTURE, "Snapshot : " + pos_string, @@ -1019,6 +1032,7 @@ void LLSnapshotLivePreview::saveTexture() LLFloaterPerms::getEveryonePerms("Uploads"), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); +#endif gViewerWindow->playSnapshotAnimAndSound(); } else -- cgit v1.2.3 From f8a7eda55bdd34eeb2fafed21d23d26cd25f924d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 2 Jul 2015 09:17:48 -0700 Subject: Adjusting uploadinfo object for expansion. Commit is prelim to allow merge from selfless. --- indra/newview/llsnapshotlivepreview.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsnapshotlivepreview.cpp') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index bbf560f3fa..bbb5db4a0a 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1009,12 +1009,13 @@ void LLSnapshotLivePreview::saveTexture() std::string name = "Snapshot: " + pos_string; std::string desc = "Taken by " + who_took_it + " at " + pos_string; - NewResourceUploadInfo::ptr_t assetUploadInfo(new NewResourceUploadInfo(name, desc, 0, + NewResourceUploadInfo::ptr_t assetUploadInfo(new NewResourceUploadInfo( + tid, LLAssetType::AT_TEXTURE, name, desc, 0, LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - name, expected_upload_cost)); + expected_upload_cost)); - upload_new_resource(tid, LLAssetType::AT_TEXTURE, assetUploadInfo); + upload_new_resource(assetUploadInfo); #else LLAssetStorage::LLStoreAssetCallback callback = NULL; -- cgit v1.2.3 From 1a6a6c786dcb4164c51734e51a4c86c722835e56 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 15 Jul 2015 14:35:53 -0700 Subject: LSL Script upload from inventory. --- indra/newview/llsnapshotlivepreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llsnapshotlivepreview.cpp') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index bbb5db4a0a..16f70a1c95 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1009,7 +1009,7 @@ void LLSnapshotLivePreview::saveTexture() std::string name = "Snapshot: " + pos_string; std::string desc = "Taken by " + who_took_it + " at " + pos_string; - NewResourceUploadInfo::ptr_t assetUploadInfo(new NewResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( tid, LLAssetType::AT_TEXTURE, name, desc, 0, LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), -- cgit v1.2.3 From 62e83193c55e505d83a9be33cbc30353b6b887d2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 22 Jul 2015 14:56:49 -0700 Subject: MAINT-5357: Added yield between prepare and post in upload. Removed some commented out code I had missed earlier Moved costing to virtual function in uploadinfo. --- indra/newview/llsnapshotlivepreview.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'indra/newview/llsnapshotlivepreview.cpp') diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 16f70a1c95..8fb3340db0 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1005,7 +1005,6 @@ void LLSnapshotLivePreview::saveTexture() std::string who_took_it; LLAgentUI::buildFullname(who_took_it); S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); -#if 1 std::string name = "Snapshot: " + pos_string; std::string desc = "Taken by " + who_took_it + " at " + pos_string; @@ -1017,23 +1016,6 @@ void LLSnapshotLivePreview::saveTexture() upload_new_resource(assetUploadInfo); -#else - LLAssetStorage::LLStoreAssetCallback callback = NULL; - void *userdata = NULL; - - upload_new_resource(tid, // tid - LLAssetType::AT_TEXTURE, - "Snapshot : " + pos_string, - "Taken by " + who_took_it + " at " + pos_string, - 0, - LLFolderType::FT_SNAPSHOT_CATEGORY, - LLInventoryType::IT_SNAPSHOT, - PERM_ALL, // Note: Snapshots to inventory is a special case of content upload - LLFloaterPerms::getGroupPerms("Uploads"), // that is more permissive than other uploads - LLFloaterPerms::getEveryonePerms("Uploads"), - "Snapshot : " + pos_string, - callback, expected_upload_cost, userdata); -#endif gViewerWindow->playSnapshotAnimAndSound(); } else -- cgit v1.2.3