From 7ddbf118f5d1fde24c10b93432209fbe44d91345 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 24 Mar 2021 01:53:45 +0200 Subject: SL-13182 Split buildNewViews over frames --- indra/newview/llinventorypanel.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventorypanel.h') diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index ad6010f09c..06547ebf0e 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -171,6 +171,7 @@ public: // LLUICtrl methods /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); + void onFolderOpening(const LLUUID &id); // LLBadgeHolder methods bool addBadge(LLBadge * badge); @@ -317,12 +318,9 @@ private: //-------------------------------------------------------------------- public: void addHideFolderType(LLFolderType::EType folder_type); - -public: - bool getViewsInitialized() const { return mViewsInitialized == VIEWS_INITIALIZED; } protected: // Builds the UI. Call this once the inventory is usable. - void initializeViews(); + void initializeViews(F64 max_time); // Specific inventory colors static bool sColorSetInitialized; @@ -330,13 +328,19 @@ protected: static LLUIColor sDefaultHighlightColor; static LLUIColor sLibraryColor; static LLUIColor sLinkColor; - + + // All buildNewViews() expect time limit mBuildViewsEndTime to be set LLFolderViewItem* buildNewViews(const LLUUID& id); LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp); LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp, LLFolderViewItem *target_view); + + LLFolderViewItem* buildNewViewsWithTimeLimit(const LLUUID& id, + LLInventoryObject const* objectp, + LLFolderViewItem *folder_view_item, + F64 max_time); // if certain types are not allowed, no reason to create views virtual bool typedViewsFilter(const LLUUID& id, LLInventoryObject const* objectp) { return true; } @@ -359,11 +363,14 @@ private: { VIEWS_UNINITIALIZED = 0, VIEWS_INITIALIZING, + VIEWS_BUILDING, // Root folder exists VIEWS_INITIALIZED, } EViewsInitializationState; bool mBuildViewsOnInit; EViewsInitializationState mViewsInitialized; // Whether views have been generated + F64 mBuildViewsEndTime; // Stop building views past this timestamp + std::deque mBuildViewsQueue; }; -- cgit v1.2.3 From 7d31436009b5578f75c862f970437bf583a97017 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 2 Apr 2021 21:40:09 +0300 Subject: SL-13182 Expanded buildNewViews with build modes --- indra/newview/llinventorypanel.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'indra/newview/llinventorypanel.h') diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 06547ebf0e..5fc3a55a36 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -329,18 +329,24 @@ protected: static LLUIColor sLibraryColor; static LLUIColor sLinkColor; - // All buildNewViews() expect time limit mBuildViewsEndTime to be set + enum EBuildModes + { + BUILD_NO_LIMIT, + BUILD_TIMELIMIT, // requires mBuildViewsEndTime + BUILD_ONE_FOLDER, + BUILD_NO_CHILDREN, + }; + + // All buildNewViews() use BUILD_TIMELIMIT by default + // and expect time limit mBuildViewsEndTime to be set LLFolderViewItem* buildNewViews(const LLUUID& id); LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp); LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp, - LLFolderViewItem *target_view); + LLFolderViewItem *target_view, + const EBuildModes &mode = BUILD_TIMELIMIT); - LLFolderViewItem* buildNewViewsWithTimeLimit(const LLUUID& id, - LLInventoryObject const* objectp, - LLFolderViewItem *folder_view_item, - F64 max_time); // if certain types are not allowed, no reason to create views virtual bool typedViewsFilter(const LLUUID& id, LLInventoryObject const* objectp) { return true; } @@ -357,7 +363,8 @@ private: const LLUUID& parent_id, LLInventoryObject const* objectp, LLFolderViewItem *target_view, - LLFolderViewFolder *parent_folder_view); + LLFolderViewFolder *parent_folder_view, + const EBuildModes &mode); typedef enum e_views_initialization_state { -- cgit v1.2.3