aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/evas/engines/wayland_shm/evas_engine.c
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-18 14:31:17 -0300
committerRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-19 10:18:03 -0300
commitdc0d88df9cd12839c2cd2c931e3510a2478ca59d (patch)
treeb589272d7019202353a5edd3d10a6df524d6783a /src/modules/evas/engines/wayland_shm/evas_engine.c
parentcf67e69b50698acf16e10004af0c8432d1c366d1 (diff)
downloadefl-dc0d88df9cd12839c2cd2c931e3510a2478ca59d.tar.gz
efl-dc0d88df9cd12839c2cd2c931e3510a2478ca59d.tar.xz
efl-dc0d88df9cd12839c2cd2c931e3510a2478ca59d.zip
ecore_evas/wayland_shm: Fixed window resize.
Using the server_allocation/allocation to determine the resize offset was not completely precise, and causing the window to not always resize correctly. Additionally, calling evas_engine_info_set() on every resize step caused the window content to blink and resize very slow, because the swap buffer, swapper, and everything were being destroyed and recreated. Now only the swapbuf_reconfigure is being called during the resize, which is way faster.
Diffstat (limited to 'src/modules/evas/engines/wayland_shm/evas_engine.c')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_engine.c41
1 files changed, 26 insertions, 15 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c
index f6fc17e97..4c5802d91 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -9,6 +9,7 @@ typedef struct _Render_Engine Render_Engine;
struct _Render_Engine
{
+ Evas_Engine_Info_Wayland_Shm *info;
Outbuf *ob;
Tilebuf *tb;
@@ -237,13 +238,14 @@ eng_setup(Evas *eo_evas, void *einfo)
}
if (!(re =
- _output_engine_setup(info->info.edges.x, info->info.edges.y,
- epd->output.w, epd->output.h,
- info->info.rotation, info->info.depth,
- info->info.destination_alpha,
- info->info.wl_shm, info->info.wl_surface,
+ _output_engine_setup(0, 0,
+ epd->output.w, epd->output.h,
+ info->info.rotation, info->info.depth,
+ info->info.destination_alpha,
+ info->info.wl_shm, info->info.wl_surface,
try_swap)))
return 0;
+ re->info = info;
}
else
@@ -255,13 +257,13 @@ eng_setup(Evas *eo_evas, void *einfo)
/* we have an existing render engine */
if (re->ob) re->outbuf_free(re->ob);
- if ((re->ob = evas_swapbuf_setup(info->info.edges.x,
- info->info.edges.y,
- epd->output.w, epd->output.h,
- info->info.rotation,
- info->info.depth,
- info->info.destination_alpha,
- info->info.wl_shm,
+ if ((re->ob = evas_swapbuf_setup(0,
+ 0,
+ epd->output.w, epd->output.h,
+ info->info.rotation,
+ info->info.depth,
+ info->info.destination_alpha,
+ info->info.wl_shm,
info->info.wl_surface)))
{
re->outbuf_free = evas_swapbuf_free;
@@ -320,14 +322,23 @@ static void
eng_output_resize(void *data, int w, int h)
{
Render_Engine *re;
+ Evas_Engine_Info_Wayland_Shm *info;
+ int dx = 0, dy = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(re = (Render_Engine *)data)) return;
- re->outbuf_reconfigure(re->ob, re->ob->x, re->ob->y, w, h,
- re->ob->rotation, re->ob->depth,
- re->ob->priv.destination_alpha);
+ if (!(info = re->info)) return;
+
+ if (info->info.edges & 4)
+ dx = re->ob->w - w;
+ if (info->info.edges & 1)
+ dy = re->ob->h - h;
+
+ re->outbuf_reconfigure(re->ob, dx, dy, w, h,
+ info->info.rotation, info->info.depth,
+ info->info.destination_alpha);
evas_common_tilebuf_free(re->tb);
if ((re->tb = evas_common_tilebuf_new(w, h)))
evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);