| 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 |
| 82 // plane buffer. |
| 83 static gfx::BufferFormat PrimaryFormat(); |
| 84 |
| 80 protected: | 85 protected: |
| 81 // Display id for this output. | 86 // Display id for this output. |
| 82 int64_t display_id_; | 87 int64_t display_id_; |
| 83 | 88 |
| 84 // Display's origin on the framebuffer. | 89 // Display's origin on the framebuffer. |
| 85 gfx::Point origin_; | 90 gfx::Point origin_; |
| 86 | 91 |
| 87 gfx::Size physical_size_; | 92 gfx::Size physical_size_; |
| 88 | 93 |
| 89 DisplayConnectionType type_; | 94 DisplayConnectionType type_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 115 | 120 |
| 116 // Maximum supported cursor size on this display. | 121 // Maximum supported cursor size on this display. |
| 117 gfx::Size maximum_cursor_size_; | 122 gfx::Size maximum_cursor_size_; |
| 118 | 123 |
| 119 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); | 124 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); |
| 120 }; | 125 }; |
| 121 | 126 |
| 122 } // namespace ui | 127 } // namespace ui |
| 123 | 128 |
| 124 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ | 129 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ |
| OLD | NEW |