mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/drm: Store viewport with framebuffer
Accessing the output state viewport require a buffer, and that might not have a state with a buffer when preparing the plane properties for an atomic commit. Instead, store the properties at the same time as the fb, and use a similar mechanism to carry the state around.
This commit is contained in:
parent
1520be3c5c
commit
3df1528a8f
3 changed files with 17 additions and 8 deletions
|
|
@ -15,6 +15,11 @@
|
|||
#include "backend/drm/properties.h"
|
||||
#include "backend/drm/renderer.h"
|
||||
|
||||
struct wlr_drm_viewport {
|
||||
struct wlr_fbox src_box;
|
||||
struct wlr_box dst_box;
|
||||
};
|
||||
|
||||
struct wlr_drm_plane {
|
||||
uint32_t type;
|
||||
uint32_t id;
|
||||
|
|
@ -24,8 +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;
|
||||
|
||||
struct wlr_drm_format_set formats;
|
||||
|
||||
|
|
@ -139,6 +146,7 @@ struct wlr_drm_connector_state {
|
|||
bool active;
|
||||
drmModeModeInfo mode;
|
||||
struct wlr_drm_fb *primary_fb;
|
||||
struct wlr_drm_viewport primary_viewport;
|
||||
struct wlr_drm_fb *cursor_fb;
|
||||
|
||||
struct wlr_drm_syncobj_timeline *wait_timeline;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue