evas_cache_vg_entry_del(pd->vg_entry);
#ifdef HAVE_THORVG
- if (pd->im)
- {
- ENFN->image_free(_evas_engine_context(obj->layer->evas), pd->im);
- pd->im = NULL;
- }
-
if (pd->tvg_buffer)
{
free(pd->tvg_buffer);
void *engine, void *output, void *context, void *surface,
void *buffer, int x, int y, int w, int h, Eina_Bool do_async)
{
- if (!buffer) return;
+ Eina_Bool async_unref = EINA_FALSE;
+ Image_Entry *image = NULL;
+
+ if (!buffer)
+ return;
+
+ image = ENFN->image_new_from_copied_data(engine, w, h, buffer, 255, EVAS_COLORSPACE_ARGB8888);
- //FIXE_TVG: Need to use the method original ector surface buffer (tbm or dynamic texture)
- if (!pd->im) pd->im = ENFN->image_new_from_data(engine, w, h, buffer, 255, EVAS_COLORSPACE_ARGB8888);
- else pd->im = ENFN->image_data_put(engine, pd->im, buffer);
+ async_unref = ENFN->image_draw(engine, output, context, surface,
+ image, 0, 0, w, h, x, y, w, h,
+ EINA_TRUE, do_async);
- ENFN->image_dirty_region(engine, pd->im, 0, 0, w, h);
+ if (do_async && async_unref)
+ {
+ evas_cache_image_ref(image);
+ evas_unref_queue_image_put(obj->layer->evas, image);
+ }
- //FIX_TVG: Check _render_buffer_to_screen(): async_unref variable.
- ENFN->image_draw(engine, output, context, surface,
- pd->im, 0, 0, w, h, x, y, w, h,
- EINA_TRUE, do_async);
+ ENFN->image_free(engine, image);
}
#else
tvg_swcanvas_set_target(pd->tvg_canvas, pd->tvg_buffer,
size.w, size.w, size.h,
TVG_COLORSPACE_ARGB8888);
-
- //if size is changed im handle also should be deleted
- if (pd->im)
- {
- ENFN->image_free(engine, pd->im);
- pd->im = NULL;
- }
}
Vg_Cache_Entry *vg_entry = pd->vg_entry;