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

Side by Side Diff: ui/gfx/icc_profile.h

Issue 2950183002: color: Use ICCProfile from display::Display instead of FromBestMonitor (Closed)
Patch Set: 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
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 UI_GFX_ICC_PROFILE_H_ 5 #ifndef UI_GFX_ICC_PROFILE_H_
6 #define UI_GFX_ICC_PROFILE_H_ 6 #define UI_GFX_ICC_PROFILE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 ICCProfile(const ICCProfile& other); 34 ICCProfile(const ICCProfile& other);
35 ICCProfile& operator=(ICCProfile&& other); 35 ICCProfile& operator=(ICCProfile&& other);
36 ICCProfile& operator=(const ICCProfile& other); 36 ICCProfile& operator=(const ICCProfile& other);
37 ~ICCProfile(); 37 ~ICCProfile();
38 bool operator==(const ICCProfile& other) const; 38 bool operator==(const ICCProfile& other) const;
39 bool operator!=(const ICCProfile& other) const; 39 bool operator!=(const ICCProfile& other) const;
40 40
41 // Returns true if this profile was successfully parsed by SkICC. 41 // Returns true if this profile was successfully parsed by SkICC.
42 bool IsValid() const; 42 bool IsValid() const;
43 43
44 // Create ICC profile representing the sRGB color space.
45 static ICCProfile CreateSRGB();
46
44 // Returns the color profile of the monitor that can best represent color. 47 // Returns the color profile of the monitor that can best represent color.
45 // This profile should be used for creating content that does not know on 48 // This profile should be used for creating content that does not know on
46 // which monitor it will be displayed. 49 // which monitor it will be displayed.
47 static ICCProfile FromBestMonitor(); 50 static ICCProfile FromBestMonitor();
48 #if defined(OS_MACOSX) 51 #if defined(OS_MACOSX)
49 static ICCProfile FromCGColorSpace(CGColorSpaceRef cg_color_space); 52 static ICCProfile FromCGColorSpace(CGColorSpaceRef cg_color_space);
50 #endif 53 #endif
51 54
52 // This will recover a ICCProfile from a compact ColorSpace representation. 55 // This will recover a ICCProfile from a compact ColorSpace representation.
53 // Internally, this will make an effort to create an identical ICCProfile 56 // Internally, this will make an effort to create an identical ICCProfile
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace); 132 FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
130 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t); 133 friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t);
131 friend class ColorSpace; 134 friend class ColorSpace;
132 friend class ColorTransformInternal; 135 friend class ColorTransformInternal;
133 friend struct IPC::ParamTraits<gfx::ICCProfile>; 136 friend struct IPC::ParamTraits<gfx::ICCProfile>;
134 }; 137 };
135 138
136 } // namespace gfx 139 } // namespace gfx
137 140
138 #endif // UI_GFX_ICC_PROFILE_H_ 141 #endif // UI_GFX_ICC_PROFILE_H_
OLDNEW
« ui/aura/window_tree_host.cc ('K') | « ui/display/display.cc ('k') | ui/gfx/icc_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698