struct _E_Pixmap
{
unsigned int refcount;
- unsigned int failures;
E_Client *client;
E_Pixmap_Type type;
if (!cp->usable)
{
- cp->failures++;
return EINA_FALSE;
}
if (!cp->dirty) return EINA_TRUE;
if (success)
{
cp->dirty = 0;
- cp->failures = 0;
}
- else
- cp->failures++;
return success;
}
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)
{
if (!cp->buffer_ref.buffer) return;
}
- cp->failures = 0;
if (cache)
{
E_Comp_Wl_Client_Data *cd;
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)
{
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);
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);
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);