forked from enlightenment/enlightenment
move wl pixmap stuff to use pixmap functions in compositor instead of in pixmap
This commit is contained in:
parent
c87ca3e892
commit
a19957d3eb
|
@ -1466,9 +1466,6 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
|
||||||
|
|
||||||
if (sdata->cached.buffer)
|
if (sdata->cached.buffer)
|
||||||
{
|
{
|
||||||
/* set pixmap resource */
|
|
||||||
e_pixmap_resource_set(ep, sdata->cached.buffer);
|
|
||||||
|
|
||||||
/* mark the pixmap as usable or not */
|
/* mark the pixmap as usable or not */
|
||||||
e_pixmap_usable_set(ep, (sdata->cached.buffer != NULL));
|
e_pixmap_usable_set(ep, (sdata->cached.buffer != NULL));
|
||||||
}
|
}
|
||||||
|
@ -1476,7 +1473,15 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
|
||||||
/* mark the pixmap as dirty */
|
/* mark the pixmap as dirty */
|
||||||
e_pixmap_dirty(ep);
|
e_pixmap_dirty(ep);
|
||||||
|
|
||||||
e_pixmap_refresh(ep);
|
e_pixmap_image_clear(ep, EINA_FALSE);
|
||||||
|
e_pixmap_resource_set(ep, sdata->cached.buffer);
|
||||||
|
|
||||||
|
/* refresh pixmap */
|
||||||
|
if (e_pixmap_refresh(ep))
|
||||||
|
{
|
||||||
|
e_comp->post_updates = eina_list_append(e_comp->post_updates, ec);
|
||||||
|
e_object_ref(E_OBJECT(ec));
|
||||||
|
}
|
||||||
|
|
||||||
/* check for any pending attachments */
|
/* check for any pending attachments */
|
||||||
if (sdata->cached.new_attach)
|
if (sdata->cached.new_attach)
|
||||||
|
@ -2592,6 +2597,9 @@ e_comp_wl_surface_commit(E_Client *ec)
|
||||||
/* mark the pixmap as dirty */
|
/* mark the pixmap as dirty */
|
||||||
e_pixmap_dirty(ep);
|
e_pixmap_dirty(ep);
|
||||||
|
|
||||||
|
e_pixmap_image_clear(ep, EINA_FALSE);
|
||||||
|
e_pixmap_resource_set(ep, ec->comp_data->pending.buffer);
|
||||||
|
|
||||||
/* refresh pixmap */
|
/* refresh pixmap */
|
||||||
if (e_pixmap_refresh(ep))
|
if (e_pixmap_refresh(ep))
|
||||||
{
|
{
|
||||||
|
|
|
@ -436,18 +436,16 @@ e_pixmap_refresh(E_Pixmap *cp)
|
||||||
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
|
||||||
{
|
{
|
||||||
E_Comp_Wl_Client_Data *cd = NULL;
|
E_Comp_Wl_Client_Data *cd = NULL;
|
||||||
struct wl_resource *res = NULL;
|
|
||||||
int pw = 0, ph = 0;
|
int pw = 0, ph = 0;
|
||||||
|
|
||||||
if (cp->client)
|
if (cp->client)
|
||||||
{
|
{
|
||||||
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
|
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
|
||||||
res = cd->pending.buffer;
|
|
||||||
/* pw = cp->client->client.w; */
|
/* pw = cp->client->client.w; */
|
||||||
/* ph = cp->client->client.h; */
|
/* ph = cp->client->client.h; */
|
||||||
}
|
}
|
||||||
|
|
||||||
success = (res != NULL);
|
success = !!cp->resource;
|
||||||
if (!success) break;
|
if (!success) break;
|
||||||
|
|
||||||
if ((cd) && (cd->pending.w) && (cd->pending.h))
|
if ((cd) && (cd->pending.w) && (cd->pending.h))
|
||||||
|
@ -458,16 +456,7 @@ e_pixmap_refresh(E_Pixmap *cp)
|
||||||
|
|
||||||
success = ((pw > 0) && (ph > 0));
|
success = ((pw > 0) && (ph > 0));
|
||||||
if (success)
|
if (success)
|
||||||
{
|
_e_pixmap_update_wl(cp);
|
||||||
/* if (cp->resource) _e_pixmap_resource_free(cp->resource); */
|
|
||||||
e_pixmap_image_clear(cp, EINA_FALSE);
|
|
||||||
cp->resource = res;
|
|
||||||
_e_pixmap_update_wl(cp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (res) _e_pixmap_resource_free(res);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue