vsync_provider.cc 709 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2016 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. #include "ui/gfx/vsync_provider.h"
  5. namespace gfx {
  6. void FixedVSyncProvider::GetVSyncParameters(UpdateVSyncCallback callback) {
  7. std::move(callback).Run(timebase_, interval_);
  8. }
  9. bool FixedVSyncProvider::GetVSyncParametersIfAvailable(
  10. base::TimeTicks* timebase,
  11. base::TimeDelta* interval) {
  12. *timebase = timebase_;
  13. *interval = interval_;
  14. return true;
  15. }
  16. bool FixedVSyncProvider::SupportGetVSyncParametersIfAvailable() const {
  17. return true;
  18. }
  19. bool FixedVSyncProvider::IsHWClock() const {
  20. return false;
  21. }
  22. } // namespace gfx