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

Unified Diff: ash/display/display_controller.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
Index: ash/display/display_controller.cc
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc
index 7b7cc5882e5592a336e718a28d2fa3c442bb5215..101e5af6b061b79ff0f6fc307f8fd1d24cdd0c0b 100644
--- a/ash/display/display_controller.cc
+++ b/ash/display/display_controller.cc
@@ -119,6 +119,15 @@ void SetDisplayPropertiesOnHostWindow(aura::RootWindow* root,
scoped_ptr<aura::RootWindowTransformer> transformer(
internal::CreateRootWindowTransformerForDisplay(root->window(), display));
root->host()->SetRootWindowTransformer(transformer.Pass());
+
+ internal::DisplayMode mode;
+ if (GetDisplayManager()->GetSelectedModeForDisplayId(display.id(), &mode)) {
brianderson 2014/02/03 22:56:04 Will this be called every frame? If not, how often
sheu 2014/02/03 23:02:40 This should be called only when monitor configurat
brianderson 2014/02/04 01:39:51 Does it happen in all the following cases: When a
oshima 2014/02/04 02:07:53 No
brianderson 2014/02/04 02:14:36 Is that beca
+ root->host()->compositor()->OnUpdateVSyncParameters(
+ base::TimeTicks(),
brianderson 2014/02/03 22:56:04 Why isn't there timebase information here?
sheu 2014/02/03 23:02:40 We don't have access to timebase information here,
+ base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
+ mode.refresh_rate),
+ true);
brianderson 2014/02/03 22:56:04 Is this the only place where the authoritative int
sheu 2014/02/03 23:02:40 Yes.
+ }
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698