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" |
(...skipping 12 matching lines...) Expand all Loading... |
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.display_name, | 30 params.display_name, |
31 params.sys_path, | 31 params.sys_path, |
32 std::vector<const DisplayMode*>(), | 32 std::vector<const DisplayMode*>(), |
33 params.edid, | |
34 NULL, | 33 NULL, |
35 NULL), | 34 NULL), |
36 string_representation_(params.string_representation) { | 35 string_representation_(params.string_representation) { |
37 for (size_t i = 0; i < params.modes.size(); ++i) { | 36 for (size_t i = 0; i < params.modes.size(); ++i) { |
38 modes_.push_back(new DisplayModeProxy(params.modes[i])); | 37 modes_.push_back(new DisplayModeProxy(params.modes[i])); |
39 | 38 |
40 if (params.has_current_mode && | 39 if (params.has_current_mode && |
41 SameModes(params.modes[i], params.current_mode)) | 40 SameModes(params.modes[i], params.current_mode)) |
42 current_mode_ = modes_.back(); | 41 current_mode_ = modes_.back(); |
43 | 42 |
44 if (params.has_native_mode && | 43 if (params.has_native_mode && |
45 SameModes(params.modes[i], params.native_mode)) | 44 SameModes(params.modes[i], params.native_mode)) |
46 native_mode_ = modes_.back(); | 45 native_mode_ = modes_.back(); |
47 } | 46 } |
48 | 47 |
49 product_id_ = params.product_id; | 48 product_id_ = params.product_id; |
50 } | 49 } |
51 | 50 |
52 DisplaySnapshotProxy::~DisplaySnapshotProxy() { | 51 DisplaySnapshotProxy::~DisplaySnapshotProxy() { |
53 } | 52 } |
54 | 53 |
55 std::string DisplaySnapshotProxy::ToString() const { | 54 std::string DisplaySnapshotProxy::ToString() const { |
56 return string_representation_; | 55 return string_representation_; |
57 } | 56 } |
58 | 57 |
59 } // namespace ui | 58 } // namespace ui |
OLD | NEW |