vsync_observer.h 551 B

12345678910111213141516171819202122
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef UI_GL_VSYNC_OBSERVER_H_
  5. #define UI_GL_VSYNC_OBSERVER_H_
  6. #include "base/time/time.h"
  7. namespace gl {
  8. class GL_EXPORT VSyncObserver {
  9. public:
  10. // Called on vsync thread.
  11. virtual void OnVSync(base::TimeTicks vsync_time,
  12. base::TimeDelta interval) = 0;
  13. protected:
  14. virtual ~VSyncObserver() {}
  15. };
  16. } // namespace gl
  17. #endif // UI_GL_VSYNC_OBSERVER_H_