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

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: Integrate dnicoara@ feedback Created 4 years, 10 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 DisplayMode* current_mode, 36 const DisplayMode* current_mode,
36 const DisplayMode* native_mode); 37 const DisplayMode* native_mode);
37 virtual ~DisplaySnapshot(); 38 virtual ~DisplaySnapshot();
38 39
39 const gfx::Point& origin() const { return origin_; } 40 const gfx::Point& origin() const { return origin_; }
40 const gfx::Size& physical_size() const { return physical_size_; } 41 const gfx::Size& physical_size() const { return physical_size_; }
41 ui::DisplayConnectionType type() const { return type_; } 42 ui::DisplayConnectionType type() const { return type_; }
42 bool is_aspect_preserving_scaling() const { 43 bool is_aspect_preserving_scaling() const {
43 return is_aspect_preserving_scaling_; 44 return is_aspect_preserving_scaling_;
44 } 45 }
45 bool has_overscan() const { return has_overscan_; } 46 bool has_overscan() const { return has_overscan_; }
46 std::string display_name() const { return display_name_; } 47 std::string display_name() const { return display_name_; }
47 const base::FilePath& sys_path() const { return sys_path_; } 48 const base::FilePath& sys_path() const { return sys_path_; }
48 49
49 int64_t display_id() const { return display_id_; } 50 int64_t display_id() const { return display_id_; }
50 51
51 const DisplayMode* current_mode() const { return current_mode_; } 52 const DisplayMode* current_mode() const { return current_mode_; }
52 const DisplayMode* native_mode() const { return native_mode_; } 53 const DisplayMode* native_mode() const { return native_mode_; }
53 int64_t product_id() const { return product_id_; } 54 int64_t product_id() const { return product_id_; }
54 55
55 const std::vector<const DisplayMode*>& modes() const { return modes_; } 56 const std::vector<const DisplayMode*>& modes() const { return modes_; }
56 57
57 void set_current_mode(const DisplayMode* mode) { current_mode_ = mode; } 58 void set_current_mode(const DisplayMode* mode) { current_mode_ = mode; }
58 void set_origin(const gfx::Point& origin) { origin_ = origin; } 59 void set_origin(const gfx::Point& origin) { origin_ = origin; }
59 void add_mode(const DisplayMode* mode) { modes_.push_back(mode); } 60 void add_mode(const DisplayMode* mode) { modes_.push_back(mode); }
60 61
62 // Whether this display has advanced color correction available.
63 bool has_color_correction_matrix() const {
64 return has_color_correction_matrix_;
65 }
66
61 // Returns a textual representation of this display state. 67 // Returns a textual representation of this display state.
62 virtual std::string ToString() const = 0; 68 virtual std::string ToString() const = 0;
63 69
64 // Used when no product id known. 70 // Used when no product id known.
65 static const int64_t kInvalidProductID = -1; 71 static const int64_t kInvalidProductID = -1;
66 72
67 protected: 73 protected:
68 // Display id for this output. 74 // Display id for this output.
69 int64_t display_id_; 75 int64_t display_id_;
70 76
71 // Display's origin on the framebuffer. 77 // Display's origin on the framebuffer.
72 gfx::Point origin_; 78 gfx::Point origin_;
73 79
74 gfx::Size physical_size_; 80 gfx::Size physical_size_;
75 81
76 DisplayConnectionType type_; 82 DisplayConnectionType type_;
77 83
78 bool is_aspect_preserving_scaling_; 84 bool is_aspect_preserving_scaling_;
79 85
80 bool has_overscan_; 86 bool has_overscan_;
81 87
88 bool has_color_correction_matrix_;
89
82 std::string display_name_; 90 std::string display_name_;
83 91
84 base::FilePath sys_path_; 92 base::FilePath sys_path_;
85 93
86 std::vector<const DisplayMode*> modes_; // Not owned. 94 std::vector<const DisplayMode*> modes_; // Not owned.
87 95
88 // Mode currently being used by the output. 96 // Mode currently being used by the output.
89 const DisplayMode* current_mode_; 97 const DisplayMode* current_mode_;
90 98
91 // "Best" mode supported by the output. 99 // "Best" mode supported by the output.
92 const DisplayMode* native_mode_; 100 const DisplayMode* native_mode_;
93 101
94 // Combination of manufacturer and product code. 102 // Combination of manufacturer and product code.
95 int64_t product_id_; 103 int64_t product_id_;
96 104
97 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot); 105 DISALLOW_COPY_AND_ASSIGN(DisplaySnapshot);
98 }; 106 };
99 107
100 } // namespace ui 108 } // namespace ui
101 109
102 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_ 110 #endif // UI_DISPLAY_TYPES_DISPLAY_SNAPSHOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698