| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/display/chromeos/x11/display_snapshot_x11.h" | 5 #include "ui/display/chromeos/x11/display_snapshot_x11.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "ui/display/chromeos/x11/display_mode_x11.h" | 8 #include "ui/display/chromeos/x11/display_mode_x11.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| 11 | 11 |
| 12 DisplaySnapshotX11::DisplaySnapshotX11( | 12 DisplaySnapshotX11::DisplaySnapshotX11( |
| 13 int64_t display_id, | 13 int64_t display_id, |
| 14 bool has_proper_display_id, | |
| 15 const gfx::Point& origin, | 14 const gfx::Point& origin, |
| 16 const gfx::Size& physical_size, | 15 const gfx::Size& physical_size, |
| 17 DisplayConnectionType type, | 16 DisplayConnectionType type, |
| 18 bool is_aspect_preserving_scaling, | 17 bool is_aspect_preserving_scaling, |
| 19 bool has_overscan, | 18 bool has_overscan, |
| 20 std::string display_name, | 19 std::string display_name, |
| 21 const std::vector<const DisplayMode*>& modes, | 20 const std::vector<const DisplayMode*>& modes, |
| 22 const DisplayMode* current_mode, | 21 const DisplayMode* current_mode, |
| 23 const DisplayMode* native_mode, | 22 const DisplayMode* native_mode, |
| 24 RROutput output, | 23 RROutput output, |
| 25 RRCrtc crtc, | 24 RRCrtc crtc, |
| 26 int index) | 25 int index) |
| 27 : DisplaySnapshot(display_id, | 26 : DisplaySnapshot(display_id, |
| 28 has_proper_display_id, | |
| 29 origin, | 27 origin, |
| 30 physical_size, | 28 physical_size, |
| 31 type, | 29 type, |
| 32 is_aspect_preserving_scaling, | 30 is_aspect_preserving_scaling, |
| 33 has_overscan, | 31 has_overscan, |
| 34 display_name, | 32 display_name, |
| 35 modes, | 33 modes, |
| 36 current_mode, | 34 current_mode, |
| 37 native_mode), | 35 native_mode), |
| 38 output_(output), | 36 output_(output), |
| 39 crtc_(crtc), | 37 crtc_(crtc), |
| 40 index_(index) {} | 38 index_(index) {} |
| 41 | 39 |
| 42 DisplaySnapshotX11::~DisplaySnapshotX11() {} | 40 DisplaySnapshotX11::~DisplaySnapshotX11() {} |
| 43 | 41 |
| 44 std::string DisplaySnapshotX11::ToString() const { | 42 std::string DisplaySnapshotX11::ToString() const { |
| 45 return base::StringPrintf( | 43 return base::StringPrintf( |
| 46 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]", | 44 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]", |
| 47 type_, | 45 type_, |
| 48 output_, | 46 output_, |
| 49 crtc_, | 47 crtc_, |
| 50 current_mode_ | 48 current_mode_ |
| 51 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id() | 49 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id() |
| 52 : 0, | 50 : 0, |
| 53 physical_size_.width(), | 51 physical_size_.width(), |
| 54 physical_size_.height()); | 52 physical_size_.height()); |
| 55 } | 53 } |
| 56 | 54 |
| 57 } // namespace ui | 55 } // namespace ui |
| OLD | NEW |