initial work to split into dart_filament and flutter_filament

This commit is contained in:
Nick Fisher
2024-04-30 12:07:26 +08:00
parent b81f34cd29
commit 8f9e309c34
1624 changed files with 165260 additions and 6619 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include <streambuf>
#include <functional>
#include <cassert>
#include <cstring>
namespace flutter_filament {
//
// A generic adapter to expose any contiguous section of memory as a std::streambuf.
// Mostly for Android/iOS assets which may not be able to be directly loaded as streams.
//
class StreamBufferAdapter : public std::streambuf
{
public:
StreamBufferAdapter(const char *begin, const char *end);
~StreamBufferAdapter() {
}
std::streamsize size();
private:
int_type uflow() override;
int_type underflow() override;
int_type pbackfail(int_type ch) override;
std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which) override;
std::streampos seekpos(std::streampos sp, std::ios_base::openmode which) override;
std::streamsize showmanyc() override;
};
}