pix = e_pixmap_image_data_get(cw->ec->pixmap);
}
+ if ((pix) && ((!cw->blanked) || (cw->obj_mirror)))
+ e_pixmap_image_data_ref(cw->ec->pixmap);
+
/* set pixel data */
evas_object_image_data_set(cw->obj, cw->blanked ? NULL : pix);
_e_comp_object_alpha_set(cw);
E_Comp_Wl_Buffer_Ref buffer_ref;
struct wl_listener buffer_destroy_listener;
void *data;
+ struct wl_shm_buffer *shm_buffer;
struct wl_shm_pool *data_pool;
Eina_Rectangle opaque;
uuid_t uuid;
cp = container_of(listener, E_Pixmap, buffer_destroy_listener);
cp->data = NULL;
+ cp->shm_buffer = NULL;
cp->buffer_destroy_listener.notify = NULL;
}
}
e_comp_wl_buffer_reference(&cp->buffer_ref, NULL);
cp->data = NULL;
+ cp->shm_buffer = NULL;
}
E_API Eina_Bool
}
cp->data = wl_shm_buffer_get_data(shm_buffer);
-
- if (cp->data_pool) wl_shm_pool_unref(cp->data_pool);
- cp->data_pool = wl_shm_buffer_ref_pool(shm_buffer);
+ cp->shm_buffer = shm_buffer;
}
else if (buffer->type == E_COMP_WL_BUFFER_TYPE_NATIVE)
{
cp->h = buffer->h;
cp->image_argb = EINA_FALSE; /* TODO: format */
cp->data = NULL;
+ cp->shm_buffer = NULL;
/* TODO: Current buffer management process doesn't ensure
* to render all committed buffer, it means there are buffers
break;
}
cp->data = NULL;
+ cp->shm_buffer = NULL;
}
else
{
return EINA_FALSE;
}
+E_API void
+e_pixmap_image_data_ref(E_Pixmap *cp)
+{
+ EINA_SAFETY_ON_NULL_RETURN(cp);
+
+ switch (cp->type)
+ {
+ case E_PIXMAP_TYPE_WL:
+ if (cp->shm_buffer)
+ {
+ if (cp->data_pool) wl_shm_pool_unref(cp->data_pool);
+ cp->data_pool = wl_shm_buffer_ref_pool(cp->shm_buffer);
+ }
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
E_API void *
e_pixmap_image_data_get(E_Pixmap *cp)
{
E_API Eina_Bool e_pixmap_image_exists(const E_Pixmap *cp);
E_API Eina_Bool e_pixmap_image_is_argb(const E_Pixmap *cp);
E_API void *e_pixmap_image_data_get(E_Pixmap *cp);
+E_API void e_pixmap_image_data_ref(E_Pixmap *cp);
E_API Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void *ipix, Eina_Rectangle *r, int stride);
E_API void e_pixmap_image_opaque_set(E_Pixmap *cp, int x, int y, int w, int h);