Skip to content

Commit

Permalink
Bug 1676760 - Fix comments on VsyncRefreshDriverTimer member variable…
Browse files Browse the repository at this point in the history
…s. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D139763
  • Loading branch information
mstange committed Mar 1, 2022
1 parent f046915 commit 66b0bde
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions layout/base/nsRefreshDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,18 +799,22 @@ class VsyncRefreshDriverTimer : public RefreshDriverTimer {
}
}

// When using local vsync source, we keep a strong ref to it here to ensure
// that the weak ref in the vsync dispatcher does not end up dangling.
// As this is a local vsync source, it is not affected by gfxPlatform vsync
// source reinit.
// Used in the parent process when we have a per-widget vsync source
// (currently only on Linux Wayland), to re-query the vsync rate.
RefPtr<gfx::VsyncSource> mVsyncSource;

// Always non-null. Has a weak pointer to us and notifies us of vsync.
RefPtr<RefreshDriverVsyncObserver> mVsyncObserver;
// Used for parent process.

// Used in the parent process. We register mVsyncObserver with it for the
// duration during which we want to receive vsync notifications.
RefPtr<RefreshTimerVsyncDispatcher> mVsyncDispatcher;
// Used for child process.
// The mVsyncChild will be always available before VsncChild::ActorDestroy().
// Used it the content process. We register mVsyncObserver with it for the
// duration during which we want to receive vsync notifications. The
// mVsyncChild will be always available before VsyncChild::ActorDestroy().
// After ActorDestroy(), StartTimer() and StopTimer() calls will be non-op.
RefPtr<VsyncMainChild> mVsyncChild;

TimeDuration mVsyncRate;
bool mIsTicking = false;
}; // VsyncRefreshDriverTimer
Expand Down

0 comments on commit 66b0bde

Please sign in to comment.