2013-04-29 04:40:24 -07:00
|
|
|
#ifndef EVAS_ENGINE_H
|
|
|
|
# define EVAS_ENGINE_H
|
|
|
|
|
2015-04-08 10:57:58 -07:00
|
|
|
# include "evas_common_private.h"
|
|
|
|
# include "evas_macros.h"
|
|
|
|
# include "evas_private.h"
|
|
|
|
# include "Evas.h"
|
|
|
|
# include "Evas_Engine_Drm.h"
|
2016-05-03 09:02:20 -07:00
|
|
|
# include <Ecore.h>
|
|
|
|
# include <Ecore_Drm2.h>
|
|
|
|
# include <drm_fourcc.h>
|
|
|
|
# include <xf86drm.h>
|
|
|
|
# include <xf86drmMode.h>
|
2014-02-10 23:09:39 -08:00
|
|
|
|
2016-05-03 09:02:20 -07:00
|
|
|
# include "../software_generic/Evas_Engine_Software_Generic.h"
|
2014-06-25 01:47:08 -07:00
|
|
|
|
2013-04-29 04:40:24 -07:00
|
|
|
extern int _evas_engine_drm_log_dom;
|
|
|
|
|
|
|
|
# ifdef ERR
|
|
|
|
# undef ERR
|
|
|
|
# endif
|
|
|
|
# define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_drm_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef DBG
|
|
|
|
# undef DBG
|
|
|
|
# endif
|
|
|
|
# define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_drm_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef INF
|
|
|
|
# undef INF
|
|
|
|
# endif
|
|
|
|
# define INF(...) EINA_LOG_DOM_INFO(_evas_engine_drm_log_dom, __VA_ARGS__)
|
|
|
|
|
|
|
|
# ifdef WRN
|
|
|
|
# undef WRN
|
|
|
|
# endif
|
|
|
|
# define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_drm_log_dom, __VA_ARGS__)
|
|
|
|
|
2013-12-25 19:22:05 -08:00
|
|
|
# ifdef CRI
|
|
|
|
# undef CRI
|
2013-04-29 04:40:24 -07:00
|
|
|
# endif
|
2013-12-25 19:22:05 -08:00
|
|
|
# define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_drm_log_dom, __VA_ARGS__)
|
2013-04-29 04:40:24 -07:00
|
|
|
|
2016-05-03 09:02:20 -07:00
|
|
|
typedef struct _Outbuf_Fb
|
2013-04-29 23:08:25 -07:00
|
|
|
{
|
2016-05-03 09:02:20 -07:00
|
|
|
int age;
|
|
|
|
Ecore_Drm2_Fb *fb;
|
|
|
|
|
|
|
|
Eina_Bool valid : 1;
|
|
|
|
Eina_Bool drawn : 1;
|
|
|
|
} Outbuf_Fb;
|
2014-06-25 01:47:08 -07:00
|
|
|
|
2016-05-03 09:02:20 -07:00
|
|
|
struct _Outbuf
|
|
|
|
{
|
|
|
|
int fd, w, h, bpp, rotation;
|
|
|
|
unsigned int depth, format;
|
2014-02-10 23:09:39 -08:00
|
|
|
|
2014-06-25 01:47:08 -07:00
|
|
|
struct
|
2015-06-02 06:17:57 -07:00
|
|
|
{
|
2016-05-03 09:02:20 -07:00
|
|
|
int num;
|
2016-09-07 20:25:43 -07:00
|
|
|
Outbuf_Fb ofb[4], *draw;
|
2016-05-03 09:02:20 -07:00
|
|
|
Ecore_Drm2_Output *output;
|
|
|
|
Eina_List *pending;
|
2016-09-07 19:31:08 -07:00
|
|
|
Eina_Rectangle *rects;
|
|
|
|
unsigned int rect_count;
|
2015-06-02 06:17:57 -07:00
|
|
|
} priv;
|
2014-06-25 01:47:08 -07:00
|
|
|
|
2016-05-03 09:02:20 -07:00
|
|
|
Eina_Bool alpha : 1;
|
2014-06-25 01:47:08 -07:00
|
|
|
Eina_Bool vsync : 1;
|
2013-04-29 23:08:25 -07:00
|
|
|
};
|
|
|
|
|
2016-05-03 09:02:20 -07:00
|
|
|
Outbuf *_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h);
|
|
|
|
void _outbuf_free(Outbuf *ob);
|
|
|
|
int _outbuf_rotation_get(Outbuf *ob);
|
|
|
|
void _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth);
|
|
|
|
Render_Engine_Swap_Mode _outbuf_state_get(Outbuf *ob);
|
|
|
|
void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
|
|
|
|
void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
|
|
|
|
void _outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
|
2016-10-19 13:33:09 -07:00
|
|
|
void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode render_mode);
|
2016-09-07 19:31:08 -07:00
|
|
|
void _outbuf_redraws_clear(Outbuf *ob);
|
2014-02-10 23:09:39 -08:00
|
|
|
|
2013-04-29 04:40:24 -07:00
|
|
|
#endif
|