| 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/ozone/common/display_snapshot_proxy.h" | 5 #include "ui/ozone/common/display_snapshot_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "ui/ozone/common/display_mode_proxy.h" | 9 #include "ui/ozone/common/display_mode_proxy.h" |
| 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 bool SameModes(const DisplayMode_Params& lhs, const DisplayMode_Params& rhs) { | 16 bool SameModes(const DisplayMode_Params& lhs, const DisplayMode_Params& rhs) { |
| 17 return lhs.size == rhs.size && lhs.is_interlaced == rhs.is_interlaced && | 17 return lhs.size == rhs.size && lhs.is_interlaced == rhs.is_interlaced && |
| 18 lhs.refresh_rate == rhs.refresh_rate; | 18 lhs.refresh_rate == rhs.refresh_rate; |
| 19 } | 19 } |
| 20 | 20 |
| 21 } // namespace | 21 } // namespace |
| 22 | 22 |
| 23 DisplaySnapshotProxy::DisplaySnapshotProxy(const DisplaySnapshot_Params& params) | 23 DisplaySnapshotProxy::DisplaySnapshotProxy(const DisplaySnapshot_Params& params) |
| 24 : DisplaySnapshot(params.display_id, | 24 : DisplaySnapshot(params.display_id, |
| 25 params.origin, | 25 params.origin, |
| 26 params.physical_size, | 26 params.physical_size, |
| 27 params.type, | 27 params.type, |
| 28 params.is_aspect_preserving_scaling, | 28 params.is_aspect_preserving_scaling, |
| 29 params.has_overscan, | 29 params.has_overscan, |
| 30 params.has_color_correction_matrix, |
| 30 params.display_name, | 31 params.display_name, |
| 31 params.sys_path, | 32 params.sys_path, |
| 32 std::vector<const DisplayMode*>(), | 33 std::vector<const DisplayMode*>(), |
| 33 params.edid, | 34 params.edid, |
| 34 NULL, | 35 NULL, |
| 35 NULL), | 36 NULL), |
| 36 string_representation_(params.string_representation) { | 37 string_representation_(params.string_representation) { |
| 37 for (size_t i = 0; i < params.modes.size(); ++i) { | 38 for (size_t i = 0; i < params.modes.size(); ++i) { |
| 38 modes_.push_back(new DisplayModeProxy(params.modes[i])); | 39 modes_.push_back(new DisplayModeProxy(params.modes[i])); |
| 39 | 40 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 50 } | 51 } |
| 51 | 52 |
| 52 DisplaySnapshotProxy::~DisplaySnapshotProxy() { | 53 DisplaySnapshotProxy::~DisplaySnapshotProxy() { |
| 53 } | 54 } |
| 54 | 55 |
| 55 std::string DisplaySnapshotProxy::ToString() const { | 56 std::string DisplaySnapshotProxy::ToString() const { |
| 56 return string_representation_; | 57 return string_representation_; |
| 57 } | 58 } |
| 58 | 59 |
| 59 } // namespace ui | 60 } // namespace ui |
| OLD | NEW |