Implement ManagedImage and codec abstraction (#38)

This commit is contained in:
2026-08-09 02:11:02 +00:00
parent d980692933
commit 2c806d80ff
9 changed files with 850 additions and 92 deletions

View File

@@ -32,4 +32,3 @@ impl SkiaTextureCodec {
)
}
}
impl libremetaverse_imaging::ITextureCodec for SkiaTextureCodec {}

View File

@@ -12,3 +12,15 @@ mod generated;
pub use generated::*;
pub use libremetaverse_imaging as imaging;
pub use libremetaverse_types::Error;
// The native codec abstraction requires an explicit implementation. Until the
// optional Skia adapter is ported, forward through its cataloged typed-failure
// method rather than manufacturing an image or silently accepting input.
impl libremetaverse_imaging::ITextureCodec for SkiaTextureCodec {
fn decode(
&self,
stream: Box<dyn libremetaverse_types::compat::ReadWrite + Send>,
) -> Result<libremetaverse_imaging::ManagedImage, Error> {
Self::decode(self, stream)
}
}