discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=1313f64aa9b25307e1ce61265ee58f5680a35d97
commit 1313f64aa9b25307e1ce61265ee58f5680a35d97 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 97e646b..1223437 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1028,6 +1028,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; @@ -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) { diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index cc8a338..893c490 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -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); --