{
tpl_wl_egl_display_t *wl_egl_display = NULL;
tpl_surface_t *surface = NULL;
- tpl_bool_t is_activated = TPL_FALSE;
int width, height;
tpl_wl_egl_surface_t wl_egl_surface(data);
surface->width, surface->height, width, height);
}
- /* When queue_reset_callback is called, if is_activated is different from
- * its previous state change the reset flag to TPL_TRUE to get a new buffer
- * with the changed state(ACTIVATED/DEACTIVATED) at the next frame. */
- is_activated = wayland_tbm_client_queue_check_activate(wl_egl_display->wl_tbm_client,
- wl_egl_surface->tbm_queue);
- if (wl_egl_surface->is_activated != is_activated) {
- if (is_activated) {
- TPL_INFO("[ACTIVATED]",
- "wl_egl_surface(%p) wl_surface(%p) tbm_queue(%p)",
- wl_egl_surface, wl_egl_surface->wl_surface, tbm_queue);
- } else {
- TPL_INFO("[DEACTIVATED]",
- " wl_egl_surface(%p) wl_surface(%p) tbm_queue(%p)",
- wl_egl_surface, wl_egl_surface->wl_surface, tbm_queue);
- }
-
- wl_egl_surface->is_activated = is_activated;
- }
-
wl_egl_surface->reset = TPL_TRUE;
if (surface->reset_cb)
wl_egl_surface->width = surface->width;
wl_egl_surface->height = surface->height;
+ if (wl_egl_surface->reset) {
+ tpl_bool_t is_activated = wayland_tbm_client_queue_check_activate(
+ wl_egl_display->wl_tbm_client,
+ wl_egl_surface->tbm_queue);
+ if (wl_egl_surface->is_activated != is_activated) {
+ if (is_activated) {
+ TPL_INFO("[ACTIVATED]",
+ "wl_egl_surface(%p) wl_surface(%p) tbm_queue(%p)",
+ wl_egl_surface, wl_egl_surface->wl_surface, wl_egl_surface->tbm_queue);
+ } else {
+ TPL_INFO("[DEACTIVATED]",
+ " wl_egl_surface(%p) wl_surface(%p) tbm_queue(%p)",
+ wl_egl_surface, wl_egl_surface->wl_surface, wl_egl_surface->tbm_queue);
+ }
+ }
+
+ wl_egl_surface->is_activated = is_activated;
+ }
/* If surface->frontbuffer is not null, the frontbuffer rendering mode will be
* maintained if the surface state meets the conditions below.