| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // which monitor it will be displayed. | 46 // which monitor it will be displayed. |
| 47 static ICCProfile FromBestMonitor(); | 47 static ICCProfile FromBestMonitor(); |
| 48 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
| 49 static ICCProfile FromCGColorSpace(CGColorSpaceRef cg_color_space); | 49 static ICCProfile FromCGColorSpace(CGColorSpaceRef cg_color_space); |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 // This will recover a ICCProfile from a compact ColorSpace representation. | 52 // This will recover a ICCProfile from a compact ColorSpace representation. |
| 53 // Internally, this will make an effort to create an identical ICCProfile | 53 // Internally, this will make an effort to create an identical ICCProfile |
| 54 // to the one that created |color_space|, but this is not guaranteed. | 54 // to the one that created |color_space|, but this is not guaranteed. |
| 55 static ICCProfile FromColorSpace(const gfx::ColorSpace& color_space); | 55 static ICCProfile FromColorSpace(const gfx::ColorSpace& color_space); |
| 56 static ICCProfile FromSkColorSpace(sk_sp<SkColorSpace> color_space); |
| 56 | 57 |
| 57 // Create directly from profile data. | 58 // Create directly from profile data. |
| 58 static ICCProfile FromData(const char* icc_profile, size_t size); | 59 static ICCProfile FromData(const char* icc_profile, size_t size); |
| 59 | 60 |
| 60 // This will perform a potentially-lossy conversion to a more compact color | 61 // This will perform a potentially-lossy conversion to a more compact color |
| 61 // space representation. | 62 // space representation. |
| 62 ColorSpace GetColorSpace() const; | 63 ColorSpace GetColorSpace() const; |
| 63 | 64 |
| 64 const std::vector<char>& GetData() const; | 65 const std::vector<char>& GetData() const; |
| 65 | 66 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 friend class ColorSpace; | 99 friend class ColorSpace; |
| 99 friend struct IPC::ParamTraits<gfx::ICCProfile>; | 100 friend struct IPC::ParamTraits<gfx::ICCProfile>; |
| 100 friend struct IPC::ParamTraits<gfx::ICCProfile::Type>; | 101 friend struct IPC::ParamTraits<gfx::ICCProfile::Type>; |
| 101 friend struct mojo::StructTraits<gfx::mojom::ICCProfileDataView, | 102 friend struct mojo::StructTraits<gfx::mojom::ICCProfileDataView, |
| 102 gfx::ICCProfile>; | 103 gfx::ICCProfile>; |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace gfx | 106 } // namespace gfx |
| 106 | 107 |
| 107 #endif // UI_GFX_ICC_PROFILE_H_ | 108 #endif // UI_GFX_ICC_PROFILE_H_ |
| OLD | NEW |