summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:49:23 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:49:23 -0700
commit8c16402a2c5ee757a2202f3cfd87d4a87f95dea5 (patch)
tree632479a7387515a1cb71672ea85c1ff5d56550a1 /src/modules
parent93531868c729aa3e12cedeade67dbbd7d1c50c5d (diff)
evas: refactor fb engine to have less useless function redirection.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/fb/evas_engine.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/modules/evas/engines/fb/evas_engine.c b/src/modules/evas/engines/fb/evas_engine.c
index 227e511..635d1ae 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -16,21 +16,26 @@ static Evas_Func func, pfunc;
16/* engine struct data */ 16/* engine struct data */
17typedef Render_Output_Software_Generic Render_Engine; 17typedef Render_Output_Software_Generic Render_Engine;
18 18
19/* internal engine routines */ 19/* engine api this module provides */
20static void * 20static void *
21_output_setup(int w, int h, int rot, int vt, int dev, int refresh) 21eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h)
22{ 22{
23 Evas_Engine_Info_FB *info = in;
23 Render_Engine *re; 24 Render_Engine *re;
24 Outbuf *ob; 25 Outbuf *ob;
25 26
26 re = calloc(1, sizeof(Render_Engine)); 27 re = calloc(1, sizeof(Render_Engine));
27 if (!re) 28 if (!re) return NULL;
28 return NULL;
29 29
30 evas_fb_outbuf_fb_init(); 30 evas_fb_outbuf_fb_init();
31 31
32 /* get any stored performance metrics from device */ 32 /* get any stored performance metrics from device */
33 ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, refresh); 33 ob = evas_fb_outbuf_fb_setup_fb(w, h,
34 info->info.rotation,
35 OUTBUF_DEPTH_INHERIT,
36 info->info.virtual_terminal,
37 info->info.device_number,
38 info->info.refresh);
34 if (!ob) goto on_error; 39 if (!ob) goto on_error;
35 40
36 if (!evas_render_engine_software_generic_init(re, ob, NULL, 41 if (!evas_render_engine_software_generic_init(re, ob, NULL,
@@ -60,7 +65,6 @@ _output_setup(int w, int h, int rot, int vt, int dev, int refresh)
60 return NULL; 65 return NULL;
61} 66}
62 67
63/* engine api this module provides */
64static void 68static void
65eng_output_info_setup(void *info) 69eng_output_info_setup(void *info)
66{ 70{
@@ -69,19 +73,6 @@ eng_output_info_setup(void *info)
69 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING; 73 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
70} 74}
71 75
72static void *
73eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h)
74{
75 Evas_Engine_Info_FB *info = in;
76
77 return _output_setup(w,
78 h,
79 info->info.rotation,
80 info->info.virtual_terminal,
81 info->info.device_number,
82 info->info.refresh);
83}
84
85static void 76static void
86eng_output_free(void *engine EINA_UNUSED, void *data) 77eng_output_free(void *engine EINA_UNUSED, void *data)
87{ 78{