cleanup EGL/D3D texture rendering

This commit is contained in:
Nick Fisher
2024-03-07 12:19:01 +11:00
parent 8ef166d9b8
commit f0c48d7f0a
11 changed files with 81 additions and 50 deletions

View File

@@ -12,6 +12,7 @@ namespace flutter_filament {
class FlutterRenderContext {
public:
void CreateRenderingSurface(uint32_t width, uint32_t height, std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result, uint32_t left, uint32_t top );
void DestroyTexture(std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result) {
@@ -33,11 +34,16 @@ namespace flutter_filament {
});
}
int64_t GetFlutterTextureId() {
if(!_active) {
return -1;
}
return _active->flutterTextureId;
}
void* sharedContext = nullptr;
protected:
FlutterRenderContext( flutter::PluginRegistrarWindows* pluginRegistrar, flutter::TextureRegistrar* textureRegistrar) : _pluginRegistrar(pluginRegistrar), _textureRegistrar(textureRegistrar) {};
flutter::PluginRegistrarWindows* _pluginRegistrar;
flutter::TextureRegistrar* _textureRegistrar;
std::unique_ptr<FlutterTextureBuffer> _active = nullptr;