blob: e0971f3db0b55c637996c9cd72fca8d6d16cb723 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- ui/gl/sync_control_vsync_provider.cc.orig 2016-05-11 19:02:35 UTC
+++ ui/gl/sync_control_vsync_provider.cc
@@ -11,7 +11,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// These constants define a reasonable range for a calculated refresh interval.
// Calculating refreshes out of this range will be considered a fatal error.
const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
@@ -38,7 +38,7 @@ SyncControlVSyncProvider::~SyncControlVS
void SyncControlVSyncProvider::GetVSyncParameters(
const UpdateVSyncCallback& callback) {
TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
base::TimeTicks timebase;
// The actual clock used for the system time returned by glXGetSyncValuesOML
@@ -154,7 +154,7 @@ void SyncControlVSyncProvider::GetVSyncP
last_timebase_ = timebase;
last_media_stream_counter_ = media_stream_counter;
callback.Run(timebase, last_good_interval_);
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_BSD)
}
} // namespace gfx
|