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

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

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Unrevert Created 4 years, 3 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
« no previous file with comments | « ui/display/android/screen_android.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DISPLAY_H_ 5 #ifndef UI_DISPLAY_DISPLAY_H_
6 #define UI_DISPLAY_DISPLAY_H_ 6 #define UI_DISPLAY_DISPLAY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/display/display_export.h" 11 #include "ui/display/display_export.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/icc_profile.h"
13 14
14 #if !defined(OS_IOS) 15 #if !defined(OS_IOS)
15 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck 16 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck
16 #endif 17 #endif
17 18
18 namespace display { 19 namespace display {
19 20
20 #if !defined(OS_IOS) 21 #if !defined(OS_IOS)
21 namespace mojom { 22 namespace mojom {
22 class DisplayDataView; 23 class DisplayDataView;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 158
158 // True if there is an internal display. 159 // True if there is an internal display.
159 static bool HasInternalDisplay(); 160 static bool HasInternalDisplay();
160 161
161 // Maximum cursor size in native pixels. 162 // Maximum cursor size in native pixels.
162 const gfx::Size& maximum_cursor_size() const { return maximum_cursor_size_; } 163 const gfx::Size& maximum_cursor_size() const { return maximum_cursor_size_; }
163 void set_maximum_cursor_size(const gfx::Size& size) { 164 void set_maximum_cursor_size(const gfx::Size& size) {
164 maximum_cursor_size_ = size; 165 maximum_cursor_size_ = size;
165 } 166 }
166 167
168 // The full ICC profile of the display.
169 gfx::ICCProfile icc_profile() const { return icc_profile_; }
170 void set_icc_profile(const gfx::ICCProfile& icc_profile) {
171 icc_profile_ = icc_profile;
172 }
173
174 // The number of bits per pixel. Used by media query APIs.
167 int color_depth() const { return color_depth_; } 175 int color_depth() const { return color_depth_; }
168 void set_color_depth(int color_depth) { 176 void set_color_depth(int color_depth) {
169 color_depth_ = color_depth; 177 color_depth_ = color_depth;
170 } 178 }
171 179
180 // The number of bits per color component (all color components are assumed to
181 // have the same number of bits). Used by media query APIs.
172 int depth_per_component() const { return depth_per_component_; } 182 int depth_per_component() const { return depth_per_component_; }
173 void set_depth_per_component(int depth_per_component) { 183 void set_depth_per_component(int depth_per_component) {
174 depth_per_component_ = depth_per_component; 184 depth_per_component_ = depth_per_component;
175 } 185 }
176 186
187 // True if this is a monochrome display (e.g, for accessiblity). Used by media
188 // query APIs.
189 bool is_monochrome() const { return is_monochrome_; }
190 void set_is_monochrome(bool is_monochrome) {
191 is_monochrome_ = is_monochrome;
192 }
193
177 private: 194 private:
178 int64_t id_; 195 int64_t id_;
179 gfx::Rect bounds_; 196 gfx::Rect bounds_;
180 gfx::Rect work_area_; 197 gfx::Rect work_area_;
181 float device_scale_factor_; 198 float device_scale_factor_;
182 Rotation rotation_; 199 Rotation rotation_;
183 TouchSupport touch_support_; 200 TouchSupport touch_support_;
184 gfx::Size maximum_cursor_size_; 201 gfx::Size maximum_cursor_size_;
202 gfx::ICCProfile icc_profile_;
185 int color_depth_; 203 int color_depth_;
186 int depth_per_component_; 204 int depth_per_component_;
205 bool is_monochrome_;
187 206
188 #if !defined(OS_IOS) 207 #if !defined(OS_IOS)
189 friend struct mojo::StructTraits<display::mojom::DisplayDataView, 208 friend struct mojo::StructTraits<display::mojom::DisplayDataView,
190 display::Display>; 209 display::Display>;
191 #endif 210 #endif
192 }; 211 };
193 212
194 } // namespace display 213 } // namespace display
195 214
196 #endif // UI_DISPLAY_DISPLAY_H_ 215 #endif // UI_DISPLAY_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/display/android/screen_android.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698