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

Side by Side Diff: ash/display/display_manager.h

Issue 138903025: Read compositor VSync information from platform, when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 041e3518 Cleaned up. 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 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 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_
6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // Sets the display's resolution. 168 // Sets the display's resolution.
169 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); 169 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution);
170 170
171 // Register per display properties. |overscan_insets| is NULL if 171 // Register per display properties. |overscan_insets| is NULL if
172 // the display has no custom overscan insets. 172 // the display has no custom overscan insets.
173 void RegisterDisplayProperty(int64 display_id, 173 void RegisterDisplayProperty(int64 display_id,
174 gfx::Display::Rotation rotation, 174 gfx::Display::Rotation rotation,
175 float ui_scale, 175 float ui_scale,
176 const gfx::Insets* overscan_insets, 176 const gfx::Insets* overscan_insets,
177 const gfx::Size& resolution_in_pixels); 177 const gfx::Size& resolution_in_pixels,
178 float refresh_rate);
178 179
179 // Returns the display's selected resolution. 180 // Returns the display's selected resolution.
180 bool GetSelectedResolutionForDisplayId(int64 display_id, 181 bool GetSelectedResolutionForDisplayId(int64 display_id,
181 gfx::Size* resolution_out) const; 182 gfx::Size* resolution_out,
183 float* refresh_rate_out) const;
182 184
183 // Tells if the virtual resolution feature is enabled. 185 // Tells if the virtual resolution feature is enabled.
184 bool IsDisplayUIScalingEnabled() const; 186 bool IsDisplayUIScalingEnabled() const;
185 187
186 // Returns the current overscan insets for the specified |display_id|. 188 // Returns the current overscan insets for the specified |display_id|.
187 // Returns an empty insets (0, 0, 0, 0) if no insets are specified for 189 // Returns an empty insets (0, 0, 0, 0) if no insets are specified for
188 // the display. 190 // the display.
189 gfx::Insets GetOverscanInsets(int64 display_id) const; 191 gfx::Insets GetOverscanInsets(int64 display_id) const;
190 192
191 // Called when display configuration has changed. The new display 193 // Called when display configuration has changed. The new display
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 DisplayList displays_; 336 DisplayList displays_;
335 337
336 int num_connected_displays_; 338 int num_connected_displays_;
337 339
338 bool force_bounds_changed_; 340 bool force_bounds_changed_;
339 341
340 // The mapping from the display ID to its internal data. 342 // The mapping from the display ID to its internal data.
341 std::map<int64, DisplayInfo> display_info_; 343 std::map<int64, DisplayInfo> display_info_;
342 344
343 // Selected resolutions in pixels for displays. Key is the displays' ID. 345 // Selected resolutions in pixels for displays. Key is the displays' ID.
344 std::map<int64, gfx::Size> resolutions_; 346 std::map<int64, Resolution> resolutions_;
345 347
346 // When set to true, the host window's resize event updates 348 // When set to true, the host window's resize event updates
347 // the display's size. This is set to true when running on 349 // the display's size. This is set to true when running on
348 // desktop environment (for debugging) so that resizing the host 350 // desktop environment (for debugging) so that resizing the host
349 // window will update the display properly. This is set to false 351 // window will update the display properly. This is set to false
350 // on device as well as during the unit tests. 352 // on device as well as during the unit tests.
351 bool change_display_upon_host_resize_; 353 bool change_display_upon_host_resize_;
352 354
353 SecondDisplayMode second_display_mode_; 355 SecondDisplayMode second_display_mode_;
354 int64 mirrored_display_id_; 356 int64 mirrored_display_id_;
355 gfx::Display non_desktop_display_; 357 gfx::Display non_desktop_display_;
356 358
357 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 359 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
358 }; 360 };
359 361
360 } // namespace internal 362 } // namespace internal
361 } // namespace ash 363 } // namespace ash
362 364
363 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ 365 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698