mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-04 14:22:02 +00:00
[client] report presentation cadence over LGMP
This commit is contained in:
@@ -56,6 +56,8 @@ static void presentationFeedbackPresented(void * opaque,
|
||||
uint32_t tvNsec, uint32_t refresh, uint32_t seqHi, uint32_t seqLo, uint32_t flags)
|
||||
{
|
||||
struct FrameData * data = opaque;
|
||||
if (refresh)
|
||||
atomic_store(&wlWm.presentationPeriod, refresh);
|
||||
struct timespec present = {
|
||||
.tv_sec = (uint64_t) tvSecHi << 32 | tvSecLo,
|
||||
.tv_nsec = tvNsec,
|
||||
@@ -69,6 +71,16 @@ static void presentationFeedbackPresented(void * opaque,
|
||||
wp_presentation_feedback_destroy(feedback);
|
||||
}
|
||||
|
||||
bool waylandGetFramePeriod(uint64_t * period)
|
||||
{
|
||||
const uint64_t value = atomic_load(&wlWm.presentationPeriod);
|
||||
if (!value)
|
||||
return false;
|
||||
|
||||
*period = value;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void presentationFeedbackDiscarded(void * data,
|
||||
struct wp_presentation_feedback * feedback)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user