Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][waylandws_client]: Fix window resizing #5

Open
wants to merge 6 commits into
base: rcar_gen3e
Choose a base branch
from

Conversation

sdikshit786
Copy link

@sdikshit786 sdikshit786 commented Jun 12, 2023

This patch fixes the bug in rcar egl wayland backend due to which a blank screen appears when window is resized using wl_egl_window_resize.
RCAR EGL wayland backend just destroys all window buffers and creates new ones. This means for a short duration, application buffer will disappear from display and appear with resized dimensions. Due to this we can get a blank screen if vsync occurs in between this time frame. With this patch the buffer will be recreated on demand after eglSwapBuffer has been called after the buffer has been released by the compositor.

rajendraprasadkj and others added 5 commits June 1, 2023 09:27
create wl_event_queue in eglCreateWindowSurface() to make it
thread specific

Authored-by: Ajay Kumar Sahoo <[email protected]>

Re-based the code changes for wayland-wsegl v3.1.1.

Signed-off-by: Rajendraprasad K J <[email protected]>
 - drawable->surface->frame_sync & drawable->callback can exists even if
 drawable->window points to NULL
 For eg- in case of resize.
 For the resize case if we avoid destroying the callback then done events
 gets dispatched in freed queue at later point of time.

 - Also for proper cleanup reallocate a new surface in case of resize while
 setting up new window drawable and free up the old one from inside
 WSEGLc_DeleteDrawable.

Signed-off-by: Sunidhi Dixit <[email protected]>
- For throtling the frames use a generic callback holder member
instead of drawable->callback and drawable->surface->frame_sync
to give a chance for the compositor to handle the commit and send
a release event before checking for a free wl_buffer.

Signed-off-by: Sunidhi Dixit <[email protected]>
There is no usecase in which aggressive sync mode
is useful hence removing it. Also with this change
there is no point in keeping drawable->callback.

Signed-off-by: Sunidhi Dixit <[email protected]>
Removed the redundant free_buffer_queue, free_buffer and
free_buffer_unused. Added a new member in struct kms_buffer
i.e. is_free which is true if the buffer is free to be used
or false if the buffer is already been used as back buffer.

Signed-off-by: Sunidhi Dixit <[email protected]>
Currently in case of window resize we return WSEGL_BAD_DRAWABLE
due to which IMG EGL deletes the drawable, and then recreate
the drawable from the native window.
But in the process of recreation the previous buffers are freed
up. Some of these buffers can be held by compositor.
In the new implementation we instead of deleting the whole
drawable only the buffers are recreated when needed.

Signed-off-by: Sunidhi Dixit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants