[client] egl: refactor damage mesh generation into desktop_rects

This mesh will later be used to render only damaged portions of the desktop.
We also moved the coordinate transformation for damage overlay into a matrix
and computed by the shader.
This commit is contained in:
Quantum
2021-08-02 18:40:19 -04:00
committed by Geoffrey McRae
parent dd31a7ef93
commit 2dca056526
6 changed files with 306 additions and 158 deletions

View File

@@ -22,6 +22,8 @@
#include <stdbool.h>
#include "common/KVMFR.h"
#include "interface/renderer.h"
#include "desktop_rects.h"
struct DesktopDamage
{
@@ -37,4 +39,5 @@ void egl_damage_free(EGL_Damage ** damage);
void egl_damage_setup(EGL_Damage * damage, int width, int height);
void egl_damage_resize(EGL_Damage * damage, float translateX, float translateY,
float scaleX, float scaleY);
bool egl_damage_render(EGL_Damage * damage, bool rotate, const struct DesktopDamage * data);
bool egl_damage_render(EGL_Damage * damage, LG_RendererRotate rotate,
const struct DesktopDamage * data);