summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/drm/evas_engine.h
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-02-28 12:32:38 +0000
committerChris Michael <cp.michael@samsung.com>2014-02-28 13:13:17 +0000
commit54680b1f972e9b88679a44966266616a7bef3729 (patch)
tree2c06883befa4f29c829e3d46b5c2a211312b1d6e /src/modules/evas/engines/drm/evas_engine.h
parentaafd8e5277f1e83942ec466a57ff4b45e8628acb (diff)
evas-drm: cleanup outbuf structure and functions
@bugfix: this cleans up the Outbuf structure by removing unused fields, Fixing some function declarations, and defaulting the number of buffers to 2 (double-buffering) Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules/evas/engines/drm/evas_engine.h')
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index 8eec6fd98b..0487ad616a 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -45,7 +45,7 @@ extern int _evas_engine_drm_log_dom;
45# define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_drm_log_dom, __VA_ARGS__) 45# define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_drm_log_dom, __VA_ARGS__)
46 46
47/* define a maximum number of 'buffers' (double-buff, triple-buff, etc) */ 47/* define a maximum number of 'buffers' (double-buff, triple-buff, etc) */
48# define NUM_BUFFERS 3 48# define NUM_BUFFERS 2
49 49
50typedef struct _Buffer Buffer; 50typedef struct _Buffer Buffer;
51typedef struct _Plane Plane; 51typedef struct _Plane Plane;
@@ -73,6 +73,7 @@ struct _Buffer
73 int stride, size; 73 int stride, size;
74 int handle; 74 int handle;
75 unsigned int fb; 75 unsigned int fb;
76
76 void *data; // used for software framebuffers 77 void *data; // used for software framebuffers
77 78
78# ifdef HAVE_DRM_HW_ACCEL 79# ifdef HAVE_DRM_HW_ACCEL
@@ -102,25 +103,23 @@ struct _Outbuf
102 int w, h; 103 int w, h;
103 unsigned int rotation, depth; 104 unsigned int rotation, depth;
104 Eina_Bool destination_alpha : 1; 105 Eina_Bool destination_alpha : 1;
106 Eina_Bool vsync : 1;
105 107
106 struct 108 struct
107 { 109 {
108 RGBA_Image *onebuf;
109 Eina_Array onebuf_regions;
110
111 int fd; 110 int fd;
112 unsigned int conn, crtc; 111 unsigned int conn, crtc, fb;
113 112
114 Buffer buffer[NUM_BUFFERS], *sent; 113 Buffer buffer[NUM_BUFFERS];
115 int curr, num; 114 int curr, num;
116 115
117 drmModeModeInfo mode; 116 drmModeModeInfo mode;
118 drmEventContext ctx; 117 drmEventContext ctx;
119 Eina_Bool pending_flip : 1; 118 Eina_Bool pending_flip : 1;
119
120 Eina_Bool use_async_page_flip : 1; 120 Eina_Bool use_async_page_flip : 1;
121 121
122 Eina_List *pending_writes; 122 Eina_List *pending_writes;
123 Eina_List *prev_pending_writes;
124 123
125 Eina_List *planes; 124 Eina_List *planes;
126 125
@@ -136,6 +135,7 @@ void evas_outbuf_reconfigure(Evas_Engine_Info_Drm *info, Outbuf *ob, int w, int
136int evas_outbuf_buffer_state_get(Outbuf *ob); 135int evas_outbuf_buffer_state_get(Outbuf *ob);
137RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); 136RGBA_Image *evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
138void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); 137void evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h);
138void evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
139void evas_outbuf_flush(Outbuf *ob); 139void evas_outbuf_flush(Outbuf *ob);
140 140
141Eina_Bool evas_drm_init(Evas_Engine_Info_Drm *info, int card); 141Eina_Bool evas_drm_init(Evas_Engine_Info_Drm *info, int card);
@@ -145,6 +145,6 @@ Eina_Bool evas_drm_outbuf_setup(Outbuf *ob);
145void evas_drm_outbuf_framebuffer_set(Outbuf *ob, Buffer *buffer); 145void evas_drm_outbuf_framebuffer_set(Outbuf *ob, Buffer *buffer);
146Eina_Bool evas_drm_framebuffer_create(int fd, Buffer *buffer, int depth); 146Eina_Bool evas_drm_framebuffer_create(int fd, Buffer *buffer, int depth);
147void evas_drm_framebuffer_destroy(int fd, Buffer *buffer); 147void evas_drm_framebuffer_destroy(int fd, Buffer *buffer);
148Eina_Bool evas_drm_framebuffer_send(Outbuf *ob, Buffer *buffer, Eina_Rectangle *rects, unsigned int count); 148Eina_Bool evas_drm_framebuffer_send(Outbuf *ob, Buffer *buffer);
149 149
150#endif 150#endif