Stage 1: headless Image and AudioData; GPU and playback caches in the UI
- resource::Image (pixels, size, uid) replaces Texture in documents, undo and wizards; it lives in anm2ed_core with no GL. uid changes with the pixels. - resource::texture::id_get uploads lazily and evicts textures not drawn in a frame - resource::AudioData (bytes, uid) replaces Audio; resource::audio::play/stop/ track_detach/is_playing cache decoded audio and tracks per uid - Resources::icon_id_get shortens the icon call sites - tests/assets.cpp covers Image png round trip, uid tracking, merge_append Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5311c2835f
commit
26ab394fe4
37 files changed
+538
-614
No files matched your search
+6
-6
@@ -7,10 +7,10 @@
|
||||
#include <vector>
|
||||
|
||||
#include "anm2/anm2.hpp"
|
||||
#include "audio.hpp"
|
||||
#include "audio_data.hpp"
|
||||
#include "image.hpp"
|
||||
#include "playback.hpp"
|
||||
#include "storage.hpp"
|
||||
#include "texture.hpp"
|
||||
|
||||
namespace anm2ed::snapshots
|
||||
{
|
||||
@@ -63,8 +63,8 @@ namespace anm2ed
|
||||
Storage shader{};
|
||||
Storage sound{};
|
||||
Storage spritesheet{};
|
||||
std::map<int, resource::Texture> textures{};
|
||||
std::map<int, resource::Audio> sounds{};
|
||||
std::map<int, resource::Image> textures{};
|
||||
std::map<int, resource::AudioData> sounds{};
|
||||
Anm2 anm2{};
|
||||
Reference reference{};
|
||||
std::set<Reference> groupReferences{};
|
||||
@@ -72,8 +72,8 @@ namespace anm2ed
|
||||
std::string message = snapshots::ACTION;
|
||||
};
|
||||
|
||||
using SnapshotTextureMap = std::map<int, resource::Texture>;
|
||||
using SnapshotSoundMap = std::map<int, resource::Audio>;
|
||||
using SnapshotTextureMap = std::map<int, resource::Image>;
|
||||
using SnapshotSoundMap = std::map<int, resource::AudioData>;
|
||||
|
||||
#define SNAPSHOT_STEP_STATE_FIELDS \
|
||||
X(Playback, playback) \
|
||||
|
||||
Reference in new issue
Block a user