// Fallback option to use a software timer to mimic vsync. Useful for gtests // To mimic a hardware vsync thread, we create a dedicated software timer // vsync thread. class SoftwareVsyncSource : public VsyncSource { public: explicit SoftwareVsyncSource(const TimeDuration& aInitialVsyncRate); virtual ~SoftwareVsyncSource();
// Can be called on any thread void SetVsyncRate(const TimeDuration& aNewRate);
protected: // Use a chromium thread because nsITimers* fire on the main thread
base::Thread* mVsyncThread;
RefPtr<CancelableRunnable> mCurrentVsyncTask; // only access on vsync thread bool mVsyncEnabled; // Only access on main thread
private:
DataMutex<TimeDuration> mVsyncRate; // can be accessed on any thread
};
} // namespace mozilla::gfx
#endif/* GFX_SOFTWARE_VSYNC_SOURCE_H */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.