discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8635f56aeb5d98c7de204b6a1a0c3a9b54af77f3

commit 8635f56aeb5d98c7de204b6a1a0c3a9b54af77f3
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Apr 15 10:32:29 2016 -0500

    wayland_shm: pass engine info to shm_surface_create
    
    Gratuitous change to pass less parameters and make some code prettier.
---
 src/modules/evas/engines/wayland_shm/evas_engine.h |  2 +-
 src/modules/evas/engines/wayland_shm/evas_outbuf.c |  7 +------
 src/modules/evas/engines/wayland_shm/evas_shm.c    | 12 ++++++------
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h 
b/src/modules/evas/engines/wayland_shm/evas_engine.h
index 6b3f56e..2441c13 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -125,7 +125,7 @@ struct _Outbuf
      } priv;
 };
 
-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);
+Surface *_evas_shm_surface_create(Evas_Engine_Info_Wayland_Shm *info, int w, 
int h, int num_buff);
 
 Outbuf *_evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland_Shm *info);
 void _evas_outbuf_free(Outbuf *ob);
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index f68901a..b9a472c 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -57,12 +57,7 @@ _evas_outbuf_setup(int w, int h, 
Evas_Engine_Info_Wayland_Shm *info)
      }
    else goto unhandled_rotation;
 
-   ob->surface = _evas_shm_surface_create(info->info.wl_disp,
-                                          info->info.wl_shm,
-                                          info->info.wl_surface,
-                                          sw, sh, ob->num_buff,
-                                          info->info.destination_alpha,
-                                          info->info.compositor_version);
+   ob->surface = _evas_shm_surface_create(info, sw, sh, ob->num_buff);
    if (!ob->surface) goto surf_err;
 
 unhandled_rotation:
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c 
b/src/modules/evas/engines/wayland_shm/evas_shm.c
index d2c02f5..f716865 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -569,7 +569,7 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, 
unsigned int count)
 }
 
 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)
+_evas_shm_surface_create(Evas_Engine_Info_Wayland_Shm *info, int w, int h, int 
num_buff)
 {
    Surface *s;
    Shm_Surface *surf;
@@ -584,12 +584,12 @@ _evas_shm_surface_create(struct wl_display *disp, struct 
wl_shm *shm, struct wl_
 
    surf->w = w;
    surf->h = h;
-   surf->disp = disp;
-   surf->shm = shm;
-   surf->surface = surface;
+   surf->disp = info->info.wl_disp;
+   surf->shm = info->info.wl_shm;
+   surf->surface = info->info.wl_surface;
    surf->num_buff = num_buff;
-   surf->alpha = alpha;
-   surf->compositor_version = compositor_version;
+   surf->alpha = info->info.destination_alpha;
+   surf->compositor_version = info->info.compositor_version;
 
    /* create surface buffers */
    for (; i < surf->num_buff; i++)

-- 


Reply via email to