summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-05-10 02:27:54 +0100
committerVaxry <vaxry@vaxry.net>2024-05-10 02:38:54 +0100
commita7e23d2f1e27c241c2a72262d14d5dde9ea2e860 (patch)
tree72e9a6b77208f14788cd1387eb147a9475bb3229 /src/render/Renderer.cpp
parent1753059b07be52cf78fa2676c4c71d2edb560199 (diff)
presentation-time: move to new impl
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index d1baf461..d02ed4e2 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -10,6 +10,7 @@
#include "../desktop/LayerSurface.hpp"
#include "../protocols/SessionLock.hpp"
#include "../protocols/LayerShell.hpp"
+#include "../protocols/PresentationTime.hpp"
extern "C" {
#include <xf86drm.h>
@@ -206,7 +207,10 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data)
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
wlr_surface_send_frame_done(surface, RDATA->when);
- wlr_presentation_surface_textured_on_output(surface, RDATA->pMonitor->output);
+ auto FEEDBACK = makeShared<CQueuedPresentationData>(surface);
+ FEEDBACK->attachMonitor(RDATA->pMonitor);
+ FEEDBACK->presented();
+ PROTO::presentation->queueData(FEEDBACK);
}
g_pHyprOpenGL->blend(true);
@@ -1067,7 +1071,11 @@ bool CHyprRenderer::attemptDirectScanout(CMonitor* pMonitor) {
timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
wlr_surface_send_frame_done(PSURFACE, &now);
- wlr_presentation_surface_scanned_out_on_output(PSURFACE, pMonitor->output);
+ auto FEEDBACK = makeShared<CQueuedPresentationData>(PSURFACE);
+ FEEDBACK->attachMonitor(pMonitor);
+ FEEDBACK->presented();
+ FEEDBACK->setPresentationType(true);
+ PROTO::presentation->queueData(FEEDBACK);
if (pMonitor->state.commit()) {
if (m_pLastScanout.expired()) {