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

Side by Side 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, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 ui::SetIntProperty(xwindow, kInternalProp, kCARDINAL, internal); 112 ui::SetIntProperty(xwindow, kInternalProp, kCARDINAL, internal);
113 ui::SetIntProperty(xwindow, kRotationProp, kCARDINAL, xrandr_rotation); 113 ui::SetIntProperty(xwindow, kRotationProp, kCARDINAL, xrandr_rotation);
114 ui::SetIntProperty(xwindow, 114 ui::SetIntProperty(xwindow,
115 kScaleFactorProp, 115 kScaleFactorProp,
116 kCARDINAL, 116 kCARDINAL,
117 100 * display.device_scale_factor()); 117 100 * display.device_scale_factor());
118 #endif 118 #endif
119 scoped_ptr<aura::RootWindowTransformer> transformer( 119 scoped_ptr<aura::RootWindowTransformer> transformer(
120 internal::CreateRootWindowTransformerForDisplay(root->window(), display)); 120 internal::CreateRootWindowTransformerForDisplay(root->window(), display));
121 root->host()->SetRootWindowTransformer(transformer.Pass()); 121 root->host()->SetRootWindowTransformer(transformer.Pass());
122
123 internal::DisplayMode mode;
124 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
125 root->host()->compositor()->OnUpdateVSyncParameters(
126 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,
127 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
128 mode.refresh_rate),
129 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.
130 }
122 } 131 }
123 132
124 } // namespace 133 } // namespace
125 134
126 namespace internal { 135 namespace internal {
127 136
128 // A utility class to store/restore focused/active window 137 // A utility class to store/restore focused/active window
129 // when the display configuration has changed. 138 // when the display configuration has changed.
130 class FocusActivationStore { 139 class FocusActivationStore {
131 public: 140 public:
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 std::string name = 744 std::string name =
736 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 745 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
737 gfx::AcceleratedWidget xwindow = 746 gfx::AcceleratedWidget xwindow =
738 root_windows[i]->GetDispatcher()->host()->GetAcceleratedWidget(); 747 root_windows[i]->GetDispatcher()->host()->GetAcceleratedWidget();
739 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str()); 748 XStoreName(gfx::GetXDisplay(), xwindow, name.c_str());
740 } 749 }
741 #endif 750 #endif
742 } 751 }
743 752
744 } // namespace ash 753 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698