Index: ash/display/display_controller.cc |
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc |
index 7b7cc5882e5592a336e718a28d2fa3c442bb5215..dabf8d42e7ffd968241cd037abb60861e359ad9b 100644 |
--- a/ash/display/display_controller.cc |
+++ b/ash/display/display_controller.cc |
@@ -33,6 +33,7 @@ |
#include "ui/aura/window_property.h" |
#include "ui/aura/window_tracker.h" |
#include "ui/compositor/compositor.h" |
+#include "ui/compositor/compositor_vsync_manager.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/screen.h" |
@@ -119,6 +120,13 @@ 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)) { |
+ root->host()->compositor()->vsync_manager()->SetAuthoritativeVSyncInterval( |
+ base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / |
+ mode.refresh_rate)); |
piman
2014/02/04 04:51:01
I think there's some cases where refresh_rate coul
sheu
2014/02/04 22:01:45
And the div-by-zero. Done.
|
+ } |
} |
} // namespace |