| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "ui/display/types/display_mode.h" | 10 #include "ui/display/types/display_mode.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 return params; | 38 return params; |
| 39 } | 39 } |
| 40 | 40 |
| 41 DisplaySnapshot_Params GetDisplaySnapshotParams( | 41 DisplaySnapshot_Params GetDisplaySnapshotParams( |
| 42 const DisplaySnapshot& display) { | 42 const DisplaySnapshot& display) { |
| 43 DisplaySnapshot_Params params; | 43 DisplaySnapshot_Params params; |
| 44 params.display_id = display.display_id(); | 44 params.display_id = display.display_id(); |
| 45 params.origin = display.origin(); | 45 params.origin = display.origin(); |
| 46 params.physical_size = display.physical_size(); | 46 params.physical_size = display.physical_size(); |
| 47 params.type = display.type(); | 47 params.type = display.type(); |
| 48 params.is_aspect_preserving_scaling = display.is_aspect_preserving_scaling(); | |
| 49 params.has_overscan = display.has_overscan(); | |
| 50 params.display_name = display.display_name(); | |
| 51 for (size_t i = 0; i < display.modes().size(); ++i) | 48 for (size_t i = 0; i < display.modes().size(); ++i) |
| 52 params.modes.push_back(GetDisplayModeParams(*display.modes()[i])); | 49 params.modes.push_back(GetDisplayModeParams(*display.modes()[i])); |
| 53 | 50 |
| 54 params.has_current_mode = display.current_mode() != NULL; | 51 params.has_current_mode = display.current_mode() != NULL; |
| 55 if (params.has_current_mode) | 52 if (params.has_current_mode) |
| 56 params.current_mode = GetDisplayModeParams(*display.current_mode()); | 53 params.current_mode = GetDisplayModeParams(*display.current_mode()); |
| 57 | 54 |
| 58 params.has_native_mode = display.native_mode() != NULL; | 55 params.has_native_mode = display.native_mode() != NULL; |
| 59 if (params.has_native_mode) | 56 if (params.has_native_mode) |
| 60 params.native_mode = GetDisplayModeParams(*display.native_mode()); | 57 params.native_mode = GetDisplayModeParams(*display.native_mode()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 snapshot_out->physical_size = gfx::Size(physical_width, physical_height); | 90 snapshot_out->physical_size = gfx::Size(physical_width, physical_height); |
| 94 snapshot_out->has_current_mode = true; | 91 snapshot_out->has_current_mode = true; |
| 95 snapshot_out->current_mode = mode_param; | 92 snapshot_out->current_mode = mode_param; |
| 96 snapshot_out->has_native_mode = true; | 93 snapshot_out->has_native_mode = true; |
| 97 snapshot_out->native_mode = mode_param; | 94 snapshot_out->native_mode = mode_param; |
| 98 snapshot_out->product_id = kDummyProductId; | 95 snapshot_out->product_id = kDummyProductId; |
| 99 return true; | 96 return true; |
| 100 } | 97 } |
| 101 | 98 |
| 102 } // namespace ui | 99 } // namespace ui |
| OLD | NEW |