Properly cut out cursor outside video area when dealing with hevc amd padding

This commit is contained in:
dec05eba
2024-06-14 02:05:54 +02:00
parent 5f24cd6de6
commit 3e2e2444d9
6 changed files with 16 additions and 21 deletions

View File

@@ -358,10 +358,15 @@ bool gsr_capture_kms_capture(gsr_capture_kms *self, AVFrame *frame, bool hdr, bo
self->base.egl->eglDestroyImage(self->base.egl->egl_display, cursor_image);
self->base.egl->glBindTexture(target, 0);
self->base.egl->glEnable(GL_SCISSOR_TEST);
self->base.egl->glScissor(target_x, target_y, self->capture_size.x, self->capture_size.y);
gsr_color_conversion_draw(&self->base.color_conversion, self->base.cursor_texture,
cursor_pos, cursor_size,
(vec2i){0, 0}, cursor_size,
texture_rotation, cursor_texture_is_external);
self->base.egl->glDisable(GL_SCISSOR_TEST);
}
self->base.egl->eglSwapBuffers(self->base.egl->egl_display, self->base.egl->egl_surface);