Fix bug with assets changing state prematurely, while loading

This commit is contained in:
Emil Axelsson
2017-12-22 00:15:23 +01:00
parent abb22b4aaa
commit 2baa0cbb6d
2 changed files with 36 additions and 19 deletions
+15 -5
View File
@@ -84,27 +84,37 @@ public:
void syncStateChanged(ResourceSynchronization::State s);
/**
* Load this asset and return true if successful,
* i.e. if this and all required assets loaded without errors.
*/
bool load();
bool hasLoadedParent() const;
void load();
bool isLoaded() const;
void unload();
void unloadIfUnwanted();
// Sync
/**
* Start synchronizations of this asset and return true if all
* its own synchronizations and required assets' synchronizations could start.
*/
bool startSynchronizations();
bool hasSyncingOrResolvedParent() const;
bool isSynchronized() const;
bool isSyncingOrResolved() const;
bool startSynchronizations();
bool cancelAllSynchronizations();
bool cancelUnwantedSynchronizations();
bool restartAllSynchronizations();
float requestedSynchronizationProgress();
float requiredSynchronizationProgress();
// Init
/**
* Initialize this asset and return true if successful,
* i.e. if this and all required assets initialized without errors.
*/
bool initialize();
bool hasInitializedParent() const;
bool isInitialized() const;
void initialize();
void deinitialize();
void deinitializeIfUnwanted();