From cac667e402aebcbd2cc520770a2e7f88b52e6801 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 25 Aug 2017 10:47:56 -0700 Subject: [PATCH] evas: do not loose tile size when resizing output. --- .../engines/software_generic/Evas_Engine_Software_Generic.h | 10 ++++++++-- src/modules/evas/engines/software_generic/evas_engine.c | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h index 5db2a94..01751a2 100644 --- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h +++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h @@ -71,6 +71,10 @@ struct _Render_Output_Software_Generic unsigned int w, h; + struct { + unsigned int w, h; + } tile; + Render_Engine_Swap_Mode swap_mode; Render_Engine_Merge_Mode merge_mode; @@ -125,11 +129,13 @@ evas_render_engine_software_generic_init(Render_Output_Software_Generic *re, re->lost_back = 0; re->tile_strict = 0; + re->tile.w = TILESIZE; + re->tile.h = TILESIZE; re->tb = evas_common_tilebuf_new(w, h); if (!re->tb) return EINA_FALSE; /* in preliminary tests 16x16 gave highest framerates */ - evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h); return EINA_TRUE; } @@ -175,7 +181,7 @@ evas_render_engine_software_generic_update(Render_Output_Software_Generic *re, evas_common_tilebuf_free(re->tb); re->tb = evas_common_tilebuf_new(w, h); if (!re->tb) return EINA_FALSE; - evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE); + evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h); evas_render_engine_software_generic_tile_strict_set(re, re->tile_strict); return EINA_TRUE; } diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index 4362d2d..a97e14a 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -3922,6 +3922,8 @@ eng_output_tile_size_set(void *engine EINA_UNUSED, void *data, int w, int h) Render_Output_Software_Generic *re; re = (Render_Output_Software_Generic *)data; + re->tile.w = w; + re->tile.h = h; evas_common_tilebuf_set_tile_size(re->tb, w, h); } -- 2.7.4