summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:49:42 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:49:42 -0700
commit1626b5b8cdb0457c70ba90b216f475a366ccb256 (patch)
treed0eb4966e59b500dc72a6280582597df30003d09 /src/modules
parentaa88a4f6ab06fd68da44d74121a8f4a6af58ebdd (diff)
evas: refactor ddraw engine to have less useless indirection function call.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/software_ddraw/evas_engine.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c b/src/modules/evas/engines/software_ddraw/evas_engine.c
index 56bf3de..a935922 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.c
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.c
@@ -18,26 +18,26 @@ struct _Render_Engine
18/* log domain variable */ 18/* log domain variable */
19int _evas_log_dom_module = -1; 19int _evas_log_dom_module = -1;
20 20
21/* engine api this module provides */
22
21static void * 23static void *
22_output_setup(int width, 24eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h)
23 int height,
24 int rot,
25 HWND window,
26 int depth,
27 int fullscreen)
28{ 25{
26 Evas_Engine_Info_Software_DDraw *info = in;
29 Render_Engine *re; 27 Render_Engine *re;
30 Outbuf *ob; 28 Outbuf *ob;
31 29
32 re = calloc(1, sizeof(Render_Engine)); 30 re = calloc(1, sizeof(Render_Engine));
33 if (!re) 31 if (!re) return NULL;
34 return NULL;
35 32
36 evas_software_ddraw_outbuf_init(); 33 evas_software_ddraw_outbuf_init();
37 34
38 ob = evas_software_ddraw_outbuf_setup(width, height, rot, 35 ob = evas_software_ddraw_outbuf_setup(w, h,
36 info->info.rotation,
39 OUTBUF_DEPTH_INHERIT, 37 OUTBUF_DEPTH_INHERIT,
40 window, depth, fullscreen); 38 info->info.window,
39 info->info.depth,
40 info->info.fullscreen);
41 if (!ob) goto on_error; 41 if (!ob) goto on_error;
42 42
43 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL, 43 if (!evas_render_engine_software_generic_init(&re->generic, ob, NULL,
@@ -52,7 +52,7 @@ _output_setup(int width,
52 evas_software_ddraw_outbuf_flush, 52 evas_software_ddraw_outbuf_flush,
53 NULL, 53 NULL,
54 evas_software_ddraw_outbuf_free, 54 evas_software_ddraw_outbuf_free,
55 width, height)) 55 w, h))
56 goto on_error; 56 goto on_error;
57 57
58 return re; 58 return re;
@@ -63,8 +63,6 @@ _output_setup(int width,
63 return NULL; 63 return NULL;
64} 64}
65 65
66
67/* engine api this module provides */
68static void 66static void
69eng_output_info_setup(void *info) 67eng_output_info_setup(void *info)
70{ 68{
@@ -73,18 +71,6 @@ eng_output_info_setup(void *info)
73 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING; 71 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
74} 72}
75 73
76static void *
77eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned int h)
78{
79 Evas_Engine_Info_Software_DDraw *info = in;
80
81 return _output_setup(w, h,
82 info->info.rotation,
83 info->info.window,
84 info->info.depth,
85 info->info.fullscreen);
86}
87
88static void 74static void
89eng_output_free(void *engine EINA_UNUSED, void *data) 75eng_output_free(void *engine EINA_UNUSED, void *data)
90{ 76{