summaryrefslogtreecommitdiff
path: root/src/protocols/PresentationTime.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-07-21 13:09:54 +0200
committerGitHub <noreply@github.com>2024-07-21 13:09:54 +0200
commit016da234d0e852de3ef20eb2e89ac58d2a85f6e7 (patch)
tree496085987176551b0794fffc069877d44943e2f1 /src/protocols/PresentationTime.cpp
parentf642fb97df5c69267a03452533de383ff8023570 (diff)
Core: Move to aquamarine (#6608)
Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
Diffstat (limited to 'src/protocols/PresentationTime.cpp')
-rw-r--r--src/protocols/PresentationTime.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/protocols/PresentationTime.cpp b/src/protocols/PresentationTime.cpp
index 3907bf1e..e9472fc3 100644
--- a/src/protocols/PresentationTime.cpp
+++ b/src/protocols/PresentationTime.cpp
@@ -3,6 +3,8 @@
#include "../helpers/Monitor.hpp"
#include "../managers/HookSystemManager.hpp"
#include "core/Compositor.hpp"
+#include "core/Output.hpp"
+#include <aquamarine/output/Output.hpp>
#define LOGM PROTO::presentation->protoLog
@@ -41,13 +43,11 @@ bool CPresentationFeedback::good() {
}
void CPresentationFeedback::sendQueued(SP<CQueuedPresentationData> data, timespec* when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags) {
- auto client = resource->client();
- wl_resource* res;
- wl_resource_for_each(res, &data->pMonitor->output->resources) {
- if (client == wl_resource_get_client(res)) {
- resource->sendSyncOutput(res);
- break;
- }
+ auto client = resource->client();
+
+ if (PROTO::outputs.contains(data->pMonitor->szName)) {
+ if (auto outputResource = PROTO::outputs.at(data->pMonitor->szName)->outputResourceFrom(client); outputResource)
+ resource->sendSyncOutput(outputResource->getResource()->resource());
}
uint32_t flags = 0;
@@ -55,9 +55,9 @@ void CPresentationFeedback::sendQueued(SP<CQueuedPresentationData> data, timespe
flags |= WP_PRESENTATION_FEEDBACK_KIND_VSYNC;
if (data->zeroCopy)
flags |= WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY;
- if (reportedFlags & WLR_OUTPUT_PRESENT_HW_CLOCK)
+ if (reportedFlags & Aquamarine::IOutput::AQ_OUTPUT_PRESENT_HW_CLOCK)
flags |= WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK;
- if (reportedFlags & WLR_OUTPUT_PRESENT_HW_COMPLETION)
+ if (reportedFlags & Aquamarine::IOutput::AQ_OUTPUT_PRESENT_HW_COMPLETION)
flags |= WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION;
if (data->wasPresented && when)