opt: initial windows impl
This commit is contained in:
parent
4807594245
commit
59475c0020
6 changed files with 75 additions and 33 deletions
22
windows/texture_rgba.h
Normal file
22
windows/texture_rgba.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <flutter/texture_registrar.h>
|
||||
#include <mutex>
|
||||
|
||||
#pragma once
|
||||
class TextureRgba
|
||||
{
|
||||
public:
|
||||
TextureRgba(flutter::TextureRegistrar* texture_registrar);
|
||||
~TextureRgba();
|
||||
|
||||
void MarkVideoFrameAvailable(uint8_t* buffer, int32_t width, int32_t height);
|
||||
|
||||
int64_t texture_id() const { return texture_id_; };
|
||||
|
||||
private:
|
||||
FlutterDesktopPixelBuffer flutter_pixel_buffer_{};
|
||||
flutter::TextureRegistrar* texture_registrar_ = nullptr;
|
||||
std::unique_ptr<flutter::TextureVariant> texture_ = nullptr;
|
||||
int64_t texture_id_;
|
||||
mutable std::mutex mutex_;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue