From 3e2e2444d9fa65ae404604542689cf7829c99cfa Mon Sep 17 00:00:00 2001
From: dec05eba <dec05eba@protonmail.com>
Date: Fri, 14 Jun 2024 02:05:54 +0200
Subject: Properly cut out cursor outside video area when dealing with hevc amd
 padding

---
 include/capture/xcomposite.h | 1 -
 include/egl.h                | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'include')

diff --git a/include/capture/xcomposite.h b/include/capture/xcomposite.h
index ce0dbad..e933c35 100644
--- a/include/capture/xcomposite.h
+++ b/include/capture/xcomposite.h
@@ -37,7 +37,6 @@ typedef struct {
     Atom net_active_window_atom;
 
     gsr_cursor cursor;
-    bool clear_next_frame;
 } gsr_capture_xcomposite;
 
 void gsr_capture_xcomposite_init(gsr_capture_xcomposite *self, const gsr_capture_xcomposite_params *params);
diff --git a/include/egl.h b/include/egl.h
index afdb5a9..64dd2c6 100644
--- a/include/egl.h
+++ b/include/egl.h
@@ -110,6 +110,7 @@ typedef void(*__GLXextFuncPtr)(void);
 #define GL_SRC_ALPHA                            0x0302
 #define GL_ONE_MINUS_SRC_ALPHA                  0x0303
 #define GL_DEBUG_OUTPUT                         0x92E0
+#define GL_SCISSOR_TEST                         0x0C11
 
 #define GL_VENDOR                               0x1F00
 #define GL_RENDERER                             0x1F01
@@ -270,11 +271,13 @@ struct gsr_egl {
     void (*glEnableVertexAttribArray)(unsigned int index);
     void (*glDrawArrays)(unsigned int mode, int first, int count);
     void (*glEnable)(unsigned int cap);
+    void (*glDisable)(unsigned int cap);
     void (*glBlendFunc)(unsigned int sfactor, unsigned int dfactor);
     int (*glGetUniformLocation)(unsigned int program, const char *name);
     void (*glUniform1f)(int location, float v0);
     void (*glUniform2f)(int location, float v0, float v1);
     void (*glDebugMessageCallback)(GLDEBUGPROC callback, const void *userParam);
+    void (*glScissor)(int x, int y, int width, int height);
 };
 
 bool gsr_egl_load(gsr_egl *self, Display *dpy, bool wayland, bool is_monitor_capture);
-- 
cgit v1.2.3-70-g09d2