summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-04-02 14:55:57 -0700
committerCedric Bail <cedric@osg.samsung.com>2018-04-02 15:12:31 -0700
commita44697c37a304c0d4d574b6772775c6936869e24 (patch)
treef70f6c1e2056d44bf5c0240e3b850c4c6f948a1b /src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
parent94433af83a0a0560df32d47d7f48a136b16e0d80 (diff)
ecore_evas: refactor logic for creating Ecore_Evas.
Diffstat (limited to 'src/modules/ecore_evas/engines/drm/ecore_evas_drm.c')
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c18
1 files changed, 7 insertions, 11 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 5aefe157ac..c1c60f8b15 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -1027,11 +1027,13 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo
1027 if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER")) 1027 if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
1028 ee->can_async_render = 0; 1028 ee->can_async_render = 0;
1029 1029
1030 ee->evas = evas_new(); 1030 if (!ecore_evas_evas_new(ee, w, h))
1031 evas_data_attach_set(ee->evas, ee); 1031 {
1032 ERR("Can not create a Canvas.");
1033 goto eng_err;
1034 }
1035
1032 evas_output_method_set(ee->evas, method); 1036 evas_output_method_set(ee->evas, method);
1033 evas_output_size_set(ee->evas, w, h);
1034 evas_output_viewport_set(ee->evas, 0, 0, w, h);
1035 1037
1036 if (ee->can_async_render) 1038 if (ee->can_async_render)
1037 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 1039 evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
@@ -1086,13 +1088,7 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo
1086 1088
1087 ecore_evas_data_set(ee, "device", edata->dev); 1089 ecore_evas_data_set(ee, "device", edata->dev);
1088 1090
1089 _ecore_evas_register(ee); 1091 ecore_evas_done(ee, EINA_FALSE);
1090 ecore_event_window_register(ee->prop.window, ee, ee->evas,
1091 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
1092 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
1093 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
1094 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
1095 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
1096 1092
1097 ecore_drm2_output_info_get(edata->output, NULL, NULL, &mw, &mh, NULL); 1093 ecore_drm2_output_info_get(edata->output, NULL, NULL, &mw, &mh, NULL);
1098 1094