1 --- ui/gl/sync_control_vsync_provider.cc.orig 2022-02-28 16:54:41 UTC 2 +++ ui/gl/sync_control_vsync_provider.cc 3 @@ -11,7 +11,7 @@ 4 #include "base/trace_event/trace_event.h" 5 #include "build/build_config.h" 6 7 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 8 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 9 // These constants define a reasonable range for a calculated refresh interval. 10 // Calculating refreshes out of this range will be considered a fatal error. 11 const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400; 12 @@ -26,7 +26,7 @@ const double kRelativeIntervalDifferenceThreshold = 0. 13 namespace gl { 14 15 SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() { 16 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 17 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 18 // On platforms where we can't get an accurate reading on the refresh 19 // rate we fall back to the assumption that we're displaying 60 frames 20 // per second. 21 @@ -48,7 +48,7 @@ bool SyncControlVSyncProvider::GetVSyncParametersIfAva 22 base::TimeTicks* timebase_out, 23 base::TimeDelta* interval_out) { 24 TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters"); 25 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 26 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 27 // The actual clock used for the system time returned by glXGetSyncValuesOML 28 // is unspecified. In practice, the clock used is likely to be either 29 // CLOCK_REALTIME or CLOCK_MONOTONIC, so we compare the returned time to the 30 @@ -159,7 +159,7 @@ bool SyncControlVSyncProvider::GetVSyncParametersIfAva 31 } 32 33 bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() const { 34 -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 35 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) 36 return true; 37 #else 38 return false; 39