opt: initial windows impl
This commit is contained in:
parent
4807594245
commit
59475c0020
6 changed files with 75 additions and 33 deletions
19
windows/texture_rgba.cpp
Normal file
19
windows/texture_rgba.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "texture_rgba.h"
|
||||
|
||||
TextureRgba::TextureRgba(flutter::TextureRegistrar* texture_registrar)
|
||||
{
|
||||
}
|
||||
|
||||
TextureRgba::~TextureRgba()
|
||||
{
|
||||
texture_registrar_->UnregisterTexture(texture_id_);
|
||||
}
|
||||
|
||||
void TextureRgba::MarkVideoFrameAvailable(uint8_t* buffer, int32_t width, int32_t height)
|
||||
{
|
||||
const std::lock_guard<std::mutex> lock(mutex_);
|
||||
flutter_pixel_buffer_.buffer = buffer;
|
||||
flutter_pixel_buffer_.width = width;
|
||||
flutter_pixel_buffer_.height = height;
|
||||
texture_registrar_->MarkTextureFrameAvailable(texture_id_);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue