bump: 0.0.15

This commit is contained in:
Kingtous 2023-03-23 23:34:09 +08:00
parent 40fd713395
commit 785c34f36b
4 changed files with 13 additions and 2 deletions

View file

@ -154,7 +154,7 @@ static TextureRgba *texture_rgba_new(FlTextureRegistrar* registrar)
static void texture_rgba_class_init(TextureRgbaClass *klass)
{
// FL_PIXEL_BUFFER_TEXTURE_GET_CLASS(klass)->copy_pixels = texture_rgba_copy_pixels;
FL_PIXEL_BUFFER_TEXTURE_CLASS(klass)->copy_pixels = texture_rgba_copy_pixels;
}
static void texture_rgba_init(TextureRgba* self) {

View file

@ -142,6 +142,11 @@ void texture_rgba_renderer_plugin_register_with_registrar(FlPluginRegistrar *reg
extern "C" {
void FlutterRgbaRendererPluginOnRgba(void *texture_rgba_ptr, const uint8_t *buffer, int len, int width, int height, int stride_align) {
// Check whether the parameter is valid.
if (len != 4 * width * height || width == 0 || height == 0) {
g_warning("The data length, width, height is not valid, ignoring this request.");
return;
}
TextureRgba* self = TEXTURE_RGBA(texture_rgba_ptr);
g_mutex_lock(&self->mutex);
// selfate has registered a texture_id,