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 #ifndef UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 5 #ifndef UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
6 #define UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 6 #define UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "ui/display/types/display_constants.h" | 14 #include "ui/display/types/display_constants.h" |
15 #include "ui/display/types/display_mode.h" | 15 #include "ui/display/types/display_mode.h" |
| 16 #include "ui/gfx/buffer_types.h" |
16 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
17 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
18 | 19 |
19 namespace ui { | 20 namespace ui { |
20 | 21 |
21 // This class represents the state of a display at one point in time. Platforms | 22 // This class represents the state of a display at one point in time. Platforms |
22 // will extend this class in order to add platform specific configuration and | 23 // will extend this class in order to add platform specific configuration and |
23 // identifiers required to configure this display. | 24 // identifiers required to configure this display. |
24 class DISPLAY_TYPES_EXPORT DisplaySnapshot { | 25 class DISPLAY_TYPES_EXPORT DisplaySnapshot { |
25 public: | 26 public: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool has_color_correction_matrix() const { | 71 bool has_color_correction_matrix() const { |
71 return has_color_correction_matrix_; | 72 return has_color_correction_matrix_; |
72 } | 73 } |
73 | 74 |
74 // Returns a textual representation of this display state. | 75 // Returns a textual representation of this display state. |
75 virtual std::string ToString() const = 0; | 76 virtual std::string ToString() const = 0; |
76 | 77 |
77 // Used when no product id known. | 78 // Used when no product id known. |
78 static const int64_t kInvalidProductID = -1; | 79 static const int64_t kInvalidProductID = -1; |
79 | 80 |
| 81 // Return the buffer format to be used for the primary plane buffer. |
| 82 static gfx::BufferFormat PrimaryFormat(); |
| 83 |
80 protected: | 84 protected: |
81 // Display id for this output. | 85 // Display id for this output. |
82 int64_t display_id_; | 86 int64_t display_id_; |
83 | 87 |
84 // Display's origin on the framebuffer. | 88 // Display's origin on the framebuffer. |
85 gfx::Point origin_; | 89 gfx::Point origin_; |
86 | 90 |
87 gfx::Size physical_size_; | 91 gfx::Size physical_size_; |
88 | 92 |
89 DisplayConnectionType type_; | 93 DisplayConnectionType type_; |
(...skipping 25 matching lines...) Expand all Loading... |
115 | 119 |
116 // Maximum supported cursor size on this display. | 120 // Maximum supported cursor size on this display. |
117 gfx::Size maximum_cursor_size_; | 121 gfx::Size maximum_cursor_size_; |
118 | 122 |
119 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); | 123 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); |
120 }; | 124 }; |
121 | 125 |
122 } // namespace ui | 126 } // namespace ui |
123 | 127 |
124 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 128 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
OLD | NEW |