diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lllandmarklist.cpp | 50 | ||||
-rw-r--r-- | indra/newview/lllandmarklist.h | 1 | ||||
-rw-r--r-- | indra/newview/llpathfindingnavmesh.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lltexturecache.h | 2 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewerassetstorage.cpp | 55 | ||||
-rw-r--r-- | indra/newview/llviewerassetstorage.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_about_land.xml | 104 |
13 files changed, 95 insertions, 164 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index c4c88d304c..e6b6b10408 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -78,7 +78,9 @@ static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -#define LL_BUMPLIST_MULTITHREADED 0 // TODO -- figure out why this doesn't work +// Enabled after changing LLViewerTexture::mNeedsCreateTexture to an +// LLAtomicBool; this should work just fine, now. HB +#define LL_BUMPLIST_MULTITHREADED 1 // static diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index 31e76267e6..d790c6f95e 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -39,12 +39,6 @@ // Globals LLLandmarkList gLandmarkList; -// number is mostly arbitrary, but it should be below DEFAULT_QUEUE_SIZE pool size, -// which is 4096, to not overfill the pool if user has more than 4K of landmarks -// and it should leave some space for other potential simultaneous asset request -const S32 MAX_SIMULTANEOUS_REQUESTS = 512; - - //////////////////////////////////////////////////////////////////////////// // LLLandmarkList @@ -83,12 +77,6 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t loaded_callback_map_t::value_type vt(asset_uuid, cb); mLoadedCallbackMap.insert(vt); } - - if ( mWaitList.find(asset_uuid) != mWaitList.end() ) - { - // Landmark is sheduled for download, but not requested yet - return NULL; - } landmark_requested_list_t::iterator iter = mRequestedList.find(asset_uuid); if (iter != mRequestedList.end()) @@ -100,17 +88,6 @@ LLLandmark* LLLandmarkList::getAsset(const LLUUID& asset_uuid, loaded_callback_t } } - if (mRequestedList.size() > MAX_SIMULTANEOUS_REQUESTS) - { - // Workarounds for corutines pending list size limit: - // Postpone download till queue is emptier. - // Coroutines have own built in 'pending' list, but unfortunately - // it is too small compared to potential amount of landmarks - // or assets. - mWaitList.insert(asset_uuid); - return NULL; - } - mRequestedList[asset_uuid] = gFrameTimeSeconds; // Note that getAssetData can callback immediately and cleans mRequestedList @@ -197,33 +174,6 @@ void LLLandmarkList::processGetAssetReply( gLandmarkList.mRequestedList.erase(uuid); //mBadList effectively blocks any load, so no point keeping id in requests gLandmarkList.eraseCallbacks(uuid); } - - // getAssetData can fire callback immediately, causing - // a recursion which is suboptimal for very large wait list. - // 'scheduling' indicates that we are inside request and - // shouldn't be launching more requests. - static bool scheduling = false; - if (!scheduling && !gLandmarkList.mWaitList.empty()) - { - scheduling = true; - while (!gLandmarkList.mWaitList.empty() && gLandmarkList.mRequestedList.size() < MAX_SIMULTANEOUS_REQUESTS) - { - // start new download from wait list - landmark_uuid_list_t::iterator iter = gLandmarkList.mWaitList.begin(); - LLUUID asset_uuid = *iter; - gLandmarkList.mWaitList.erase(iter); - - // add to mRequestedList before calling getAssetData() - gLandmarkList.mRequestedList[asset_uuid] = gFrameTimeSeconds; - - // Note that getAssetData can callback immediately and cleans mRequestedList - gAssetStorage->getAssetData(asset_uuid, - LLAssetType::AT_LANDMARK, - LLLandmarkList::processGetAssetReply, - NULL); - } - scheduling = false; - } } BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid) diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index f5fa958204..b50332b215 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -72,7 +72,6 @@ protected: typedef std::set<LLUUID> landmark_uuid_list_t; landmark_uuid_list_t mBadList; - landmark_uuid_list_t mWaitList; typedef std::map<LLUUID,F32> landmark_requested_list_t; landmark_requested_list_t mRequestedList; diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp index 0287c07f96..c297cac771 100644 --- a/indra/newview/llpathfindingnavmesh.cpp +++ b/indra/newview/llpathfindingnavmesh.cpp @@ -143,7 +143,7 @@ void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMes unsigned int binSize = value.size(); std::string newStr(reinterpret_cast<const char *>(&value[0]), binSize); std::istringstream streamdecomp( newStr ); - unsigned int decompBinSize = 0; + size_t decompBinSize = 0; bool valid = false; U8* pUncompressedNavMeshContainer = unzip_llsdNavMesh( valid, decompBinSize, streamdecomp, binSize ) ; if ( !valid ) diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index af89b4b53b..5c6f7254f2 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -859,12 +859,12 @@ LLTextureCache::~LLTextureCache() ////////////////////////////////////////////////////////////////////////////// //virtual -S32 LLTextureCache::update(F32 max_time_ms) +size_t LLTextureCache::update(F32 max_time_ms) { static LLFrameTimer timer ; static const F32 MAX_TIME_INTERVAL = 300.f ; //seconds. - S32 res; + size_t res; res = LLWorkerThread::update(max_time_ms); mListMutex.lock(); diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index e1c752b58e..b6ace467c7 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -113,7 +113,7 @@ public: LLTextureCache(bool threaded); ~LLTextureCache(); - /*virtual*/ S32 update(F32 max_time_ms); + /*virtual*/ size_t update(F32 max_time_ms); void purgeCache(ELLPath location, bool remove_dir = true); void setReadOnly(BOOL read_only) ; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index a7dcb1a9bb..6f6ca2be9b 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2879,9 +2879,9 @@ bool LLTextureFetch::updateRequestPriority(const LLUUID& id, F32 priority) // Threads: T* //virtual -S32 LLTextureFetch::getPending() +size_t LLTextureFetch::getPending() { - S32 res; + size_t res; lockData(); // +Ct { LLMutexLock lock(&mQueueMutex); // +Mfq @@ -2956,7 +2956,7 @@ void LLTextureFetch::commonUpdate() // Threads: Tmain //virtual -S32 LLTextureFetch::update(F32 max_time_ms) +size_t LLTextureFetch::update(F32 max_time_ms) { static LLCachedControl<F32> band_width(gSavedSettings,"ThrottleBandwidthKBPS", 3000.0); @@ -2970,7 +2970,7 @@ S32 LLTextureFetch::update(F32 max_time_ms) mNetworkQueueMutex.unlock(); // -Mfnq } - S32 res = LLWorkerThread::update(max_time_ms); + size_t res = LLWorkerThread::update(max_time_ms); if (!mThreaded) { diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index d087db275b..611a7d6419 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -65,7 +65,7 @@ public: class TFRequest; // Threads: Tmain - /*virtual*/ S32 update(F32 max_time_ms); + /*virtual*/ size_t update(F32 max_time_ms); // called in the main thread after the TextureCacheThread shuts down. // Threads: Tmain @@ -131,7 +131,7 @@ public: U32 getTotalNumHTTPRequests(); // Threads: T* - S32 getPending(); + size_t getPending(); // Threads: T* void lockQueue() { mQueueMutex.lock(); } diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 70065cb5a0..aa9ff012c3 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -134,14 +134,6 @@ LLViewerAssetStorage::~LLViewerAssetStorage() // This class has dedicated coroutine pool, clean it up, otherwise coroutines will crash later. LLCoprocedureManager::instance().close(VIEWER_ASSET_STORAGE_CORO_POOL); } - - while (mCoroWaitList.size() > 0) - { - CoroWaitList &request = mCoroWaitList.front(); - // Clean up pending downloads, delete request and trigger callbacks - removeAndCallbackPendingDownloads(request.mId, request.mType, request.mId, request.mType, LL_ERR_NOERR, LLExtStat::NONE); - mCoroWaitList.pop_front(); - } } // virtual @@ -346,28 +338,6 @@ void LLViewerAssetStorage::storeAssetData( } } -void LLViewerAssetStorage::checkForTimeouts() -{ - LLAssetStorage::checkForTimeouts(); - - // Restore requests - LLCoprocedureManager* manager = LLCoprocedureManager::getInstance(); - while (mCoroWaitList.size() > 0 - && manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1)) - { - CoroWaitList &request = mCoroWaitList.front(); - - bool with_http = true; - bool is_temp = false; - LLViewerAssetStatsFF::record_enqueue(request.mType, with_http, is_temp); - - manager->enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro", - boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, request.mRequest, request.mId, request.mType, request.mCallback, request.mUserData)); - - mCoroWaitList.pop_front(); - } -} - /** * @brief Allocate and queue an asset fetch request for the viewer * @@ -424,21 +394,18 @@ void LLViewerAssetStorage::queueRequestHttp( // This is the same as the current UDP logic - don't re-request a duplicate. if (!duplicate) { - // Coroutine buffer has fixed size (synchronization buffer, so we have no alternatives), so buffer any request above limit LLCoprocedureManager* manager = LLCoprocedureManager::getInstance(); - if (manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1)) - { - bool with_http = true; - bool is_temp = false; - LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); - - manager->enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro", - boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data)); - } - else - { - mCoroWaitList.emplace_back(req, uuid, atype, callback, user_data); - } + bool with_http = true; + bool is_temp = false; + LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp); + manager->enqueueCoprocedure( + VIEWER_ASSET_STORAGE_CORO_POOL, + "LLViewerAssetStorage::assetRequestCoro", + [this, req, uuid, atype, callback, user_data] + (LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t&, const LLUUID&) + { + assetRequestCoro(req, uuid, atype, callback, user_data); + }); } } diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index 0965a17ce1..c3719d0918 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -65,8 +65,6 @@ public: bool user_waiting=FALSE, F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override; - void checkForTimeouts() override; - protected: void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, @@ -118,8 +116,6 @@ protected: LLGetAssetCallback mCallback; void *mUserData; }; - typedef std::list<CoroWaitList> wait_list_t; - wait_list_t mCoroWaitList; std::string mViewerAssetUrl; S32 mCountRequests; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e3ac56d0d3..8a11c5cf8f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1118,7 +1118,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mLoadedCallbackDesiredDiscardLevel = S8_MAX; mPauseLoadedCallBacks = FALSE; - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; @@ -1400,12 +1400,12 @@ void LLViewerFetchedTexture::addToCreateTexture() { //just update some variables, not to create a real GL texture. createGLTexture(mRawDiscardLevel, mRawImage, 0, FALSE); - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); } else @@ -1441,7 +1441,7 @@ void LLViewerFetchedTexture::addToCreateTexture() mRawDiscardLevel += i; if(mRawDiscardLevel >= getDiscardLevel() && getDiscardLevel() > 0) { - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; destroyRawImage(); return; } @@ -1473,7 +1473,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) destroyRawImage(); return FALSE; } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; if (mRawImage.isNull()) { @@ -1609,14 +1609,14 @@ void LLViewerFetchedTexture::postCreateTexture() destroyRawImage(); } - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; } void LLViewerFetchedTexture::scheduleCreateTexture() { if (!mNeedsCreateTexture) { - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; if (preCreateTexture()) { #if LL_IMAGEGL_THREAD_CHECK @@ -1630,7 +1630,7 @@ void LLViewerFetchedTexture::scheduleCreateTexture() memcpy(data_copy, data, size); } #endif - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; auto mainq = LLImageGLThread::sEnabled ? mMainQueue.lock() : nullptr; if (mainq) { diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index b953d7006b..2f5e0d01df 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -27,6 +27,7 @@ #ifndef LL_LLVIEWERTEXTURE_H #define LL_LLVIEWERTEXTURE_H +#include "llatomic.h" #include "llgltexture.h" #include "lltimer.h" #include "llframetimer.h" @@ -528,7 +529,9 @@ protected: LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f. BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!) - BOOL mNeedsCreateTexture; + // This needs to be atomic, since it is written both in the main thread + // and in the GL image worker thread... HB + LLAtomicBool mNeedsCreateTexture; BOOL mForSculpt ; //a flag if the texture is used as sculpt data. BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally. diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index c6776ad039..4985d07eb9 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -2,13 +2,16 @@ <floater positioning="cascading" can_tear_off="false" - height="396" + can_resize="true" layout="topleft" name="floaterland" help_topic="floaterland" save_rect="true" title="ABOUT LAND" - width="634"> + height="396" + width="634" + min_height="420" + min_width="634"> <floater.string name="maturity_icon_general"> "Parcel_PG_Dark" @@ -659,10 +662,11 @@ type="string" length="1" enabled="false" - follows="top|left" + follows="top|left|right" height="175" layout="topleft" left="10" + right="-10" max_length="65535" name="covenant_editor" width="470" @@ -1129,25 +1133,25 @@ top_delta="-6"/> <button enabled="false" - follows="left|top" + follows="top|right" height="23" label="Return Objects" layout="topleft" left_pad="6" name="Return objects..." top_delta="0" - right="-154" + right="-10" width="164" /> <name_list column_padding="0" draw_heading="true" - follows="top|left" + follows="all" height="150" layout="topleft" left="10" name="owner list" name_column="name" - width="470"> + right="-10"> <name_list.columns label="Type" name="type" @@ -1341,9 +1345,9 @@ Only large parcels can be listed in search. <panel bevel_style="none" border="true" - top="121" - bottom="121" - follows="left|bottom|right" + top="116" + bottom="116" + follows="left|top|right" left="20" right="-20"/> <check_box @@ -1377,9 +1381,10 @@ Only large parcels can be listed in search. enabled="true" height="23" layout="topleft" - left="164" + left="18" top="194" name="land category" + follows="left|top" visible="true" width="140"> <combo_box.item @@ -1508,18 +1513,18 @@ Only large parcels can be listed in search. Landing Point: [LANDING] </text> <button - follows="right|top" + follows="left|top" top_pad="0" height="23" label="Set" label_selected="Set" layout="topleft" name="Set" - left="399" + left_delta="0" tool_tip="Sets the landing point where visitors arrive. Sets to your avatar's location inside this parcel." width="50" /> <button - follows="right|top" + follows="left|top" height="23" label="Clear" label_selected="Clear" @@ -1546,7 +1551,8 @@ Only large parcels can be listed in search. layout="topleft" name="landing type" top_pad="0" - left="399" + left_delta="0" + follows="left|top" tool_tip="Teleport Routing -- select how to handle teleports onto your land" width="120"> <combo_box.item @@ -1590,7 +1596,8 @@ Only large parcels can be listed in search. <combo_box height="23" layout="topleft" - left_pad="144" + left_pad="0" + follows="left|top" name="media type" tool_tip="Specify if the URL is a movie, web page, or other media" width="120" @@ -1625,11 +1632,11 @@ Only large parcels can be listed in search. width="300" top_delta="0"/> <button - follows="right|top" + follows="left|top" height="23" label="Set" layout="topleft" - left_pad="149" + left_pad="3" name="set_media_url" width="70" top_delta="0"/> @@ -1985,7 +1992,8 @@ Only large parcels can be listed in search. <combo_box height="23" layout="topleft" - left_pad="166" + follows="left|top" + left_pad="22" name="pass_combo" top_delta="0" width="100"> @@ -2039,14 +2047,21 @@ Only large parcels can be listed in search. top_pad="5" width="400"> (The estate owner may have limited these choices) - </text> - <panel - name="Allowed_layout_panel" - follows="top|left" - left="10" - height="170" - top_pad="8" - width="240"> + </text> + <layout_stack name="access_stack" + height="170" + follows="all" + animate="false" + left="10" + right="-10" + top_pad="8" + orientation="horizontal"> + <layout_panel + auto_resize="true" + user_resize="false" + name="Allowed_layout_panel" + height="170" + width="240"> <text type="string" length="1" @@ -2062,7 +2077,7 @@ Only large parcels can be listed in search. </text> <name_list column_padding="0" - follows="top|bottom" + follows="all" heading_height="14" height="125" layout="topleft" @@ -2070,7 +2085,7 @@ Only large parcels can be listed in search. multi_select="true" name="AccessList" tool_tip="([LISTED] listed, [MAX] max)" - width="230" /> + width="228" /> <button follows="bottom" height="23" @@ -2080,22 +2095,21 @@ Only large parcels can be listed in search. name="add_allowed" width="100" /> <button - follows="bottom" + follows="right|bottom" height="23" label="Remove" label_selected="Remove" layout="topleft" - left_pad="10" + left_pad="28" name="remove_allowed" - right="-10" width="100" /> - </panel> - <panel + </layout_panel> + <layout_panel + auto_resize="true" + user_resize="false" name="Banned_layout_panel" - follows="top|right" height="170" - width="240" - left_pad="146"> + width="240"> <text type="string" length="1" @@ -2103,7 +2117,7 @@ Only large parcels can be listed in search. height="16" label="Ban" layout="topleft" - left="0" + left="1" name="BanCheck" top="0" width="200"> @@ -2111,11 +2125,11 @@ Only large parcels can be listed in search. </text> <name_list column_padding="0" - follows="top|bottom" + follows="all" heading_height="16" height="125" layout="topleft" - left="0" + left="1" multi_select="true" draw_heading="true" name="BannedList" @@ -2135,21 +2149,21 @@ Only large parcels can be listed in search. height="23" label="Add" layout="topleft" - left="0" + left="1" name="add_banned" width="100" /> <button enabled="false" - follows="bottom" + follows="right|bottom" height="23" label="Remove" label_selected="Remove" layout="topleft" - left_pad="10" + left_pad="29" name="remove_banned" - right="-10" width="100" /> - </panel> + </layout_panel> + </layout_stack> </panel> <panel border="true" |