summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/drm/evas_engine.h
diff options
context:
space:
mode:
authorCedric BAIL <c.bail@partner.samsung.com>2014-06-25 10:47:08 +0200
committerCedric BAIL <c.bail@partner.samsung.com>2014-07-04 15:11:22 +0200
commite4a4304dc4158159ad62fc318f29248d9b2945f9 (patch)
tree3e77faa3a237a22dc338a72c706abd5cf7821103 /src/modules/evas/engines/drm/evas_engine.h
parent325d760c554d9bc1e2b531382c0182ad439024c7 (diff)
evas: simplify DRM backend to use Software generic infrastructure more.
Diffstat (limited to 'src/modules/evas/engines/drm/evas_engine.h')
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h64
1 files changed, 28 insertions, 36 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index 675c9e50ac..cf4e22206a 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -17,6 +17,8 @@
17#include <unistd.h> 17#include <unistd.h>
18#include <fcntl.h> 18#include <fcntl.h>
19 19
20#include "../software_generic/Evas_Engine_Software_Generic.h"
21
20extern int _evas_engine_drm_log_dom; 22extern int _evas_engine_drm_log_dom;
21 23
22# ifdef ERR 24# ifdef ERR
@@ -51,22 +53,6 @@ typedef struct _Buffer Buffer;
51typedef struct _Plane Plane; 53typedef struct _Plane Plane;
52typedef struct _Outbuf Outbuf; 54typedef struct _Outbuf Outbuf;
53 55
54enum
55{
56 MODE_FULL,
57 MODE_COPY,
58 MODE_DOUBLE,
59 MODE_TRIPLE
60};
61
62enum
63{
64 OUTBUF_DEPTH_NONE,
65 OUTBUF_DEPTH_ARGB_32BPP_8888_8888,
66 OUTBUF_DEPTH_RGB_32BPP_8888_8888,
67 OUTBUF_DEPTH_LAST
68};
69
70struct _Buffer 56struct _Buffer
71{ 57{
72 int w, h; 58 int w, h;
@@ -100,37 +86,43 @@ struct _Plane
100 86
101struct _Outbuf 87struct _Outbuf
102{ 88{
89 Evas_Engine_Info_Drm *info;
90
103 int w, h; 91 int w, h;
104 unsigned int rotation, depth; 92 int rotation;
105 Eina_Bool destination_alpha : 1; 93 unsigned int depth;
106 Eina_Bool vsync : 1;
107 94
108 struct 95 struct
109 { 96 {
110 int fd; 97 Buffer buffer[NUM_BUFFERS];
111 unsigned int conn, crtc, fb;
112 98
113 Buffer buffer[NUM_BUFFERS]; 99 Eina_List *pending_writes;
114 int curr, num; 100 Eina_List *planes;
115 101
116 drmModeModeInfo mode; 102# ifdef HAVE_DRM_HW_ACCEL
117 drmEventContext ctx; 103 void *surface;
118 Eina_Bool pending_flip : 1; 104# endif
119 105
120 Eina_List *pending_writes; 106 int fd;
107 unsigned int conn, crtc, fb;
121 108
122 Eina_List *planes; 109 int curr, num;
123 110
124# ifdef HAVE_DRM_HW_ACCEL 111 drmModeModeInfo mode;
125 void *surface; 112 drmEventContext ctx;
126# endif 113
127 } priv; 114 Eina_Bool pending_flip : 1;
115 } priv;
116
117 Eina_Bool destination_alpha : 1;
118 Eina_Bool vsync : 1;
128}; 119};
129 120
130Outbuf *evas_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h); 121Outbuf *evas_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int h);
131void evas_outbuf_free(Outbuf *ob); 122void evas_outbuf_free(Outbuf *ob);
132void evas_outbuf_reconfigure(Evas_Engine_Info_Drm *info, Outbuf *ob, int w, int h); 123void evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth);
133int evas_outbuf_buffer_state_get(Outbuf *ob); 124Render_Engine_Swap_Mode evas_outbuf_buffer_state_get(Outbuf *ob);
125int evas_outbuf_get_rot(Outbuf *ob);
134RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); 126RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
135void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 127void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
136void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); 128void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);