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/types/display_snapshot.h" | 5 #include "ui/display/types/display_snapshot.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // The display serial number beginning byte position and its length in the | 13 // The display serial number beginning byte position and its length in the |
14 // EDID number as defined in the spec. | 14 // EDID number as defined in the spec. |
15 // https://en.wikipedia.org/wiki/Extended_Display_Identification_Data | 15 // https://en.wikipedia.org/wiki/Extended_Display_Identification_Data |
16 const size_t kSerialNumberBeginingByte = 12U; | 16 const size_t kSerialNumberBeginingByte = 12U; |
17 const size_t kSerialNumberLengthInBytes = 4U; | 17 const size_t kSerialNumberLengthInBytes = 4U; |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
21 DisplaySnapshot::DisplaySnapshot( | 21 DisplaySnapshot::DisplaySnapshot(int64_t display_id, |
22 int64_t display_id, | 22 const gfx::Point& origin, |
23 const gfx::Point& origin, | 23 const gfx::Size& physical_size, |
24 const gfx::Size& physical_size, | 24 DisplayConnectionType type, |
25 DisplayConnectionType type, | 25 bool is_aspect_preserving_scaling, |
26 bool is_aspect_preserving_scaling, | 26 bool has_overscan, |
27 bool has_overscan, | 27 bool has_color_correction_matrix, |
28 bool has_color_correction_matrix, | 28 std::string display_name, |
29 std::string display_name, | 29 const base::FilePath& sys_path, |
30 const base::FilePath& sys_path, | 30 DisplayModeList modes, |
31 std::vector<std::unique_ptr<const DisplayMode>> modes, | 31 const std::vector<uint8_t>& edid, |
32 const std::vector<uint8_t>& edid, | 32 const DisplayMode* current_mode, |
33 const DisplayMode* current_mode, | 33 const DisplayMode* native_mode) |
34 const DisplayMode* native_mode) | |
35 : display_id_(display_id), | 34 : display_id_(display_id), |
36 origin_(origin), | 35 origin_(origin), |
37 physical_size_(physical_size), | 36 physical_size_(physical_size), |
38 type_(type), | 37 type_(type), |
39 is_aspect_preserving_scaling_(is_aspect_preserving_scaling), | 38 is_aspect_preserving_scaling_(is_aspect_preserving_scaling), |
40 has_overscan_(has_overscan), | 39 has_overscan_(has_overscan), |
41 has_color_correction_matrix_(has_color_correction_matrix), | 40 has_color_correction_matrix_(has_color_correction_matrix), |
42 display_name_(display_name), | 41 display_name_(display_name), |
43 sys_path_(sys_path), | 42 sys_path_(sys_path), |
44 modes_(std::move(modes)), | 43 modes_(std::move(modes)), |
(...skipping 10 matching lines...) Expand all Loading... |
55 } | 54 } |
56 | 55 |
57 DisplaySnapshot::~DisplaySnapshot() {} | 56 DisplaySnapshot::~DisplaySnapshot() {} |
58 | 57 |
59 // static | 58 // static |
60 gfx::BufferFormat DisplaySnapshot::PrimaryFormat() { | 59 gfx::BufferFormat DisplaySnapshot::PrimaryFormat() { |
61 return gfx::BufferFormat::BGRX_8888; | 60 return gfx::BufferFormat::BGRX_8888; |
62 } | 61 } |
63 | 62 |
64 } // namespace ui | 63 } // namespace ui |
OLD | NEW |