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

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

Issue 2325773003: cc: Plumb the monitor color profile to renderer for rasterization (Closed)
Patch Set: Make public_deps instead of deps 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
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.
167 int color_depth() const { return color_depth_; } 175 int color_depth() const { return color_depth_; }
ccameron 2016/09/08 22:05:03 These variables are: - populated to something besi
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).
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
177 private: 187 private:
178 int64_t id_; 188 int64_t id_;
179 gfx::Rect bounds_; 189 gfx::Rect bounds_;
180 gfx::Rect work_area_; 190 gfx::Rect work_area_;
181 float device_scale_factor_; 191 float device_scale_factor_;
182 Rotation rotation_; 192 Rotation rotation_;
183 TouchSupport touch_support_; 193 TouchSupport touch_support_;
184 gfx::Size maximum_cursor_size_; 194 gfx::Size maximum_cursor_size_;
195 gfx::ICCProfile icc_profile_;
185 int color_depth_; 196 int color_depth_;
186 int depth_per_component_; 197 int depth_per_component_;
187 198
188 #if !defined(OS_IOS) 199 #if !defined(OS_IOS)
189 friend struct mojo::StructTraits<display::mojom::DisplayDataView, 200 friend struct mojo::StructTraits<display::mojom::DisplayDataView,
190 display::Display>; 201 display::Display>;
191 #endif 202 #endif
192 }; 203 };
193 204
194 } // namespace display 205 } // namespace display
195 206
196 #endif // UI_DISPLAY_DISPLAY_H_ 207 #endif // UI_DISPLAY_DISPLAY_H_
OLDNEW
« ui/display/BUILD.gn ('K') | « ui/display/BUILD.gn ('k') | ui/display/mac/screen_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698