derekf pushed a commit to branch master.

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

commit dd5edfae03f23d45126404d3b459e0abbd94a54c
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu Nov 30 12:20:01 2017 -0600

    wayland_shm: Rename all the evas_dmabuf functions
    
    These are going to find a home in ecore_wl2, and this is the last
    step before moving them all over there.
---
 src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 47 ++++++++++++----------
 src/modules/evas/engines/wayland_shm/evas_engine.h | 17 ++++----
 src/modules/evas/engines/wayland_shm/evas_outbuf.c | 18 ++++-----
 3 files changed, 43 insertions(+), 39 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c 
b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 77df4a7eb5..bd4eb5ebd0 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -7,8 +7,8 @@
 
 #include "linux-dmabuf-unstable-v1-client-protocol.h"
 
-typedef struct _Surface Surface;
-struct _Surface
+typedef struct _Ecore_Wl2_Surface Ecore_Wl2_Surface;
+struct _Ecore_Wl2_Surface
 {
    Ecore_Wl2_Window *wl2_win;
    Ecore_Wl2_Buffer *current;
@@ -18,16 +18,16 @@ struct _Surface
    Eina_Bool alpha : 1;
    struct
      {
-        void (*destroy)(Surface *surface);
-        void (*reconfigure)(Surface *surface, int w, int h, uint32_t flags, 
Eina_Bool force);
-        void *(*data_get)(Surface *surface, int *w, int *h);
-        int  (*assign)(Surface *surface);
-        void (*post)(Surface *surface, Eina_Rectangle *rects, unsigned int 
count);
+        void (*destroy)(Ecore_Wl2_Surface *surface);
+        void (*reconfigure)(Ecore_Wl2_Surface *surface, int w, int h, uint32_t 
flags, Eina_Bool force);
+        void *(*data_get)(Ecore_Wl2_Surface *surface, int *w, int *h);
+        int  (*assign)(Ecore_Wl2_Surface *surface);
+        void (*post)(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, 
unsigned int count);
      } funcs;
 };
 
 static void
-_evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, uint32_t flags 
EINA_UNUSED, Eina_Bool force)
+_evas_dmabuf_surface_reconfigure(Ecore_Wl2_Surface *s, int w, int h, uint32_t 
flags EINA_UNUSED, Eina_Bool force)
 {
    Ecore_Wl2_Buffer *b;
    Eina_List *l, *tmp;
@@ -51,7 +51,7 @@ _evas_dmabuf_surface_reconfigure(Surface *s, int w, int h, 
uint32_t flags EINA_U
 }
 
 static void *
-_evas_dmabuf_surface_data_get(Surface *s, int *w, int *h)
+_evas_dmabuf_surface_data_get(Ecore_Wl2_Surface *s, int *w, int *h)
 {
    Ecore_Wl2_Buffer *b;
    void *ptr;
@@ -76,7 +76,7 @@ _evas_dmabuf_surface_data_get(Surface *s, int *w, int *h)
 }
 
 static Ecore_Wl2_Buffer *
-_evas_dmabuf_surface_wait(Surface *s)
+_evas_dmabuf_surface_wait(Ecore_Wl2_Surface *s)
 {
    Ecore_Wl2_Buffer *b, *best = NULL;
    Eina_List *l;
@@ -108,7 +108,7 @@ _evas_dmabuf_surface_wait(Surface *s)
 }
 
 static int
-_evas_dmabuf_surface_assign(Surface *s)
+_evas_dmabuf_surface_assign(Ecore_Wl2_Surface *s)
 {
    Ecore_Wl2_Buffer *b;
    Eina_List *l;
@@ -133,7 +133,7 @@ _evas_dmabuf_surface_assign(Surface *s)
 }
 
 static void
-_evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int 
count)
+_evas_dmabuf_surface_post(Ecore_Wl2_Surface *s, Eina_Rectangle *rects, 
unsigned int count)
 {
    Ecore_Wl2_Buffer *b;
 
@@ -153,7 +153,7 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle 
*rects, unsigned int count)
 }
 
 static void
-_evas_dmabuf_surface_destroy(Surface *s)
+_evas_dmabuf_surface_destroy(Ecore_Wl2_Surface *s)
 {
    Ecore_Wl2_Buffer *b;
 
@@ -165,45 +165,50 @@ _evas_dmabuf_surface_destroy(Surface *s)
    free(s);
 }
 
-void surface_destroy(Surface *surface)
+void
+ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface)
 {
    EINA_SAFETY_ON_NULL_RETURN(surface);
 
    surface->funcs.destroy(surface);
 }
 
-void surface_reconfigure(Surface *surface, int w, int h, uint32_t flags, 
Eina_Bool force)
+void
+ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, 
uint32_t flags, Eina_Bool force)
 {
    EINA_SAFETY_ON_NULL_RETURN(surface);
 
    surface->funcs.reconfigure(surface, w, h, flags, force);
 }
 
-void *surface_data_get(Surface *surface, int *w, int *h)
+void *
+ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
 
    return surface->funcs.data_get(surface, w, h);
 }
 
-int surface_assign(Surface *surface)
+int
+ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(surface, 0);
 
    return surface->funcs.assign(surface);
 }
 
-void surface_post(Surface *surface, Eina_Rectangle *rects, unsigned int count)
+void
+ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, 
unsigned int count)
 {
    EINA_SAFETY_ON_NULL_RETURN(surface);
 
    surface->funcs.post(surface, rects, count);
 }
 
