/* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
is a memory address pointing the structure of wl_display_interface. */
- if (wl_egl_native_dpy == &wl_display_interface)
- return TPL_TRUE;
+ if (wl_egl_native_dpy != &wl_display_interface)
+ return TPL_FALSE;
if (strncmp(wl_egl_native_dpy->name, wl_display_interface.name,
- strlen(wl_display_interface.name)) == 0) {
- return TPL_TRUE;
- }
+ strlen(wl_display_interface.name)) != 0)
+ return TPL_FALSE;
- return TPL_FALSE;
+ return TPL_TRUE;
}
static tpl_result_t
/* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
is a memory address pointing the structure of wl_display_interface. */
- if (wl_egl_native_dpy == &wl_display_interface)
- return TPL_TRUE;
+ if (wl_egl_native_dpy != &wl_display_interface)
+ return TPL_FALSE;
if (strncmp(wl_egl_native_dpy->name, wl_display_interface.name,
- strlen(wl_display_interface.name)) == 0) {
- return TPL_TRUE;
- }
+ strlen(wl_display_interface.name)) != 0)
+ return TPL_FALSE;
- return TPL_FALSE;
+ return TPL_TRUE;
}
/* -- BEGIN -- wl_egl_window callback functions */
tbm_surface_h *swapchain_buffers;
- /* [TEMP] To fix dEQP-VK.wsi.wayland.swapchain.modify.resize crash issue
+ /* [TEMP] To fix dEQP-VK.wsi.wayland.swapchain.modify.resize crash issue
* It will be fixed properly using old_swapchain handle */
tbm_surface_h *old_swapchain_buffers;
{
struct wl_interface *wl_vk_native_dpy = *(void **) native_dpy;
- if (!wl_vk_native_dpy) {
- TPL_ERR("Invalid parameter. native_display(%p)", wl_vk_native_dpy);
- return TPL_FALSE;
- }
-
/* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
is a memory address pointing the structure of wl_display_interface. */
- if (wl_vk_native_dpy == &wl_display_interface)
- return TPL_TRUE;
+ if (wl_vk_native_dpy != &wl_display_interface)
+ return TPL_FALSE;
if (strncmp(wl_vk_native_dpy->name, wl_display_interface.name,
- strlen(wl_display_interface.name)) == 0) {
- return TPL_TRUE;
- }
+ strlen(wl_display_interface.name)) != 0)
+ return TPL_FALSE;
- return TPL_FALSE;
+ return TPL_TRUE;
}
static tpl_bool_t
_get_tbm_surface_bo_name(sc_buffers[i]));
tbm_surface_internal_unref(sc_buffers[i]);
sc_buffers[i] = NULL;
- }
+ }
}
}