mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
Have wuffs_aux::DecodeImage's Done take unique_ptr
This commit is contained in:
1 parent
a21e891e24
commit
9e5817e45d
4 files changed
+58
-35
No files matched your search
@@ -91,12 +91,20 @@ class DecodeImageCallbacks {
|
||||
// not parsing the input encountered an error. Even when successful, trailing
|
||||
// data may remain in input and buffer.
|
||||
//
|
||||
// The image_decoder is the one returned by OnImageFormat (if OnImageFormat
|
||||
// was successful), or a no-op unique_ptr otherwise. Like any unique_ptr,
|
||||
// ownership moves to the Done implementation.
|
||||
//
|
||||
// Do not keep a reference to buffer or buffer.data.ptr after Done returns,
|
||||
// as DecodeImage may then de-allocate the backing array.
|
||||
//
|
||||
// The default Done implementation is a no-op.
|
||||
// The default Done implementation is a no-op, other than running the
|
||||
// image_decoder unique_ptr destructor.
|
||||
virtual void //
|
||||
Done(DecodeImageResult& result, sync_io::Input& input, IOBuffer& buffer);
|
||||
Done(DecodeImageResult& result,
|
||||
sync_io::Input& input,
|
||||
IOBuffer& buffer,
|
||||
wuffs_base__image_decoder::unique_ptr image_decoder);
|
||||
};
|
||||
|
||||
extern const char DecodeImage_BufferIsTooShort[];
|
||||
|
||||
Reference in new issue
Block a user