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

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

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: Use forced color profile in display::Display ctor Created 3 years, 6 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/compositor/compositor.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 "mojo/public/cpp/bindings/struct_traits.h" 11 #include "mojo/public/cpp/bindings/struct_traits.h"
12 #include "ui/display/display_export.h" 12 #include "ui/display/display_export.h"
13 #include "ui/display/types/display_constants.h" 13 #include "ui/display/types/display_constants.h"
14 #include "ui/gfx/color_space.h"
14 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/icc_profile.h"
16 16
17 namespace display { 17 namespace display {
18 18
19 namespace mojom { 19 namespace mojom {
20 class DisplayDataView; 20 class DisplayDataView;
21 } 21 }
22 22
23 // Returns true if one of following conditions is met. 23 // Returns true if one of following conditions is met.
24 // 1) id1 is internal. 24 // 1) id1 is internal.
25 // 2) output index of id1 < output index of id2 and id2 isn't internal. 25 // 2) output index of id1 < output index of id2 and id2 isn't internal.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 // True if there is an internal display. 178 // True if there is an internal display.
179 static bool HasInternalDisplay(); 179 static bool HasInternalDisplay();
180 180
181 // Maximum cursor size in native pixels. 181 // Maximum cursor size in native pixels.
182 const gfx::Size& maximum_cursor_size() const { return maximum_cursor_size_; } 182 const gfx::Size& maximum_cursor_size() const { return maximum_cursor_size_; }
183 void set_maximum_cursor_size(const gfx::Size& size) { 183 void set_maximum_cursor_size(const gfx::Size& size) {
184 maximum_cursor_size_ = size; 184 maximum_cursor_size_ = size;
185 } 185 }
186 186
187 // The full ICC profile of the display. 187 // The full color space of the display.
188 gfx::ICCProfile icc_profile() const { return icc_profile_; } 188 gfx::ColorSpace color_space() const { return color_space_; }
189 void set_icc_profile(const gfx::ICCProfile& icc_profile) { 189 void set_color_space(const gfx::ColorSpace& color_space) {
190 icc_profile_ = icc_profile; 190 color_space_ = color_space;
191 } 191 }
192 192
193 // The number of bits per pixel. Used by media query APIs. 193 // The number of bits per pixel. Used by media query APIs.
194 int color_depth() const { return color_depth_; } 194 int color_depth() const { return color_depth_; }
195 void set_color_depth(int color_depth) { 195 void set_color_depth(int color_depth) {
196 color_depth_ = color_depth; 196 color_depth_ = color_depth;
197 } 197 }
198 198
199 // The number of bits per color component (all color components are assumed to 199 // The number of bits per color component (all color components are assumed to
200 // have the same number of bits). Used by media query APIs. 200 // have the same number of bits). Used by media query APIs.
(...skipping 18 matching lines...) Expand all
219 // errors. 219 // errors.
220 gfx::Size size_in_pixels_; 220 gfx::Size size_in_pixels_;
221 gfx::Rect work_area_; 221 gfx::Rect work_area_;
222 float device_scale_factor_; 222 float device_scale_factor_;
223 Rotation rotation_ = ROTATE_0; 223 Rotation rotation_ = ROTATE_0;
224 TouchSupport touch_support_ = TOUCH_SUPPORT_UNKNOWN; 224 TouchSupport touch_support_ = TOUCH_SUPPORT_UNKNOWN;
225 AccelerometerSupport accelerometer_support_ = ACCELEROMETER_SUPPORT_UNKNOWN; 225 AccelerometerSupport accelerometer_support_ = ACCELEROMETER_SUPPORT_UNKNOWN;
226 gfx::Size maximum_cursor_size_; 226 gfx::Size maximum_cursor_size_;
227 // NOTE: this is not currently written to the mojom as it is not used in 227 // NOTE: this is not currently written to the mojom as it is not used in
228 // aura. 228 // aura.
229 gfx::ICCProfile icc_profile_; 229 gfx::ColorSpace color_space_;
230 int color_depth_; 230 int color_depth_;
231 int depth_per_component_; 231 int depth_per_component_;
232 bool is_monochrome_ = false; 232 bool is_monochrome_ = false;
233 }; 233 };
234 234
235 } // namespace display 235 } // namespace display
236 236
237 #endif // UI_DISPLAY_DISPLAY_H_ 237 #endif // UI_DISPLAY_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/display/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698