Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: ui/gl/sync_control_vsync_provider.cc

Issue 138903025: Read compositor VSync information from platform, when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 4b969456 piman@ comments; refactor logic into CompositorVSyncManager Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/gl/sync_control_vsync_provider.cc
diff --git a/ui/gl/sync_control_vsync_provider.cc b/ui/gl/sync_control_vsync_provider.cc
index 16b1e8af9cdd8d453357ea4d2d35aa9c2e373993..49fa4715c214d4e52b5b3e85feef0a6901c09cef 100644
--- a/ui/gl/sync_control_vsync_provider.cc
+++ b/ui/gl/sync_control_vsync_provider.cc
@@ -10,11 +10,6 @@
#include "base/time/time.h"
#if defined(OS_LINUX)
-// 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 kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
-const int64 kMaxVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 10;
-
// How much noise we'll tolerate between successive computed intervals before
// we think the latest computed interval is invalid (noisey due to
// monitor configuration change, moving a window between monitors, etc.).
@@ -122,23 +117,8 @@ void SyncControlVSyncProvider::GetVSyncParameters(
double relative_change =
fabs(old_interval.InMillisecondsF() - new_interval.InMillisecondsF()) /
new_interval.InMillisecondsF();
- if (relative_change < kRelativeIntervalDifferenceThreshold) {
- if (new_interval.InMicroseconds() < kMinVsyncIntervalUs ||
- new_interval.InMicroseconds() > kMaxVsyncIntervalUs) {
- LOG(FATAL) << "Calculated bogus refresh interval of "
- << new_interval.InMicroseconds() << " us. "
- << "Last time base of " << last_timebase_.ToInternalValue()
- << " us. "
- << "Current time base of " << timebase.ToInternalValue()
- << " us. "
- << "Last media stream count of "
- << last_media_stream_counter_ << ". "
- << "Current media stream count of " << media_stream_counter
- << ".";
- } else {
- last_good_interval_ = new_interval;
- }
- }
+ if (relative_change < kRelativeIntervalDifferenceThreshold)
+ last_good_interval_ = new_interval;
piman 2014/02/04 04:51:01 I'd rather we either leave the LOG(FATAL) here, or
sheu 2014/02/04 22:01:45 We can't leave the LOG(FATAL) here -- that is the
}
last_timebase_ = timebase;
« ui/compositor/compositor_vsync_manager.cc ('K') | « ui/compositor/test/draw_waiter_for_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698