From cd649c4e2564bfd67f423e87e749228daaf7bd2e Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 24 May 2023 14:35:00 +0900 Subject: [PATCH] e_pixmap: remove the unused functions Change-Id: Iea67d4309edfa6550ac8507cb18e4ffdf30a0bb4 --- src/bin/e_pixmap.c | 48 ------------------------------------------------ src/bin/e_pixmap.h | 3 --- 2 files changed, 51 deletions(-) diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index 058aa2c..6fefc0e 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -19,7 +19,6 @@ static uint32_t dummy_pixmap_id = 1; // dummy id starts from 1 struct _E_Pixmap { unsigned int refcount; - unsigned int failures; E_Client *client; E_Pixmap_Type type; @@ -460,7 +459,6 @@ e_pixmap_refresh(E_Pixmap *cp) if (!cp->usable) { - cp->failures++; return EINA_FALSE; } if (!cp->dirty) return EINA_TRUE; @@ -490,10 +488,7 @@ e_pixmap_refresh(E_Pixmap *cp) if (success) { cp->dirty = 0; - cp->failures = 0; } - else - cp->failures++; return success; } @@ -535,13 +530,6 @@ e_pixmap_size_get(E_Pixmap *cp, int *w, int *h) return (ec->comp_data->width_from_buffer > 0) && (ec->comp_data->height_from_buffer > 0); } -EINTERN unsigned int -e_pixmap_failures_get(const E_Pixmap *cp) -{ - EINA_SAFETY_ON_NULL_RETURN_VAL(cp, 0); - return cp->failures; -} - EINTERN void e_pixmap_client_set(E_Pixmap *cp, E_Client *ec) { @@ -685,7 +673,6 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache) if (!cp->buffer_ref.buffer) return; } - cp->failures = 0; if (cache) { E_Comp_Wl_Client_Data *cd; @@ -886,41 +873,6 @@ e_pixmap_image_data_get(E_Pixmap *cp) return NULL; } -EINTERN Eina_Bool -e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride) -{ - struct wl_shm_buffer *shm_buffer; - uint32_t format; - int i, x, y; - unsigned int *src, *dst; - - EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE); - EINA_SAFETY_ON_FALSE_RETURN_VAL(cp->type == E_PIXMAP_TYPE_WL, EINA_FALSE); - - if (cp->image_argb) return EINA_TRUE; - if (!cp->buffer_ref.buffer) return EINA_FALSE; - - shm_buffer = cp->buffer_ref.buffer->shm_buffer; - if (!shm_buffer) return EINA_FALSE; - - format = wl_shm_buffer_get_format(shm_buffer); - if (format == WL_SHM_FORMAT_XRGB8888) - { - dst = (unsigned int *)pix; - src = (unsigned int *)ipix; - - for (y = 0; y < r->h; y++) - { - i = (r->y + y) * stride / 4 + r->x; - for (x = 0; x < r->w; x++) - dst[i+x] = 0xff000000 | src[i+x]; - } - pix = (void *)dst; - } - - return EINA_TRUE; -} - EINTERN void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h) { diff --git a/src/bin/e_pixmap.h b/src/bin/e_pixmap.h index 6bcfa9a..11d729c 100644 --- a/src/bin/e_pixmap.h +++ b/src/bin/e_pixmap.h @@ -38,7 +38,6 @@ struct _E_Pixmap_Hook E_API int e_pixmap_free(E_Pixmap *cp); EINTERN void e_pixmap_win_id_del(E_Pixmap *cp); -EINTERN Eina_Bool e_pixmap_is_del(E_Pixmap *cp); E_API E_Pixmap *e_pixmap_ref(E_Pixmap *cp); EINTERN E_Pixmap *e_pixmap_new(E_Pixmap_Type type, ...); E_API E_Pixmap_Type e_pixmap_type_get(const E_Pixmap *cp); @@ -47,7 +46,6 @@ E_API E_Comp_Wl_Client_Data *e_pixmap_cdata_get(E_Pixmap *cp); EINTERN void e_pixmap_cdata_set(E_Pixmap *cp, E_Comp_Wl_Client_Data *cdata); E_API void e_pixmap_resource_set(E_Pixmap *cp, void *resource); EINTERN void e_pixmap_parent_window_set(E_Pixmap *cp, Ecore_Window win); -EINTERN unsigned int e_pixmap_failures_get(const E_Pixmap *cp); EINTERN Eina_Bool e_pixmap_dirty_get(E_Pixmap *cp); EINTERN void e_pixmap_clear(E_Pixmap *cp); EINTERN void e_pixmap_usable_set(E_Pixmap *cp, Eina_Bool set); @@ -71,7 +69,6 @@ EINTERN Eina_Bool e_pixmap_image_exists(const E_Pixmap *cp); EINTERN Eina_Bool e_pixmap_image_is_argb(const E_Pixmap *cp); EINTERN void *e_pixmap_image_data_get(E_Pixmap *cp); EINTERN void e_pixmap_image_data_ref(E_Pixmap *cp); -EINTERN Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride); EINTERN void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h); EINTERN void e_pixmap_image_opaque_get(E_Pixmap *cp, int *x, int *y, int *w, int *h); -- 2.7.4