summaryrefslogtreecommitdiffstats
path: root/ui/gl/sync_control_vsync_provider.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 22:35:53 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 22:35:53 +0000
commit2bd1fcf0d9c29762b83d73839b6f016b09d66d62 (patch)
treedcb821d7421ff931fedd797cbcd51b9a9f58263b /ui/gl/sync_control_vsync_provider.cc
parent1f8ae227e655d43caf0089f4bcc4a90923171fad (diff)
downloadchromium_src-2bd1fcf0d9c29762b83d73839b6f016b09d66d62.zip
chromium_src-2bd1fcf0d9c29762b83d73839b6f016b09d66d62.tar.gz
chromium_src-2bd1fcf0d9c29762b83d73839b6f016b09d66d62.tar.bz2
Revert 250798 "Revert of Read compositor VSync information from ..."
Broke compilation. > Revert of Read compositor VSync information from platform, when possible (https://chromiumcodereview.appspot.com/138903025/) > > Reason for revert: > Reverting due to Windows crashes. See: > > http://crbug.com/343199 > > Original issue's description: > > Read compositor VSync information from platform, when possible > > > > The current query of VSync information through the GL context can be unreliable > > on platforms that can dynamically disable vblanks, or multi-monitor setups. > > Preferentially query the VSync information through the platform windowing > > system (presently: XRandR on CrOS) when possible. > > > > BUG=328953 > > TEST=local build, run on CrOS snow > > > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250250 > > TBR=oshima@chromium.org,piman@chromium.org,brianderson@chromium.org,sky@chromium.org,mukai@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=328953 > > Review URL: https://codereview.chromium.org/161413002 TBR=sheu@chromium.org Review URL: https://codereview.chromium.org/161743002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250810 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/sync_control_vsync_provider.cc')
-rw-r--r--ui/gl/sync_control_vsync_provider.cc27
1 files changed, 17 insertions, 10 deletions
diff --git a/ui/gl/sync_control_vsync_provider.cc b/ui/gl/sync_control_vsync_provider.cc
index 16b1e8a..66d3734 100644
--- a/ui/gl/sync_control_vsync_provider.cc
+++ b/ui/gl/sync_control_vsync_provider.cc
@@ -125,16 +125,23 @@ void SyncControlVSyncProvider::GetVSyncParameters(
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
- << ".";
+#if defined(USE_ASH)
+ // On ash platforms (ChromeOS essentially), the real refresh interval is
+ // queried from XRandR, regardless of the value calculated here, and
+ // this value is overriden by ui::CompositorVSyncManager. The log
+ // should not be fatal in this case. Reconsider all this when XRandR
+ // support is added to non-ash platforms.
+ // http://crbug.com/340851
+ LOG(ERROR)
+#else
+ LOG(FATAL)
+#endif // USE_ASH
+ << "Calculated bogus refresh interval="
+ << new_interval.InMicroseconds()
+ << " us., last_timebase_=" << last_timebase_.ToInternalValue()
+ << " us., timebase=" << timebase.ToInternalValue()
+ << " us., last_media_stream_counter_=" << last_media_stream_counter_
+ << ", media_stream_counter=" << media_stream_counter;
} else {
last_good_interval_ = new_interval;
}