Implement ManagedImage and codec abstraction (#38)
This commit is contained in:
@@ -32,4 +32,3 @@ impl SkiaTextureCodec {
|
||||
)
|
||||
}
|
||||
}
|
||||
impl libremetaverse_imaging::ITextureCodec for SkiaTextureCodec {}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user