Bug 1542808 Comment 33 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Kenny Levinsen :kennylevinsen from comment #32)
> (In reply to Martin Stránský [:stransky] from comment #31)
> > I'm fine with the perf for now, let's have something to start with. The auto detection can be implemented later.
> 
> I suppose this implies having to readd the old sorta-almost-vsync source that we're currently using?

IMHO when the feature is disabled you can have an universal methods:

void WaylandVsyncSource::WaylandDisplay::SetupVSyncCallback() 

which will call 

void WaylandVsyncSource::WaylandDisplay::SetupFrameCallback() 

for frame-callback implementation and

void WaylandVsyncSource::WaylandDisplay::SetupTimerCallback() 

for timer-based implementation.

NOTE: You can't use pref module from other than main thread so I suppose to load the pref  as a part of nsWaylandDisplay or gfxPlatformGtk class and use it indirectly from WaylandVsyncSource class.

> As for your other question, wlroots never had the issue, and GNOME is getting a fix. I don't have a recent kwin wayland install to test with ATM, but I'll try to get around to it.

That's great. We can detect actual compositor by XDG_CURRENT_DESKTOP env variable.
(In reply to Kenny Levinsen :kennylevinsen from comment #32)
> (In reply to Martin Stránský [:stransky] from comment #31)
> > I'm fine with the perf for now, let's have something to start with. The auto detection can be implemented later.
> 
> I suppose this implies having to readd the old sorta-almost-vsync source that we're currently using?

IMHO You can have an universal methods:

void WaylandVsyncSource::WaylandDisplay::SetupVSyncCallback() 

which will call 

void WaylandVsyncSource::WaylandDisplay::SetupFrameCallback() 

for frame-callback implementation and

void WaylandVsyncSource::WaylandDisplay::SetupTimerCallback() 

for timer-based implementation.

NOTE: You can't use pref module from other than main thread so I suppose to load the pref  as a part of nsWaylandDisplay or gfxPlatformGtk class and use it indirectly from WaylandVsyncSource class.

> As for your other question, wlroots never had the issue, and GNOME is getting a fix. I don't have a recent kwin wayland install to test with ATM, but I'll try to get around to it.

That's great. We can detect actual compositor by XDG_CURRENT_DESKTOP env variable.

Back to Bug 1542808 Comment 33