summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c74
1 files changed, 8 insertions, 66 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 3a8524d144..82b7d0d1bf 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -183,78 +183,16 @@ _drm_rotation_do(Ecore_Evas *ee, int rotation, int resize EINA_UNUSED)
183 ERR("evas_engine_info_set() for engine '%s' failed", ee->driver); 183 ERR("evas_engine_info_set() for engine '%s' failed", ee->driver);
184} 184}
185 185
186static int
187_drm_render_updates_process(Ecore_Evas *ee, Eina_List *updates)
188{
189 int rend = 0;
190
191 if ((ee->visible) && (updates))
192 {
193 _ecore_evas_idle_timeout_update(ee);
194 rend = 1;
195 }
196 else
197 evas_norender(ee->evas);
198
199 if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
200
201 return rend;
202}
203
204static void 186static void
205_drm_render_updates(void *data, Evas *evas EINA_UNUSED, void *event) 187_drm_render_updates(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED)
206{ 188{
207 Evas_Event_Render_Post *ev; 189 Ecore_Evas *ee = data;
208 Ecore_Evas *ee;
209
210 ev = event;
211 if (!ev) return;
212
213 ee = data;
214 if (!ee) return;
215
216 ee->in_async_render = EINA_FALSE;
217 190
218 if (ee->delayed.rotation_changed) 191 if (ee->delayed.rotation_changed)
219 { 192 {
220 _drm_rotation_do(ee, ee->delayed.rotation, ee->delayed.rotation_resize); 193 _drm_rotation_do(ee, ee->delayed.rotation, ee->delayed.rotation_resize);
221 ee->delayed.rotation_changed = EINA_FALSE; 194 ee->delayed.rotation_changed = EINA_FALSE;
222 } 195 }
223
224 _drm_render_updates_process(ee, ev->updated_area);
225}
226
227static int
228_drm_render(Ecore_Evas *ee)
229{
230 int rend = 0;
231
232 if (ee->in_async_render) return 0;
233
234 rend = ecore_evas_render_prepare(ee);
235
236 if (!ee->visible)
237 {
238 evas_norender(ee->evas);
239 ee->func.fn_post_render(ee);
240 return 0;
241 }
242
243 if (!ee->can_async_render)
244 {
245 Eina_List *updates;
246
247 updates = evas_render_updates(ee->evas);
248 rend = _drm_render_updates_process(ee, updates);
249 evas_render_updates_free(updates);
250 }
251 else if (evas_render_async(ee->evas))
252 {
253 ee->in_async_render = EINA_TRUE;
254 rend = 1;
255 }
256
257 return rend;
258} 196}
259 197
260static void 198static void
@@ -302,7 +240,10 @@ _drm_show(Ecore_Evas *ee)
302 ee->should_be_visible = 1; 240 ee->should_be_visible = 1;
303 241
304 if (ee->prop.avoid_damage) 242 if (ee->prop.avoid_damage)
305 _drm_render(ee); 243 {
244 ecore_evas_render(ee);
245 ecore_evas_render_wait(ee);
246 }
306 247
307 if (ee->prop.override) 248 if (ee->prop.override)
308 { 249 {
@@ -724,7 +665,7 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
724 NULL, //void (*fn_demands_attention_set) (Ecore_Evas *ee, Eina_Bool on); 665 NULL, //void (*fn_demands_attention_set) (Ecore_Evas *ee, Eina_Bool on);
725 NULL, //void (*fn_focus_skip_set) (Ecore_Evas *ee, Eina_Bool on); 666 NULL, //void (*fn_focus_skip_set) (Ecore_Evas *ee, Eina_Bool on);
726 667
727 _drm_render, 668 NULL,
728 669
729 _drm_screen_geometry_get, 670 _drm_screen_geometry_get,
730 _drm_screen_dpi_get, 671 _drm_screen_dpi_get,
@@ -749,6 +690,7 @@ static Ecore_Evas_Engine_Func _ecore_evas_drm_engine_func =
749 NULL, //fn_callback_focus_device_in_set 690 NULL, //fn_callback_focus_device_in_set
750 NULL, //fn_callback_focus_device_out_set 691 NULL, //fn_callback_focus_device_out_set
751 NULL, //fn_pointer_device_xy_get 692 NULL, //fn_pointer_device_xy_get
693 NULL, //fn_prepare
752}; 694};
753 695
754static Ecore_Evas * 696static Ecore_Evas *