mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:07:43 +00:00
AK: Move memory streams from LibCore
This commit is contained in:
parent
11550f582b
commit
093cf428a3
46 changed files with 213 additions and 203 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Endian.h>
|
||||
#include <LibCore/MemoryStream.h>
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/QOILoader.h>
|
||||
|
||||
|
@ -202,13 +202,13 @@ bool QOIImageDecoderPlugin::initialize()
|
|||
|
||||
ErrorOr<bool> QOIImageDecoderPlugin::sniff(ReadonlyBytes data)
|
||||
{
|
||||
auto stream = TRY(Core::Stream::FixedMemoryStream::construct({ data.data(), data.size() }));
|
||||
auto stream = TRY(FixedMemoryStream::construct({ data.data(), data.size() }));
|
||||
return !decode_qoi_header(*stream).is_error();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> QOIImageDecoderPlugin::create(ReadonlyBytes data)
|
||||
{
|
||||
auto stream = TRY(Core::Stream::FixedMemoryStream::construct(data));
|
||||
auto stream = TRY(FixedMemoryStream::construct(data));
|
||||
return adopt_nonnull_own_or_enomem(new (nothrow) QOIImageDecoderPlugin(move(stream)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue