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_util.h" | 5 #include "ui/ozone/common/display_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 DisplaySnapshot_Params GetDisplaySnapshotParams( | 43 DisplaySnapshot_Params GetDisplaySnapshotParams( |
44 const DisplaySnapshot& display) { | 44 const DisplaySnapshot& display) { |
45 DisplaySnapshot_Params params; | 45 DisplaySnapshot_Params params; |
46 params.display_id = display.display_id(); | 46 params.display_id = display.display_id(); |
47 params.origin = display.origin(); | 47 params.origin = display.origin(); |
48 params.physical_size = display.physical_size(); | 48 params.physical_size = display.physical_size(); |
49 params.type = display.type(); | 49 params.type = display.type(); |
50 params.is_aspect_preserving_scaling = display.is_aspect_preserving_scaling(); | 50 params.is_aspect_preserving_scaling = display.is_aspect_preserving_scaling(); |
51 params.has_overscan = display.has_overscan(); | 51 params.has_overscan = display.has_overscan(); |
| 52 params.has_color_correction_matrix = display.has_color_correction_matrix(); |
52 params.display_name = display.display_name(); | 53 params.display_name = display.display_name(); |
53 params.sys_path = display.sys_path(); | 54 params.sys_path = display.sys_path(); |
54 for (size_t i = 0; i < display.modes().size(); ++i) | 55 for (size_t i = 0; i < display.modes().size(); ++i) |
55 params.modes.push_back(GetDisplayModeParams(*display.modes()[i])); | 56 params.modes.push_back(GetDisplayModeParams(*display.modes()[i])); |
56 | 57 |
57 params.has_current_mode = display.current_mode() != NULL; | 58 params.has_current_mode = display.current_mode() != NULL; |
58 if (params.has_current_mode) | 59 if (params.has_current_mode) |
59 params.current_mode = GetDisplayModeParams(*display.current_mode()); | 60 params.current_mode = GetDisplayModeParams(*display.current_mode()); |
60 | 61 |
61 params.has_native_mode = display.native_mode() != NULL; | 62 params.has_native_mode = display.native_mode() != NULL; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 snapshot_out->physical_size = gfx::Size(physical_width, physical_height); | 97 snapshot_out->physical_size = gfx::Size(physical_width, physical_height); |
97 snapshot_out->has_current_mode = true; | 98 snapshot_out->has_current_mode = true; |
98 snapshot_out->current_mode = mode_param; | 99 snapshot_out->current_mode = mode_param; |
99 snapshot_out->has_native_mode = true; | 100 snapshot_out->has_native_mode = true; |
100 snapshot_out->native_mode = mode_param; | 101 snapshot_out->native_mode = mode_param; |
101 snapshot_out->product_id = kDummyProductId; | 102 snapshot_out->product_id = kDummyProductId; |
102 return true; | 103 return true; |
103 } | 104 } |
104 | 105 |
105 } // namespace ui | 106 } // namespace ui |
OLD | NEW |