summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.h
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-04-22 01:07:52 +0300
committerSeth ProductEngine <slitovchuk@productengine.com>2011-04-22 01:07:52 +0300
commite26bfe00ef467a65eb126a75fa2aba6ccd5cd07a (patch)
tree39487eeb76f3067c3bc967d70890e2165735d801 /indra/newview/llgesturemgr.h
parent120f31502eb521c1e0abaeb24972f070e7f75bd6 (diff)
STORM-380 FIXED Added syncing animations and sounds before the gesture starts playing.
The actual playing of animations and sounds of a gesture starts only when all needed animations and sound files are loaded into viewer cache. This reduces the delay between animations and sounds meant to be played simultaneously but may increase the delay between the moment a gesture is triggered and the moment it starts playing. Fixed calling assets callback to clean up the void pointer in getAssetData() and avoid potential memory leaks.
Diffstat (limited to 'indra/newview/llgesturemgr.h')
-rw-r--r--indra/newview/llgesturemgr.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index b9935efeb3..5930841cbc 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -154,9 +154,20 @@ protected:
// Used by loadGesture
static void onLoadComplete(LLVFS *vfs,
- const LLUUID& asset_uuid,
- LLAssetType::EType type,
- void* user_data, S32 status, LLExtStat ext_status);
+ const LLUUID& asset_uuid,
+ LLAssetType::EType type,
+ void* user_data, S32 status, LLExtStat ext_status);
+
+ // Used by playGesture to load an asset file
+ // required to play a gesture step
+ static void onAssetLoadComplete(LLVFS *vfs,
+ const LLUUID& asset_uuid,
+ LLAssetType::EType type,
+ void* user_data, S32 status, LLExtStat ext_status);
+
+ // Checks whether all animation and sound assets
+ // needed to play a gesture are loaded.
+ static bool hasLoadingAssets(LLMultiGesture* gesture);
private:
// Active gestures.
@@ -172,6 +183,8 @@ private:
callback_map_t mCallbackMap;
std::vector<LLMultiGesture*> mPlaying;
BOOL mValid;
+
+ std::set<LLUUID> mLoadingAssets;
};
#endif