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

Side by Side Diff: content/public/common/screen_info.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
6 #define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ 6 #define CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
7 7
8 #include "content/common/content_export.h"
8 #include "content/public/common/screen_orientation_values.h" 9 #include "content/public/common/screen_orientation_values.h"
9 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/icc_profile.h"
10 12
11 namespace content { 13 namespace content {
12 14
13 // Information about the screen on which a RenderWidget is being displayed. This 15 // Information about the screen on which a RenderWidget is being displayed. This
14 // is the content counterpart to WebScreenInfo in blink. 16 // is the content counterpart to WebScreenInfo in blink.
15 struct ScreenInfo { 17 struct CONTENT_EXPORT ScreenInfo {
18 ScreenInfo();
19 ScreenInfo(const ScreenInfo& other);
20 ~ScreenInfo();
21
16 // Device scale factor. Specifies the ratio between physical and logical 22 // Device scale factor. Specifies the ratio between physical and logical
17 // pixels. 23 // pixels.
18 float device_scale_factor = 1.f; 24 float device_scale_factor = 1.f;
19 25
20 // The screen depth in bits per pixel 26 // The screen depth in bits per pixel
21 uint32_t depth = 0; 27 uint32_t depth = 0;
22 28
23 // The bits per colour component. This assumes that the colours are balanced 29 // The bits per colour component. This assumes that the colours are balanced
24 // equally. 30 // equally.
25 uint32_t depth_per_component = 0; 31 uint32_t depth_per_component = 0;
26 32
27 // This can be true for black and white printers 33 // This can be true for black and white printers
28 bool is_monochrome = false; 34 bool is_monochrome = false;
29 35
36 // The ICC profile of the output display.
37 gfx::ICCProfile icc_profile;
38
30 // The display monitor rectangle in virtual-screen coordinates. Note that 39 // The display monitor rectangle in virtual-screen coordinates. Note that
31 // this may be negative. 40 // this may be negative.
32 gfx::Rect rect; 41 gfx::Rect rect;
33 42
34 // The portion of the monitor's rectangle that can be used by applications. 43 // The portion of the monitor's rectangle that can be used by applications.
35 gfx::Rect available_rect; 44 gfx::Rect available_rect;
36 45
37 // The monitor's orientation. 46 // The monitor's orientation.
38 ScreenOrientationValues orientation_type = 47 ScreenOrientationValues orientation_type =
39 SCREEN_ORIENTATION_VALUES_DEFAULT; 48 SCREEN_ORIENTATION_VALUES_DEFAULT;
40 49
41 // This is the orientation angle of the displayed content in degrees. 50 // This is the orientation angle of the displayed content in degrees.
42 // It is the opposite of the physical rotation. 51 // It is the opposite of the physical rotation.
43 uint16_t orientation_angle = 0; 52 uint16_t orientation_angle = 0;
44 53
45 bool operator==(const ScreenInfo& other) const; 54 bool operator==(const ScreenInfo& other) const;
46 bool operator!=(const ScreenInfo& other) const; 55 bool operator!=(const ScreenInfo& other) const;
47 }; 56 };
48 57
49 } // namespace content 58 } // namespace content
50 59
51 #endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_ 60 #endif // CONTENT_PUBLIC_COMMON_SCREEN_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698