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

Side by Side Diff: third_party/WebKit/public/platform/WebScreenInfo.h

Issue 2954793002: color: Replace more instances of ICCProfile with ColorSpace (Closed)
Patch Set: Created 3 years, 5 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 | « third_party/WebKit/Source/platform/graphics/ColorSpaceGamut.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebScreenInfo_h 31 #ifndef WebScreenInfo_h
32 #define WebScreenInfo_h 32 #define WebScreenInfo_h
33 33
34 #include "WebRect.h" 34 #include "WebRect.h"
35 #include "public/platform/ShapeProperties.h" 35 #include "public/platform/ShapeProperties.h"
36 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h" 36 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
37 #include "ui/gfx/icc_profile.h" 37 #include "ui/gfx/color_space.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 struct WebScreenInfo { 41 struct WebScreenInfo {
42 // Device scale factor. Specifies the ratio between physical and logical 42 // Device scale factor. Specifies the ratio between physical and logical
43 // pixels. 43 // pixels.
44 float device_scale_factor = 1.f; 44 float device_scale_factor = 1.f;
45 45
46 // The ICC profile of the output display. 46 // The color space of the output display.
47 gfx::ICCProfile icc_profile; 47 gfx::ColorSpace color_space;
48 48
49 // The screen depth in bits per pixel 49 // The screen depth in bits per pixel
50 int depth = 0; 50 int depth = 0;
51 51
52 // The bits per colour component. This assumes that the colours are balanced 52 // The bits per colour component. This assumes that the colours are balanced
53 // equally. 53 // equally.
54 int depth_per_component = 0; 54 int depth_per_component = 0;
55 55
56 // This can be true for black and white printers 56 // This can be true for black and white printers
57 bool is_monochrome = false; 57 bool is_monochrome = false;
(...skipping 24 matching lines...) Expand all
82 // It is the opposite of the physical rotation. 82 // It is the opposite of the physical rotation.
83 uint16_t orientation_angle = 0; 83 uint16_t orientation_angle = 0;
84 84
85 // This is the shape of display. 85 // This is the shape of display.
86 DisplayShape display_shape = kDisplayShapeRect; 86 DisplayShape display_shape = kDisplayShapeRect;
87 87
88 WebScreenInfo() = default; 88 WebScreenInfo() = default;
89 89
90 bool operator==(const WebScreenInfo& other) const { 90 bool operator==(const WebScreenInfo& other) const {
91 return this->device_scale_factor == other.device_scale_factor && 91 return this->device_scale_factor == other.device_scale_factor &&
92 this->icc_profile == other.icc_profile && 92 this->color_space == other.color_space &&
93 this->depth == other.depth && 93 this->depth == other.depth &&
94 this->depth_per_component == other.depth_per_component && 94 this->depth_per_component == other.depth_per_component &&
95 this->is_monochrome == other.is_monochrome && 95 this->is_monochrome == other.is_monochrome &&
96 this->rect == other.rect && 96 this->rect == other.rect &&
97 this->available_rect == other.available_rect && 97 this->available_rect == other.available_rect &&
98 this->orientation_type == other.orientation_type && 98 this->orientation_type == other.orientation_type &&
99 this->orientation_angle == other.orientation_angle && 99 this->orientation_angle == other.orientation_angle &&
100 this->display_shape == other.display_shape; 100 this->display_shape == other.display_shape;
101 } 101 }
102 102
103 bool operator!=(const WebScreenInfo& other) const { 103 bool operator!=(const WebScreenInfo& other) const {
104 return !this->operator==(other); 104 return !this->operator==(other);
105 } 105 }
106 }; 106 };
107 107
108 } // namespace blink 108 } // namespace blink
109 109
110 #endif 110 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ColorSpaceGamut.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698