| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |