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

Unified Diff: ui/compositor/compositor.cc

Issue 138903025: Read compositor VSync information from platform, when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 54ddbacb Rebase. 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
« ash/display/display_controller.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 46050fedd83951496539f78f0dd91cf271f7e58b..778e9519bf329a80fdaaf64133960bf411bfed35 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -430,10 +430,20 @@ bool Compositor::HasObserver(CompositorObserver* observer) {
}
void Compositor::OnUpdateVSyncParameters(base::TimeTicks timebase,
- base::TimeDelta interval) {
- FOR_EACH_OBSERVER(CompositorObserver,
- observer_list_,
- OnUpdateVSyncParameters(this, timebase, interval));
+ base::TimeDelta interval,
+ bool interval_is_authoritative) {
+ if (interval_is_authoritative) {
+ authoritative_vsync_interval_ = interval;
+ } else {
+ if (authoritative_vsync_interval_ != base::TimeDelta())
+ interval = authoritative_vsync_interval_;
+ }
brianderson 2014/02/03 22:56:04 The if/else above means that we always set overwri
sheu 2014/02/03 23:02:40 Yes this is intentional. The idea is that we can
brianderson 2014/02/04 01:39:51 How is the interval inaccurate? Is there a way to
+
+ if (!timebase.is_null()) {
brianderson 2014/02/03 22:56:04 Is this check actually needed? On Windows, we cur
sheu 2014/02/03 23:02:40 Would it make more sense to add to the ui::Composi
+ FOR_EACH_OBSERVER(CompositorObserver,
+ observer_list_,
+ OnUpdateVSyncParameters(this, timebase, interval));
+ }
}
void Compositor::Layout() {
« ash/display/display_controller.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698