-Surface *
-_evas_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha)
+Ecore_Wl2_Surface *
+ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha)
 {
-   Surface *out;
+   Ecore_Wl2_Surface *out;
    Ecore_Wl2_Display *ewd;
    Ecore_Wl2_Buffer_Type types = 0;
 
diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.h 
b/src/modules/evas/engines/wayland_shm/evas_engine.h
index d18fbc32fc..25ce2f35dc 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.h
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.h
@@ -71,7 +71,7 @@ extern int _evas_engine_way_shm_log_dom;
 
 # define MAX_BUFFERS 4
 
-typedef struct _Surface Surface;
+typedef struct _Ecore_Wl2_Surface Ecore_Wl2_Surface;
 
 struct _Outbuf
 {
@@ -83,7 +83,7 @@ struct _Outbuf
    Ecore_Wl2_Display *ewd;
    Evas_Engine_Info_Wayland *info;
 
-   Surface *surface;
+   Ecore_Wl2_Surface *surface;
 
    struct 
      {
@@ -107,8 +107,6 @@ struct _Outbuf
    Eina_Bool dirty : 1;
 };
 
-Surface *_evas_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha);
-
 Outbuf *_evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland *info);
 void _evas_outbuf_free(Outbuf *ob);
 void _evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect 
*buffer_damage, Evas_Render_Mode render_mode);
@@ -121,11 +119,12 @@ void *_evas_outbuf_update_region_new(Outbuf *ob, int x, 
int y, int w, int h, int
 void _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, 
int y, int w, int h);
 void _evas_outbuf_redraws_clear(Outbuf *ob);
 
-void surface_destroy(Surface *surface);
-void surface_reconfigure(Surface *surface, int w, int h, uint32_t flags, 
Eina_Bool force);
-void *surface_data_get(Surface *surface, int *w, int *h);
-int  surface_assign(Surface *surface);
-void surface_post(Surface *surface, Eina_Rectangle *rects, unsigned int count);
+Ecore_Wl2_Surface *ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool 
alpha);
+void ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface);
+void ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h, 
uint32_t flags, Eina_Bool force);
+void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h);
+int  ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface);
+void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, 
unsigned int count);
 
 
 #endif
diff --git a/src/modules/evas/engines/wayland_shm/evas_outbuf.c 
b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
index 8b099a1e88..f5d32bb3dc 100644
--- a/src/modules/evas/engines/wayland_shm/evas_outbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_outbuf.c
@@ -28,8 +28,8 @@ _evas_outbuf_setup(int w, int h, Evas_Engine_Info_Wayland 
*info)
    ob->priv.destination_alpha = info->info.destination_alpha;
    ob->ewd = ecore_wl2_window_display_get(info->info.wl2_win);
 
-   ob->surface = _evas_surface_create(info->info.wl2_win,
-                                      ob->priv.destination_alpha);
+   ob->surface = ecore_wl2_surface_create(info->info.wl2_win,
+                                          ob->priv.destination_alpha);
    if (!ob->surface) goto surf_err;
 
    eina_array_step_set(&ob->priv.onebuf_regions, sizeof(Eina_Array), 8);
@@ -70,7 +70,7 @@ _evas_outbuf_free(Outbuf *ob)
    _evas_outbuf_flush(ob, NULL, NULL, EVAS_RENDER_MODE_UNDEF);
    _evas_outbuf_idle_flush(ob);
 
-   if (ob->surface) surface_destroy(ob->surface);
+   if (ob->surface) ecore_wl2_surface_destroy(ob->surface);
 
    eina_array_flush(&ob->priv.onebuf_regions);
 
@@ -244,7 +244,7 @@ _evas_outbuf_swap_mode_get(Outbuf *ob)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   age = surface_assign(ob->surface);
+   age = ecore_wl2_surface_assign(ob->surface);
    if (!age) return MODE_FULL;
 
    else if (age == 1) return MODE_COPY;
@@ -290,11 +290,11 @@ _evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int 
rot, Outbuf_Depth depth,
 
    if ((ob->rotation == 0) || (ob->rotation == 180))
      {
-        surface_reconfigure(ob->surface, w, h, resize, dirty);
+        ecore_wl2_surface_reconfigure(ob->surface, w, h, resize, dirty);
      }
    else if ((ob->rotation == 90) || (ob->rotation == 270))
      {
-        surface_reconfigure(ob->surface, h, w, resize, dirty);
+        ecore_wl2_surface_reconfigure(ob->surface, h, w, resize, dirty);
      }
 
    _evas_outbuf_idle_flush(ob);
@@ -318,7 +318,7 @@ _evas_outbuf_update_region_new(Outbuf *ob, int x, int y, 
int w, int h, int *cx,
              int bw = 0, bh = 0;
              void *data;
 
-             if (!(data = surface_data_get(ob->surface, &bw, &bh)))
+             if (!(data = ecore_wl2_surface_data_get(ob->surface, &bw, &bh)))
                {
                   /* ERR("Could not get surface data"); */
                   return NULL;
@@ -494,7 +494,7 @@ _evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image 
*update, int x, int y, in
    bpp = depth / 8;
 
    /* check for valid desination data */
-   if (!(dst = surface_data_get(ob->surface, &ww, &hh)))
+   if (!(dst = ecore_wl2_surface_data_get(ob->surface, &ww, &hh)))
      {
         /* ERR("Could not get surface data"); */
         return;
@@ -552,7 +552,7 @@ _evas_outbuf_redraws_clear(Outbuf *ob)
    if (!ob->priv.rect_count) return;
    wls = ecore_wl2_window_surface_get(ob->info->info.wl2_win);
    if (wls)
-     surface_post(ob->surface, ob->priv.rects, ob->priv.rect_count);
+     ecore_wl2_surface_post(ob->surface, ob->priv.rects, ob->priv.rect_count);
    free(ob->priv.rects);
    ob->priv.rect_count = 0;
 }

-- 


Reply via email to