added basic damage tracking

This commit is contained in:
vaxerski
2022-04-14 16:43:29 +02:00
parent 158af1eb09
commit 75af34da96
11 changed files with 259 additions and 84 deletions

View File

@@ -1,5 +1,6 @@
#include "SubsurfaceTree.hpp"
#include "../events/Events.hpp"
#include "../Compositor.hpp"
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
*lx += node->pSurface->sx;
@@ -164,6 +165,8 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
int lx = 0, ly = 0;
addSurfaceGlobalOffset(pNode, &lx, &ly);
g_pHyprRenderer->damageSurface(pNode->pSurface, lx, ly);
}
void Events::listener_destroySubsurface(void* owner, void* data) {