summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/drm/evas_engine.h
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-03 12:02:20 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-27 11:57:53 -0400
commitccb573ec7b460326e5d45ce2a3f9ac7a7470e335 (patch)
tree797c50b6a98a3449e067b95f8b4575839f0cb0b9 /src/modules/evas/engines/drm/evas_engine.h
parent13337c2583d089909dd2c872fcfa9cab11e9eb70 (diff)
evas-engines: Port evas drm engines to use Ecore_Drm2 library
This patch ports the evas drm and gl_drm engines to use the new Ecore_Drm2 library Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/modules/evas/engines/drm/evas_engine.h')
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h56
1 files changed, 35 insertions, 21 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index d5139117ee..a1925b939e 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -6,8 +6,13 @@
6# include "evas_private.h" 6# include "evas_private.h"
7# include "Evas.h" 7# include "Evas.h"
8# include "Evas_Engine_Drm.h" 8# include "Evas_Engine_Drm.h"
9# include <Ecore.h>
10# include <Ecore_Drm2.h>
11# include <drm_fourcc.h>
12# include <xf86drm.h>
13# include <xf86drmMode.h>
9 14
10#include "../software_generic/Evas_Engine_Software_Generic.h" 15# include "../software_generic/Evas_Engine_Software_Generic.h"
11 16
12extern int _evas_engine_drm_log_dom; 17extern int _evas_engine_drm_log_dom;
13 18
@@ -36,35 +41,44 @@ extern int _evas_engine_drm_log_dom;
36# endif 41# endif
37# define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_drm_log_dom, __VA_ARGS__) 42# define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_drm_log_dom, __VA_ARGS__)
38 43
39struct _Outbuf 44typedef struct _Outbuf_Fb
40{ 45{
41 Evas_Engine_Info_Drm *info; 46 int age;
47 Ecore_Drm2_Fb *fb;
48
49 Eina_Bool valid : 1;
50 Eina_Bool drawn : 1;
51 Eina_Bool busy : 1;
52} Outbuf_Fb;
42 53
43 int w, h; 54struct _Outbuf
44 int rotation; 55{
45 unsigned int depth; 56 int fd, w, h, bpp, rotation;
57 unsigned int depth, format;
46 58
47 struct 59 struct
48 { 60 {
49 Ecore_Drm_Fb *buffer[4]; 61 int num;
50 62 Outbuf_Fb ofb[4], *current;
51 Eina_List *pending_writes; 63 Ecore_Drm2_Output *output;
52 64 Eina_List *pending;
53 int curr, last, num;
54 } priv; 65 } priv;
55 66
56 Eina_Bool destination_alpha : 1; 67 drmEventContext ctx;
68 Ecore_Fd_Handler *hdlr;
69
70 Eina_Bool alpha : 1;
57 Eina_Bool vsync : 1; 71 Eina_Bool vsync : 1;
58}; 72};
59 73
60Outbuf *evas_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h); 74Outbuf *_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h);
61void evas_outbuf_free(Outbuf *ob); 75void _outbuf_free(Outbuf *ob);
62void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth); 76int _outbuf_rotation_get(Outbuf *ob);
63Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob); 77void _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth depth);
64int evas_outbuf_rot_get(Outbuf *ob); 78Render_Engine_Swap_Mode _outbuf_state_get(Outbuf *ob);
65void *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); 79void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
66void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 80void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
67void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); 81void _outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
68void evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode); 82void _outbuf_flush(Outbuf *ob, Tilebuf_Rect *rects, Evas_Render_Mode render_mode);
69 83
70#endif 84#endif