summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorCallum Prentice <callum@gmail.com>2020-09-16 18:53:24 -0700
committerCallum Prentice <callum@gmail.com>2020-09-16 18:53:24 -0700
commit3fc07dea01795b31c37dcd093ec73d190a1e188a (patch)
treeb000b56002957e5d0367aa87f0b03b8827181474 /indra/llcharacter
parent060dd2aeab72df26d6375f2e0fad619113fe7e13 (diff)
First part of change to remove LLVFS from the Viewer. Consists of code changes to remove LLVFS and LLVFSThread classes along with the associated source files. The existing llvfs folder is renamed to llcache. Also includes changes to CMake script in many places to reflect changes. Eventually, llvfile source file and class will be renamed but that is not in this change.
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/CMakeLists.txt18
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp19
-rw-r--r--indra/llcharacter/llkeyframemotion.h12
3 files changed, 10 insertions, 39 deletions
diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt
index a17a5b0aa6..e236a307c2 100644
--- a/indra/llcharacter/CMakeLists.txt
+++ b/indra/llcharacter/CMakeLists.txt
@@ -6,14 +6,14 @@ include(00-Common)
include(LLCommon)
include(LLMath)
include(LLMessage)
-include(LLVFS)
+include(LLCache)
include(LLXML)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
- ${LLVFS_INCLUDE_DIRS}
+ ${LLCACHE_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
)
include_directories(SYSTEM
@@ -85,18 +85,6 @@ target_link_libraries(
${LLCOMMON_LIBRARIES}
${LLMATH_LIBRARIES}
${LLMESSAGE_LIBRARIES}
- ${LLVFS_LIBRARIES}
+ ${LLCACHE_LIBRARIES}
${LLXML_LIBRARIES}
)
-
-
-# Add tests
-#if (LL_TESTS)
-# include(LLAddBuildTest)
-# # UNIT TESTS
-# SET(llcharacter_TEST_SOURCE_FILES
-# lljoint.cpp
-# )
-# LL_ADD_PROJECT_UNIT_TESTS(llcharacter "${llcharacter_TEST_SOURCE_FILES}")
-#endif (LL_TESTS)
-
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index cde38c8091..beca1af269 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -46,7 +46,6 @@
//-----------------------------------------------------------------------------
// Static Definitions
//-----------------------------------------------------------------------------
-LLVFS* LLKeyframeMotion::sVFS = NULL;
LLKeyframeDataCache::keyframe_data_map_t LLKeyframeDataCache::sKeyframeDataMap;
//-----------------------------------------------------------------------------
@@ -515,7 +514,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
return STATUS_SUCCESS;
default:
// we don't know what state the asset is in yet, so keep going
- // check keyframe cache first then static vfs then asset request
+ // check keyframe cache first then file cache then asset request
break;
}
@@ -559,13 +558,8 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
U8 *anim_data;
S32 anim_file_size;
- if (!sVFS)
- {
- LL_ERRS() << "Must call LLKeyframeMotion::setVFS() first before loading a keyframe file!" << LL_ENDL;
- }
-
BOOL success = FALSE;
- LLVFile* anim_file = new LLVFile(sVFS, mID, LLAssetType::AT_ANIMATION);
+ LLVFile* anim_file = new LLVFile(mID, LLAssetType::AT_ANIMATION);
if (!anim_file || !anim_file->getSize())
{
delete anim_file;
@@ -2296,10 +2290,9 @@ void LLKeyframeMotion::setLoopOut(F32 out_point)
//-----------------------------------------------------------------------------
// onLoadComplete()
//-----------------------------------------------------------------------------
-void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
- const LLUUID& asset_uuid,
- LLAssetType::EType type,
- void* user_data, S32 status, LLExtStat ext_status)
+void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid,
+ LLAssetType::EType type,
+ void* user_data, S32 status, LLExtStat ext_status)
{
LLUUID* id = (LLUUID*)user_data;
@@ -2331,7 +2324,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
// asset already loaded
return;
}
- LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
+ LLVFile file(asset_uuid, type, LLVFile::READ);
S32 size = file.getSize();
U8* buffer = new U8[size];
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 15c5c7c6c0..d640556090 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -44,7 +44,6 @@
#include "llbvhconsts.h"
class LLKeyframeDataCache;
-class LLVFS;
class LLDataPacker;
#define MIN_REQUIRED_PIXEL_AREA_KEYFRAME (40.f)
@@ -141,10 +140,7 @@ public:
virtual void setStopTime(F32 time);
- static void setVFS(LLVFS* vfs) { sVFS = vfs; }
-
- static void onLoadComplete(LLVFS *vfs,
- const LLUUID& asset_uuid,
+ static void onLoadComplete(const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status);
@@ -416,13 +412,7 @@ public:
U32 getNumJointMotions() const { return mJointMotionArray.size(); }
};
-
protected:
- static LLVFS* sVFS;
-
- //-------------------------------------------------------------------------
- // Member Data
- //-------------------------------------------------------------------------
JointMotionList* mJointMotionList;
std::vector<LLPointer<LLJointState> > mJointStates;
LLJoint* mPelvisp;