From 4c61ec5e054ade6d025d4922e75ad49115416bcf Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 11 Apr 2016 15:12:29 -0500 Subject: [PATCH] wayland_shm: Remove unused dx, dy params from resize functions We don't appear to actually use these for anything except long term storage --- .../evas/engines/wayland_shm/evas_engine.c | 21 ++----------------- .../evas/engines/wayland_shm/evas_engine.h | 4 ++-- .../evas/engines/wayland_shm/evas_outbuf.c | 6 +++--- .../evas/engines/wayland_shm/evas_shm.c | 7 +------ 4 files changed, 8 insertions(+), 30 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c b/src/modules/evas/engines/wayland_shm/evas_engine.c index d21e35ac30..702566a6b1 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.c +++ b/src/modules/evas/engines/wayland_shm/evas_engine.c @@ -25,7 +25,7 @@ struct _Render_Engine { Render_Engine_Software_Generic generic; - void (*outbuf_reconfigure)(Outbuf *ob, int x, int y, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize); + void (*outbuf_reconfigure)(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize); }; /* LOCAL FUNCTIONS */ @@ -227,7 +227,6 @@ eng_output_resize(void *data, int w, int h) { Render_Engine *re; Evas_Engine_Info_Wayland_Shm *einfo; - int dx = 0, dy = 0; Eina_Bool resize = EINA_FALSE; LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -235,25 +234,9 @@ eng_output_resize(void *data, int w, int h) if (!(re = (Render_Engine *)data)) return; if (!(einfo = re->generic.ob->info)) return; - if (einfo->info.edges & 4) // resize from left - { - if ((einfo->info.rotation == 90) || (einfo->info.rotation == 270)) - dx = re->generic.ob->h - h; - else - dx = re->generic.ob->w - w; - } - - if (einfo->info.edges & 1) // resize from top - { - if ((einfo->info.rotation == 90) || (einfo->info.rotation == 270)) - dy = re->generic.ob->w - w; - else - dy = re->generic.ob->h - h; - } - if (einfo->info.edges) resize = EINA_TRUE; - re->outbuf_reconfigure(re->generic.ob, dx, dy, w, h, + re->outbuf_reconfigure(re->generic.ob, w, h, einfo->info.rotation, einfo->info.depth, einfo->info.destination_alpha, resize); diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h b/src/modules/evas/engines/wayland_shm/evas_engine.h index 3e2e59aa35..7a2a1865c8 100644 --- a/src/modules/evas/engines/wayland_shm/evas_engine.h +++ b/src/modules/evas/engines/wayland_shm/evas_engine.h @@ -118,7 +118,7 @@ struct _Outbuf Surface *_evas_shm_surface_create(struct wl_display *disp, struct wl_shm *shm, struct wl_surface *surface, int w, int h, int num_buff, Eina_Bool alpha, int compositor_version); void _evas_shm_surface_destroy(Surface *surface); -void _evas_shm_surface_reconfigure(Surface *surface, int dx, int dy, int w, int h, int num_buff, uint32_t flags); +void _evas_shm_surface_reconfigure(Surface *surface, int w, int h, int num_buff, uint32_t flags); void *_evas_shm_surface_data_get(Surface *surface, int *w, int *h); int _evas_shm_surface_assign(Surface *surface); void _evas_shm_surface_post(Surface *surface, Eina_Rectangle *rects, unsigned int count); @@ -130,7 +130,7 @@ void _evas_outbuf_idle_flush(Outbuf *ob); Render_Engine_Swap_Mode _evas_outbuf_swap_mode_get(Outbuf *ob); int _evas_outbuf_rotation_get(Outbuf *ob); -void _evas_outbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize); +void _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize); void *_evas_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch); void _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h); void _evas_outbuf_update_region_free(Outbuf *ob, RGBA_Image *update); diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c b/src/modules/evas/engines/wayland_shm/evas_outbuf.c index f78fc8fcff..affcf334e5 100644 --- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c @@ -287,7 +287,7 @@ _evas_outbuf_rotation_get(Outbuf *ob) } void -_evas_outbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize) +_evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize) { LOGFN(__FILE__, __LINE__, __FUNCTION__); @@ -308,12 +308,12 @@ _evas_outbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, int rot, Outbuf if ((ob->rotation == 0) || (ob->rotation == 180)) { - _evas_shm_surface_reconfigure(ob->surface, x, y, w, h, + _evas_shm_surface_reconfigure(ob->surface, w, h, ob->num_buff, resize); } else if ((ob->rotation == 90) || (ob->rotation == 270)) { - _evas_shm_surface_reconfigure(ob->surface, x, y, h, w, + _evas_shm_surface_reconfigure(ob->surface, h, w, ob->num_buff, resize); } diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index 3ea3da971f..59aa47e647 100644 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -65,7 +65,6 @@ struct _Shm_Surface struct wl_shm *shm; struct wl_surface *surface; int w, h; - int dx, dy; int num_buff; int compositor_version; @@ -409,8 +408,6 @@ _evas_shm_surface_create(struct wl_display *disp, struct wl_shm *shm, struct wl_ s->type = SURFACE_SHM; surf = s->surf.shm; - surf->dx = 0; - surf->dy = 0; surf->w = w; surf->h = h; surf->disp = disp; @@ -454,7 +451,7 @@ _evas_shm_surface_destroy(Surface *surface) } void -_evas_shm_surface_reconfigure(Surface *s, int dx, int dy, int w, int h, int num_buff, uint32_t flags) +_evas_shm_surface_reconfigure(Surface *s, int w, int h, int num_buff, uint32_t flags) { Shm_Surface *surface; int i = 0, resize = 0; @@ -479,8 +476,6 @@ _evas_shm_surface_reconfigure(Surface *s, int dx, int dy, int w, int h, int num_ surface->w = w; surface->h = h; - surface->dx = dx; - surface->dy = dy; surface->num_buff = num_buff; for (i = 0; i < surface->num_buff; i++)