aboutsummaryrefslogtreecommitdiff
path: root/include/color_conversion.h
diff options
context:
space:
mode:
authordec05eba <dec05eba®protonmail.com>2023-04-22 00:46:48 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-22 02:13:11 +0200
commite1c613666ea394a2295a5cfb34c6c5e621876293 (patch)
tree44c27d2d74d2730a9db6f314492f2c439de1925f /include/color_conversion.h
parent2021456be0e7b55d12cb2d26bba0281c0c0d1a10 (diff)
kms_vaapi: add cursor capture for amd/intel monitor capture
Always find largest drm buf, to fix some cases when there are multiple planes and we accidentally capture a drm buf that isn't the target buf. We always want the full SCREEN drm buf.
Diffstat (limited to 'include/color_conversion.h')
-rw-r--r--include/color_conversion.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/include/color_conversion.h b/include/color_conversion.h
index de83d1e..1fe488b 100644
--- a/include/color_conversion.h
+++ b/include/color_conversion.h
@@ -18,25 +18,15 @@ typedef struct {
gsr_source_color source_color;
gsr_destination_color destination_color;
- unsigned int source_textures[2];
- int num_source_textures;
-
unsigned int destination_textures[2];
int num_destination_textures;
-
- float rotation;
-
- vec2f position;
- vec2f size;
} gsr_color_conversion_params;
typedef struct {
- gsr_egl *egl;
+ gsr_color_conversion_params params;
+ int rotation_uniforms[2];
gsr_shader shaders[2];
- unsigned int source_textures[2];
- unsigned int destination_textures[2];
-
unsigned int framebuffers[2];
unsigned int vertex_array_object_id;
@@ -46,6 +36,6 @@ typedef struct {
int gsr_color_conversion_init(gsr_color_conversion *self, const gsr_color_conversion_params *params);
void gsr_color_conversion_deinit(gsr_color_conversion *self);
-int gsr_color_conversion_update(gsr_color_conversion *self, int width, int height);
+int gsr_color_conversion_draw(gsr_color_conversion *self, unsigned int texture_id, vec2i source_pos, vec2i source_size, vec2i texture_pos, vec2i texture_size, float rotation);
#endif /* GSR_COLOR_CONVERSION_H */