Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: ui/display/types/display_snapshot.h

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Rebase after quirks changes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
(...skipping 11 matching lines...) Expand all
22 // will extend this class in order to add platform specific configuration and 22 // will extend this class in order to add platform specific configuration and
23 // identifiers required to configure this display. 23 // identifiers required to configure this display.
24 class DISPLAY_TYPES_EXPORT DisplaySnapshot { 24 class DISPLAY_TYPES_EXPORT DisplaySnapshot {
25 public: 25 public:
26 DisplaySnapshot(int64_t display_id, 26 DisplaySnapshot(int64_t display_id,
27 const gfx::Point& origin, 27 const gfx::Point& origin,
28 const gfx::Size& physical_size, 28 const gfx::Size& physical_size,
29 DisplayConnectionType type, 29 DisplayConnectionType type,
30 bool is_aspect_preserving_scaling, 30 bool is_aspect_preserving_scaling,
31 bool has_overscan, 31 bool has_overscan,
32 bool has_color_correction_matrix,
32 std::string display_name, 33 std::string display_name,
33 const base::FilePath& sys_path, 34 const base::FilePath& sys_path,
34 const std::vector<const DisplayMode*>& modes, 35 const std::vector<const DisplayMode*>& modes,
35 const std::vector<uint8_t>& edid, 36 const std::vector<uint8_t>& edid,
36 const DisplayMode* current_mode, 37 const DisplayMode* current_mode,
37 const DisplayMode* native_mode); 38 const DisplayMode* native_mode);
38 virtual ~DisplaySnapshot(); 39 virtual ~DisplaySnapshot();
39 40
40 const gfx::Point& origin() const { return origin_; } 41 const gfx::Point& origin() const { return origin_; }
41 const gfx::Size& physical_size() const { return physical_size_; } 42 const gfx::Size& physical_size() const { return physical_size_; }
(...skipping 11 matching lines...) Expand all
53 const DisplayMode* native_mode() const { return native_mode_; } 54 const DisplayMode* native_mode() const { return native_mode_; }
54 int64_t product_id() const { return product_id_; } 55 int64_t product_id() const { return product_id_; }
55 56
56 const std::vector<const DisplayMode*>& modes() const { return modes_; } 57 const std::vector<const DisplayMode*>& modes() const { return modes_; }
57 const std::vector<uint8_t>& edid() const { return edid_; } 58 const std::vector<uint8_t>& edid() const { return edid_; }
58 59
59 void set_current_mode(const DisplayMode* mode) { current_mode_ = mode; } 60 void set_current_mode(const DisplayMode* mode) { current_mode_ = mode; }
60 void set_origin(const gfx::Point& origin) { origin_ = origin; } 61 void set_origin(const gfx::Point& origin) { origin_ = origin; }
61 void add_mode(const DisplayMode* mode) { modes_.push_back(mode); } 62 void add_mode(const DisplayMode* mode) { modes_.push_back(mode); }
62 63
64 // Whether this display has advanced color correction available.
65 bool has_color_correction_matrix() const {
66 return has_color_correction_matrix_;
67 }
68
63 // Returns a textual representation of this display state. 69 // Returns a textual representation of this display state.
64 virtual std::string ToString() const = 0; 70 virtual std::string ToString() const = 0;
65 71
66 // Used when no product id known. 72 // Used when no product id known.
67 static const int64_t kInvalidProductID = -1; 73 static const int64_t kInvalidProductID = -1;
68 74
69 protected: 75 protected:
70 // Display id for this output. 76 // Display id for this output.
71 int64_t display_id_; 77 int64_t display_id_;
72 78
73 // Display's origin on the framebuffer. 79 // Display's origin on the framebuffer.
74 gfx::Point origin_; 80 gfx::Point origin_;
75 81
76 gfx::Size physical_size_; 82 gfx::Size physical_size_;
77 83
78 DisplayConnectionType type_; 84 DisplayConnectionType type_;
79 85
80 bool is_aspect_preserving_scaling_; 86 bool is_aspect_preserving_scaling_;
81 87
82 bool has_overscan_; 88 bool has_overscan_;
83 89
90 bool has_color_correction_matrix_;
91
84 std::string display_name_; 92 std::string display_name_;
85 93
86 base::FilePath sys_path_; 94 base::FilePath sys_path_;
87 95
88 std::vector<const DisplayMode*> modes_; // Not owned. 96 std::vector<const DisplayMode*> modes_; // Not owned.
89 97
90 // The display's EDID. It can be empty if nothing extracted such as in the 98 // The display's EDID. It can be empty if nothing extracted such as in the
91 // case of a virtual display. 99 // case of a virtual display.
92 std::vector<uint8_t> edid_; 100 std::vector<uint8_t> edid_;
93 101
94 // Mode currently being used by the output. 102 // Mode currently being used by the output.
95 const DisplayMode* current_mode_; 103 const DisplayMode* current_mode_;
96 104
97 // "Best" mode supported by the output. 105 // "Best" mode supported by the output.
98 const DisplayMode* native_mode_; 106 const DisplayMode* native_mode_;
99 107
100 // Combination of manufacturer and product code. 108 // Combination of manufacturer and product code.
101 int64_t product_id_; 109 int64_t product_id_;
102 110
103 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); 111 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot);
104 }; 112 };
105 113
106 } // namespace ui 114 } // namespace ui
107 115
108 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ 116 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/x11/native_display_delegate_x11.cc ('k') | ui/display/types/display_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698