backend/drm: Store only a single plane viewport

We store both queued and current buffers to be able to retain both the
framebuffer currently on screen and the one queued to replace it. From a
re-use perspective, we only care about the last committed framebuffer.

The viewport is only stored in order to be re-used together with the
last committed framebuffer, so do away with the queued/current
distinction and store a single viewport updated every time a commit
completes.
This commit is contained in:
Kenny Levinsen 2024-10-29 11:18:48 +01:00
parent 1edd5e224f
commit c1ce983826
2 changed files with 5 additions and 6 deletions

View file

@ -29,10 +29,10 @@ struct wlr_drm_plane {
/* Buffer submitted to the kernel, will be presented on next vblank */
struct wlr_drm_fb *queued_fb;
struct wlr_drm_viewport queued_viewport;
/* Buffer currently displayed on screen */
struct wlr_drm_fb *current_fb;
struct wlr_drm_viewport current_viewport;
/* Viewport belonging to the last committed fb */
struct wlr_drm_viewport viewport;
struct wlr_drm_format_set formats;