Refactor xcomposite

Move common code between cuda/vaapi implementations
into xcomposite file.
This also fixes limited/full range colors on nvidia.
This commit is contained in:
dec05eba
2024-03-09 15:28:17 +01:00
parent 3d9a706528
commit 5e05bbbbcb
15 changed files with 510 additions and 887 deletions

View File

@@ -2,16 +2,10 @@
#define GSR_CAPTURE_XCOMPOSITE_VAAPI_H
#include "capture.h"
#include "../egl.h"
#include "../vec2.h"
#include "../color_conversion.h"
#include "xcomposite.h"
typedef struct {
gsr_egl *egl;
Window window;
bool follow_focused; /* If this is set then |window| is ignored */
vec2i region_size; /* This is currently only used with |follow_focused| */
gsr_color_range color_range;
gsr_capture_xcomposite_params base;
} gsr_capture_xcomposite_vaapi_params;
gsr_capture* gsr_capture_xcomposite_vaapi_create(const gsr_capture_xcomposite_vaapi_params *params);