make e_comp_wl_surface_attach static and take a surface state
when attaching a buffer, it's necessary to have the state available in order to pull the buffer data into the state for use during commit fixes subsurface frame callbacks
This commit is contained in:
parent
83777909b2
commit
1313f64aa9
|
@ -1027,6 +1027,18 @@ _e_comp_wl_surface_state_buffer_set(E_Comp_Wl_Surface_State *state, E_Comp_Wl_Bu
|
|||
&state->buffer_destroy_listener);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_surface_state_attach(E_Client *ec, E_Comp_Wl_Surface_State *state)
|
||||
{
|
||||
/* set usable early because shell module checks this */
|
||||
e_pixmap_usable_set(ec->pixmap, (state->buffer != NULL));
|
||||
e_pixmap_resource_set(ec->pixmap, state->buffer);
|
||||
e_pixmap_dirty(ec->pixmap);
|
||||
e_pixmap_refresh(ec->pixmap);
|
||||
|
||||
_e_comp_wl_surface_state_size_update(ec, state);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
|
||||
{
|
||||
|
@ -1039,7 +1051,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
|
|||
ignored = ec->ignored;
|
||||
|
||||
if (state->new_attach)
|
||||
e_comp_wl_surface_attach(ec, state->buffer);
|
||||
_e_comp_wl_surface_state_attach(ec, state);
|
||||
|
||||
_e_comp_wl_surface_state_buffer_set(state, NULL);
|
||||
|
||||
|
@ -2821,18 +2833,6 @@ e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id)
|
|||
return ret;
|
||||
}
|
||||
|
||||
EINTERN void
|
||||
e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer)
|
||||
{
|
||||
/* set usable early because shell module checks this */
|
||||
e_pixmap_usable_set(ec->pixmap, (buffer != NULL));
|
||||
e_pixmap_resource_set(ec->pixmap, buffer);
|
||||
e_pixmap_dirty(ec->pixmap);
|
||||
e_pixmap_refresh(ec->pixmap);
|
||||
|
||||
_e_comp_wl_surface_state_size_update(ec, &ec->comp_data->pending);
|
||||
}
|
||||
|
||||
EINTERN Eina_Bool
|
||||
e_comp_wl_surface_commit(E_Client *ec)
|
||||
{
|
||||
|
|
|
@ -328,7 +328,6 @@ EINTERN void e_comp_wl_shutdown(void);
|
|||
|
||||
EINTERN struct wl_resource *e_comp_wl_surface_create(struct wl_client *client, int version, uint32_t id);
|
||||
EINTERN void e_comp_wl_surface_destroy(struct wl_resource *resource);
|
||||
EINTERN void e_comp_wl_surface_attach(E_Client *ec, E_Comp_Wl_Buffer *buffer);
|
||||
EINTERN Eina_Bool e_comp_wl_surface_commit(E_Client *ec);
|
||||
EINTERN Eina_Bool e_comp_wl_subsurface_commit(E_Client *ec);
|
||||
EINTERN void e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buffer *buffer);
|
||||
|
|
Loading…
Reference in New Issue