summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-09-19 11:51:30 -0400
committerChris Michael <cp.michael@samsung.com>2017-09-19 13:10:27 -0400
commit8a516c4d4fabf2e0f04acbe3f79a09c3eca174a3 (patch)
treeaf1de6fc6b73970a2954c398c25b267cb8d3b566
parentbd2588e72fb43c626398bcf04c15831d5c768fec (diff)
evas-drm: Override eng_output_resize function
This patch provides an override in the evas drm engine for the output resize function. We override this function so that we can reconfigure the output buffer. ref T5999 Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/evas/engines/drm/evas_engine.c29
-rw-r--r--src/modules/evas/engines/drm/evas_engine.h2
2 files changed, 28 insertions, 3 deletions
diff --git a/src/modules/evas/engines/drm/evas_engine.c b/src/modules/evas/engines/drm/evas_engine.c
index 5cbd5e14ba..c4dbe48bee 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -49,6 +49,10 @@ eng_output_setup(void *engine, void *einfo, unsigned int w, unsigned int h)
49 ob->w, ob->h)) 49 ob->w, ob->h))
50 goto init_err; 50 goto init_err;
51 51
52 evas_render_engine_software_generic_merge_mode_set(&re->generic);
53
54 re->generic.ob->info = einfo;
55
52 return re; 56 return re;
53 57
54init_err: 58init_err:
@@ -66,15 +70,33 @@ eng_output_info_setup(void *info)
66 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING; 70 einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
67} 71}
68 72
69static int 73static void
70eng_output_update(void *engine EINA_UNUSED, void *data, void *einfo, unsigned int w, unsigned int h) 74eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h)
71{ 75{
72 Evas_Engine_Info_Drm *info = einfo;
73 Render_Engine *re = data; 76 Render_Engine *re = data;
77 Evas_Engine_Info_Drm *info;
78
79 info = re->generic.ob->info;
80 if (!info) return;
74 81
75 _outbuf_reconfigure(re->generic.ob, w, h, 82 _outbuf_reconfigure(re->generic.ob, w, h,
76 info->info.rotation, info->info.depth); 83 info->info.rotation, info->info.depth);
77 84
85 evas_common_tilebuf_free(re->generic.tb);
86 if ((re->generic.tb = evas_common_tilebuf_new(w, h)))
87 evas_common_tilebuf_set_tile_size(re->generic.tb, TILESIZE, TILESIZE);
88
89 re->generic.w = w;
90 re->generic.h = h;
91}
92
93static int
94eng_output_update(void *engine, void *data, void *einfo EINA_UNUSED, unsigned int w, unsigned int h)
95{
96 Render_Engine *re = data;
97
98 eng_output_resize(engine, data, w, h);
99
78 evas_render_engine_software_generic_update(&re->generic, 100 evas_render_engine_software_generic_update(&re->generic,
79 re->generic.ob, w, h); 101 re->generic.ob, w, h);
80 102
@@ -227,6 +249,7 @@ module_open(Evas_Module *em)
227 ORD(output_setup); 249 ORD(output_setup);
228 ORD(output_update); 250 ORD(output_update);
229 ORD(output_free); 251 ORD(output_free);
252 ORD(output_resize);
230 ORD(image_plane_assign); 253 ORD(image_plane_assign);
231 ORD(image_plane_release); 254 ORD(image_plane_release);
232 255
diff --git a/src/modules/evas/engines/drm/evas_engine.h b/src/modules/evas/engines/drm/evas_engine.h
index 9891945781..5faf32b8f1 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -56,6 +56,8 @@ struct _Outbuf
56 int w, h, bpp, rotation; 56 int w, h, bpp, rotation;
57 unsigned int depth, format; 57 unsigned int depth, format;
58 58
59 Evas_Engine_Info_Drm *info;
60
59 struct 61 struct
60 { 62 {
61 int num; 63 int num;