@ingroup Evas_Canvas */
}
+ render_copy {
+ /*@
+ Get a image from evas
+
+ @ingroup Evas_Canvas */
+
+ params {
+ @in void *buffer;
+ @in int stride;
+ @in int width;
+ @in int height;
+ @in uint format;
+ @in int sx;
+ @in int sy;
+ @in int sw;
+ @in int sh;
+ @in int dx;
+ @in int dy;
+ @in int dw;
+ @in int dh;
+ }
+ }
event_feed_mouse_in {
/*@
Mouse in event feed.
}
}
+EOLIAN void
+_evas_canvas_render_copy(Eo *obj EINA_UNUSED, Evas_Public_Data *e, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh)
+{
+ if ((e->engine.func) && (e->engine.func->output_copy) &&
+ (e->engine.data.output))
+ e->engine.func->output_copy(e->engine.data.output, buffer, stride, width, height, format, sx, sy, sw, sh, dx, dy, dw, dh);
+}
+
void
evas_render_invalidate(Evas *eo_e)
{
void (*texture_filter_set) (void *data, void *texture, Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag);
void (*texture_filter_get) (void *data, void *texture, Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag);
void (*texture_image_set) (void *data, void *texture, void *image);
+
+ void (*output_copy) (void *data, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh);
};
struct _Evas_Image_Save_Func
void _canvas_render_idle_flush(Eo *e, void *_pd, va_list *list);
void _canvas_sync(Eo *obj, void *_pd, va_list *list);
void _canvas_render_dump(Eo *obj, void *_pd, va_list *list);
+void _canvas_render_copy(Eo *obj, void *_pd, va_list *list);
void _canvas_object_bottom_get(Eo *e, void *_pd, va_list *list);
void _canvas_object_top_get(Eo *e, void *_pd, va_list *list);
/* external variables */
int _evas_engine_drm_log_dom;
+/* local inline functions */
+static inline Outbuf *
+eng_get_ob(Render_Engine *re)
+{
+ return re->generic.ob;
+}
+
/* local functions */
static void *
_output_setup(Evas_Engine_Info_Drm *info, int w, int h)
evas_common_image_shutdown();
}
+static void
+eng_output_copy(void *data, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh)
+{
+ Render_Engine *re = (Render_Engine *)data;
+ Outbuf *ob;
+
+ EINA_SAFETY_ON_NULL_RETURN(re);
+
+ ob = eng_get_ob(re);
+ EINA_SAFETY_ON_NULL_RETURN(ob);
+
+ evas_outbuf_copy(ob, buffer, stride, width, height, format, sx, sy, sw, sh, dx, dy, dw, dh);
+}
+
/* module api functions */
static int
module_open(Evas_Module *em)
EVAS_API_OVERRIDE(info_free, &func, eng_);
EVAS_API_OVERRIDE(setup, &func, eng_);
EVAS_API_OVERRIDE(output_free, &func, eng_);
+ EVAS_API_OVERRIDE(output_copy, &func, eng_);
/* advertise our engine functions */
em->functions = (void *)(&func);
void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
+void evas_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh);
+
Eina_Bool evas_drm_outbuf_setup(Outbuf *ob);
void evas_drm_outbuf_framebuffer_set(Outbuf *ob, Buffer *buffer);
Eina_Bool evas_drm_framebuffer_create(int fd, Buffer *buffer, int depth);
{
return ob->info->info.rotation;
}
+
+void
+evas_outbuf_copy(Outbuf *ob, void *buffer, int stride, int width, int height, uint format, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh)
+{
+ Buffer *buff = &(ob->priv.buffer[ob->priv.last]);
+
+ memcpy (buffer, buff->data, stride * height);
+}
\ No newline at end of file