discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=cdd8d86abe1fbd7c85111417f93c01b1db8c9a14
commit cdd8d86abe1fbd7c85111417f93c01b1db8c9a14 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Thu Dec 10 13:30:18 2015 -0500 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 --- src/bin/e_comp_wl.c | 26 +++++++++++++------------- src/bin/e_comp_wl.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 37939d0..59a2132 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1043,6 +1043,18 @@ _e_comp_wl_surface_state_buffer_set(E_Comp_Wl_Surface_State *state, E_Comp_Wl_Bu } 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) { Eina_Bool first = EINA_FALSE; @@ -1054,7 +1066,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); @@ -2848,18 +2860,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) { diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 73039c3..fd43b18 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -325,7 +325,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); --